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: [question] On the topic of randomness.



The standard reference for this question is "Seminumerical Algorithms"
which is Volume 2.0 of the "Art of Computer Programming" by Donald E.
Knuth. ISBN 0-201-03822-6 the first 170 pages of the book cover random
numbers, what they are, how do generate them, how to measure randomness,
and so on.

Laguna Loire wrote:
> 
> Hi All,
> 
> A question that popped up as I was contemplating the randomness of the
> quick picks for those state lotteries:
> 
> Just what exactly is randomness and can the level of randomness in a
> series of numbers or from the output of a generator be measured?
> 
> Just wondering since I'm assuming that if one keeps drawing marbles from a
> bag, that the predictability of the marbles drawn eventually becomes
> predictable, and thus is no longer truly random. Ie, the randomness of the
> pool has been used up or reduced.
> 
> So what exactly is randomness, can it be measured, and can the level of
> randomness be varied?

There are several answers "what is randomness." The simplest is that
someone who doesn't know what is going on can not predict what the next
value that is going to be generated. A more complex one is that a
sequence of random events is one that has all the properties of a random
sequence. (I hate self referential definitions...)

Randomness can be measured and the level of randmoness can be varied.
The book I mentioned above has very accurate methods for measuring the
quality of a random number generator. And, it has examples of how to
generate most of the standard statistical distributions using a uniform
random number generator.

In statistical programming and simulation you need to be aware that many
of the standard "rand" like functions provided in standard libraries are
actually pretty poor. On the other hand, in game programming it used to
be standard practise to use a table of 256 random numbers and just cycle
through it (256 elements so you could do an & to wrap the index.) This
is a very fast method for generating random numbers and is often good
enough.

			Bob P.

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