http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random numbers from random numbers... Re: [question] On thetopicof



On Thu, 25 Nov 1999, Kevin Shea wrote:

> 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.

Yup. Am aware of this. Most people contributing snippets of source/code
are using this method currently. Take same stream and use a different seed
and wrapper to move further along the stream... but the stream will loop
after a while.

> 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.

One of my co-workers has mentioned or suggested I join the PRNG mailing
list... (pseudo-random-number-generator). They have some pretty
complicated algorithms which generates numbers that does a good job of
mimicking random numbers with an extremely long period before looping
occurs.

> 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?

I don't mean to try to predict the numbers, but with pseudo-random
numbers, the pattern is predictable eventually or in part. Trying to find
some way of altering the level of noise/randomness introduced.

I'm also aware of the gamblers' fallacy... :) I think it is the basis for
roullete. ;)

Thanks, it does, Kev. 

Wing. (Wonder when will the looping stop? ^_^;)

=================================================================
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