Page 1 of 1

Random seeds

Posted: Fri Apr 23, 2010 11:54 am
by ted
One conceptual weed that keeps popping up is the notion of using something like the system clock as a source of seeds for pseudorandom number generation. Not a good idea. If your purpose is research, you don't want simulation results to depend on stuff that is not under your explicit control. The system clock is a prime example of something that is outside of your control. It may be OK for demonstration purposes but it is not a good strategy for introducing randomness into a model when you are involved in serious work such as development, debugging, or "production" ("generation of publishable results"). It destroys the ability to reproduce the results of any particular run. Worse, it destroys the ability to detect whether any change you make to your program broke anything, because you will not be able to compare results against the known output of a "good implementation." It is much better to create a set of random seeds in advance, store them in a file for future use, and read them from that file when needed.

Here's an intelligent discussion of truly random numbers ... _generator
and here are some useful links ... l_Deviates