|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Random numbers from random numbers... Re: [question] On the topicof
My contribution on this one: If you're using a computer to generate pseudo-random numbers, the best you'll get is using the output of time() for srand() and using rand(). rand simply produces a fixed sequence of values starting from the seed. Fancy srand() procedures only start you at a different point of the sequence, but don't change the "randomness", ie distribution of the numbers. What you *can* improve is using a better generator function. An example is random() which often exists on Unixes. This has a bigger period and the lower bits are better behaved as well (the lower bits of rand() are not well distributed). I think there's also a Gnu package somewhere that will produce random numbers based on various probability distribution to save you that work as well. If you *really* want something different, buy a copy of some statistical tables from any academic bookshop which will have random number tables in the back for various probability distributions. The statistics tables will also give you exact details of any probability distribution you're interested in. What exactly do you mean by "predictability" of your random numbers? You don't seem to mean what probability distribution the follow, but instead you seem to be trying to actually predict the next number that comes up? Have a look for the Gambler's Fallacy if that's what you're trying to do :]. More info? Hope this helps. Kev ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|