[issue9816] random.jumpahead and PRNG sequence independence

Raymond Hettinger report at bugs.python.org
Fri Sep 10 11:41:43 CEST 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Thanks for the report.  Something does appear to be broken.  When the states are different, the random numbers should be different.  Am looking in to it.

In the mean time, I recommend against using jumpahead() with MT.  It is better to separately seed three different generators and rely on the huge period of MT to keep the sequences from overlapping.

If you do use jumpahead(), it is intended to be supplied with large values of n (not 1, 11, or 21).

The function/method was removed in 3.x because it was an API defect.  The jumpahead concept as originally intended (move ahead n-steps) was something that could really only work with a generator like Wichmann-Hill.  Newer and more advanced generators aren't usually amenable to direct computation of a state that is n-steps forward.

----------
priority: low -> high

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9816>
_______________________________________


More information about the Python-bugs-list mailing list