From: Anders Edin (anders.edin_at_[hidden])
Date: 2004-07-12 02:37:09
> One of the important characteristics of a pseudo random number
> generator is, oddly enough, determinancy. Given the same seed, you get
> the same sequence and can therefore reproduce the exact same results.
> This allows results to be checked and bugs to be tracked down reliably.
Well, this is of course fine for debugging. However, when running a simulation
shouldn't you rather think of statistics than of finding bugs?
> If another thread, or just a library used by your application (for
> example, something that uses a pseudo-random numbers for dithering a
> graphic display), was using the same singleton engine as your
> application this characteristic would be lost. The number of values
> drawn by the other parts of your system might change or reseeding of
> the engine might happen without your knowledge.
If you use one generator of the same type in each thread, but within the same
simulation application, how do you know that the different threads are not
correlated in the statistics sense? Do you set the seeds far apart? If one is
not careful the random distribution produced by the application is not the
one you thought it would be.
As before the application I have in mind is physics simulations. If you use
random numbers for something else perhaps the needs are different.
-- Anders Edin, Sidec Technologies AB
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk