Mail Archives: djgpp/1999/04/05/15:18:23
Ike Gingerich wrote:
> I noticed that the functions that come with DJGPP for
generating random numbers always spit out the random numbers in
>the same sequence each time the program is run.
Ike:
What you're seeing is a consequence of using a computer. In
general, this is, in fact a Very Good Thing (tm). Most of us
first encounter pseudo random numbers in the context of rolling
dice or some such thing. To us at that time, we see the
deterministic pattern of p-random numbers as "bad." However,
this is not the case.
Suppose that you are doing an AI to play Blackjack. How do you
know how well it does, in comparison to your previous versions?
The best way is to feed the various versions the same shoe
(usually 8 decks of cards), which you generate by (surprise)
using the system's p-random generator. That way, you can compare
your simulation using a predictable dataset, so that you can make
meaningful comparisons regarding performance.
Charles
- Raw text -