[issue9816] random.jumpahead and PRNG sequence independence

Joseph Schaeffer report at bugs.python.org
Sat Sep 11 02:18:48 CEST 2010


Joseph Schaeffer <thiryal at gmail.com> added the comment:

Thanks for looking into it! I'm glad that issue will be fixed, as at least one website was actually recommending using .jumpahead(i) for i in 1..100 for independent seed. 

I suspect in my use case I'll want to continue my previous methods; I work with stochastic Markov processes and I need to seed a large number (10k+) of generators - one per trajectory - and also have the requirement of needing a deterministic PRNG. So having a single Mersenne Twister seed plus salting values that worked with .jumpahead would be a simpler representation; my previous code in C did basically that with a LCG to create those seeding values for the Mersenne Twister. So that's roughly equivalent [I think?] to the fixed random.jumpahead. 

Thanks again!

----------

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


More information about the Python-bugs-list mailing list