jeudi 19 octobre 2017

How can I generate a gaussian distribution from a hash?

I want to replace an existing random number based data generator (in Python) with a hash based one so that it no longer needs to generate everything in sequence.

I can use the integer version of the hash to create a flat number range, just by taking the modulus.

I can create a float from 0 to 1 by dividing it by the maximum integer value of a hash.

How could I use the hash to create a gaussian-distributed floating point value? Should I just use the random library and feed the hash in as the seed?

Aucun commentaire:

Enregistrer un commentaire