Stable Random Number Generator?
Hi. What would be a good library if I want a pseudo-RNG which is stable across platforms and compiler versions? By "stable" I mean always produces the same values after being given a particular seed. I have a number of projects which involve generating some kind of pattern or graphic, where the algorithm is either fed values from a RNG, or starts with initial conditions generated by an RNG. So, I want an RNG which which produce the same results when different users on different systems enter the same seed. -- https://qlfiles.net My PGP public key ID is 0x340EA95A (pgp.mit.edu).
My recommendation in the past, and now, continues to be this: If you want something stable then use something that implements a standard. I believe MWC generators implement a standard (up to you if you like them). The DRBG package Hash and HMAC generators implement a standard. The stream ciphers available on Hackage all implement a well specified unchanging algorithm and produce a stream of random bits from a seed (ChaCha20 from cryptonite, AES-CTR from many places, etc etc). -Thomas On Fri, Sep 9, 2016 at 8:12 PM, Christopher Howard <ch.howard@zoho.com> wrote:
Hi. What would be a good library if I want a pseudo-RNG which is stable across platforms and compiler versions? By "stable" I mean always produces the same values after being given a particular seed. I have a number of projects which involve generating some kind of pattern or graphic, where the algorithm is either fed values from a RNG, or starts with initial conditions generated by an RNG. So, I want an RNG which which produce the same results when different users on different systems enter the same seed.
-- https://qlfiles.net My PGP public key ID is 0x340EA95A (pgp.mit.edu).
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Jerzy Karczmarzcuk has often mentioned ergodic functions on this mailing list which have the stability properties you are after, and for the generation of graphics and the like their "not quite randomness" should have no dishonour. You should be able to crib the one (written in Clean) from this paper. https://karczmarczuk.users.greyc.fr/arpap/texturf.pdf On 10 September 2016 at 04:12, Christopher Howard <ch.howard@zoho.com> wrote:
Hi. What would be a good library if I want a pseudo-RNG which is stable across platforms and compiler versions? By "stable" I mean always produces the same values after being given a particular seed. I have a number of projects which involve generating some kind of pattern or graphic, where the algorithm is either fed values from a RNG, or starts with initial conditions generated by an RNG. So, I want an RNG which which produce the same results when different users on different systems enter the same seed.
-- https://qlfiles.net My PGP public key ID is 0x340EA95A (pgp.mit.edu).
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
I agree with the answers so far. I just want to warn you away from the default Random class instances for basic datatypes from the random package. They are not guaranteed stable across library versions. Their implementations have changed. On Sep 10, 2016 4:08 AM, "Stephen Tetley" <stephen.tetley@gmail.com> wrote:
Jerzy Karczmarzcuk has often mentioned ergodic functions on this mailing list which have the stability properties you are after, and for the generation of graphics and the like their "not quite randomness" should have no dishonour.
You should be able to crib the one (written in Clean) from this paper. https://karczmarczuk.users.greyc.fr/arpap/texturf.pdf
On 10 September 2016 at 04:12, Christopher Howard <ch.howard@zoho.com> wrote:
Hi. What would be a good library if I want a pseudo-RNG which is stable across platforms and compiler versions? By "stable" I mean always produces the same values after being given a particular seed. I have a number of projects which involve generating some kind of pattern or graphic, where the algorithm is either fed values from a RNG, or starts with initial conditions generated by an RNG. So, I want an RNG which which produce the same results when different users on different systems enter the same seed.
-- https://qlfiles.net My PGP public key ID is 0x340EA95A (pgp.mit.edu).
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (4)
-
Christopher Howard -
Ken Bateman -
Stephen Tetley -
Thomas DuBuisson