Re:PCG, A Family of Better Random Number Generators
by vtsrh on Wednesday July 15, 2015 @06:03AM
(#9890528)
This is great, but everything so far is overly positive. Can we get some negative criticism as well. Anyone qualified?
[ Parent
| on HN ]
Re:PCG, A Family of Better Random Number Generators
by yoklov on Wednesday July 15, 2015 @11:04AM
(#9891633)
I'm not really qualified to speak as to its statistical properties, but I've used this generator a couple times.
The biggest downside I ran into is that it requires 64 bit numbers even for the 32 bit RNG, which means its very simple code becomes more complex on a platform with only 32 bit numbers, or in a scripting language. Also, it's not a CSPRNG, if this matters to you.
This is minor though, and I would use it again. It's flexibility for seeding and easy serialization outweigh this IMO (and it's still simple compared to e.g. mtrand)
Re:PCG, A Family of Better Random Number Generators
by dhekir on Wednesday July 15, 2015 @11:56AM
(#9892003)
I must have done something wrong, but I tried the basic C implementation (https://github.com/imneme/pcg-c-basic) on a quick Diehard-like test and it failed. I'm still trying to understand why. Probably not its fault, just that the code is not as forgiving and ready-to-consume as I had expected.
Re:PCG, A Family of Better Random Number Generators
by vtsrh on Wednesday July 15, 2015 @12:26PM
(#9892243)
It passed for me. Where did you get the diehard test? If you compiled it directly from http://www.stat.fsu.edu/pub/diehard/ then it is because that source is broken.
Re:PCG, A Family of Better Random Number Generators
by panax on Wednesday July 15, 2015 @08:09PM
(#9894866)
Try using Dieharder. It incorporates most of the Diehard tests, as well as other tests and is much more rigorous.
sudo apt-get install dieharder
http://www.phy.duke.edu/~rgb/General/dieharder.php
If you make a GSL interface for the RNG it will make using dieharder much easier
Re:PCG, A Family of Better Random Number Generators
by vtsrh on Thursday July 16, 2015 @01:18AM
(#9895587)
How do you build dieharder on windows? I guess you just don't...
Re:PCG, A Family of Better Random Number Generators
by dhekir on Thursday July 16, 2015 @02:18AM
(#9895692)
I actually tried a modified OCaml implementation of a very simple test. The issue is probably due to bad seeding/initialization: if I use the given static seed, it passes, but if I try to provide any other seed, it fails on at least one test.
I'll try to find a more complete/better tested port, or try to do it myself.