TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ROBERT FORTUNE
from: BOB SEWELL
date: 1996-07-22 09:02:00
subject: Random Numbers

 While translating the works of Dr. Suess into latin, Robert Fortune said:
 RF>     You should only have to seed the random number generator a
 RF>     single time at the very start of your program. After that use
 RF>     the built-in random number function. That's what it's there for!
    I reseed it more often to further eliminate the
 possibility--slim as it may be--that any one game, started
 at the very same second as another game, will have the same
 rolls.  I know it isn't necessary in order to make it work,
 but it makes me feel like the users are getting more true
 randomness to the dice throws.
 RF>       As far as getting every possible outcome you should do the
 RF>     math and calculate how often a given outcome can be expected
 RF>     to come up.
    Aye, it was trying to come up with those probabilities
 yesterday that made me think of the following, which I just
 posted to the guy who brought this up to me in the first
 place:
 --------------- Cut from DOORGAMES -------------------
 >BP> Bob,
 >BP> Get rid of your routine that always makes sure you get points on the
 >BP> first the dice are rolled. That is, make it so that it is totally
 BS>     Good suggestion, but there is no such routine.
 BP> In all the years I have been playing, I have never seen it miss giving
 BP> points on the first roll.
    I've been mulling this over, and started searching for a
 formula to calculate the odds of not getting points on the
 first roll.  Beginning my search, I tried to figure out
 what combination of NINE dice you could roll that wouldn't
 have points.  As it turns out, I cannot find any.  There is
 NO combination of nine dice that doesn't contain a one, a
 five or triplets.
    To demonstrate, let's try to set up a sample roll with
 nine dice and no points, according to the rules of Greedy.
 We know we can't have a single 1, a single 5 or three of
 any other value. I can think of only one way to accomplish
 this with eight dice:
              2   2   3   3   4   4   6   6
    So far, there are no points because we only have pairs
 and none are 1's nor 5's.  But we have one more die to
 throw.  What value could we roll on that last die that
 would not create points?  It can't be a 1 or 5, otherwise
 we would score points.  It can't be a 2, 3, 4 or 6 or we
 would have a triplet, and that would score points.
    Maybe there's another combination of nine dice which
 doesn't contain points that I haven't thought of.  If you
 can show me one, then I'll start checking (and reworking,
 if necessary) my routines to make it a possibility.  Until
 then, it looks to me like an exercise in futility... ;-)
 I'm struggling enough as it is for some extra time to work
 on the game.
 -------------------- Back to PowerBASIC -------------------
 RF>  that made me feel). You might try having your program purposely
 RF>  generate the outcome you are concerned about (by assigning the
 RF>  values needed for a given outcome rather than using random
 RF>  numbers) to at least see if your program will recognize a given
 RF>  outcome as special, etc...
    I did all that in 1991, when I first developed the game.
 This door has been in release since 1991 and has gone
 through five versions including the initial release.  And I
 enjoyed playing the game so much that it has slowed
 development significantly... (grin)
 RF>  Hope that helps. Errr.... Good luck! :) BTW, I used Microsoft's
 RF>  PDS BASIC 7.1 so this message isn't entirely off topic in this
 RF>  pb conference! ;)
    The only reason mine is on-topic is because the version
 I am currently working on is being transported to
 PowerBASIC 3.1 from QuickBASIC 4.5.  No release of Greedy
 has been in PB so far, though I'm trying to change that!
... Seven Wells On-Line - Makers of Greedy!
--- PPoint 1.96
---------------
* Origin: Seven Wells On-Line * Nashville, TN (1:116/3000.12)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.