Puzzled about random initialisation

Paul Rubin http
Thu Jul 8 14:21:05 EDT 2004


Robin Becker <robin at reportlab.com> writes:
> I get dirrent draws for each run even when the system time doessn't
> differ bu much. I'm puzzled exactly how the random generator is being
> initialised.

The rng has complicated internal state that's initialized completely
different if the seeds are even slightly different.  If you want to
study the algorithm, google on "mersenne twister".  The random module
is not random enough for the most demanding applications, particularly
those where someone who has studied the algorithm might be trying to
predict the output, for example online games being played for large
real prizes.  But it should be good enough for most stuff like
physical simulations.



More information about the Python-list mailing list