[Python-Dev] Time for a change of random number generator?

Robert Kern robert.kern at gmail.com
Fri Feb 12 06:28:05 EST 2016


On 2016-02-12 04:15, Tim Peters wrote:
> [Greg Ewing <greg.ewing at canterbury.ac.nz>]
>> The Mersenne Twister is no longer regarded as quite state-of-the art
>> because it can get into states that produce long sequences that are
>> not very random.
>>
>> There is a variation on MT called WELL that has better properties
>> in this regard. Does anyone think it would be a good idea to replace
>> MT with WELL as Python's default rng?
>
> I don't think so, because I've seen no groundswell of discontent about
> the Twister among Python users.  Perhaps I'm missing some?

Well me, but I'm mostly focused on numpy's PRNG, which is proceeding apace.

   https://github.com/bashtage/ng-numpy-randomstate

While I am concerned about MT's BigCrush failures, what makes me most 
discontented is not having multiple guaranteed-independent streams.

> It's prudent to wait for someone else to find the early surprises in
> PCG and Random123 too ;-)

Quite so!

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco



More information about the Python-Dev mailing list