PCG, A Family of Better Random Number Generators
21–30 of 57 posts
Re: PCG, A Family of Better Random Number Generators
#22This is fine for quickly generating random numbers for simulations, just don't use it for cryptographic applications. If you want random numbers for crypto use a CSPRNG.
Re: PCG, A Family of Better Random Number Generators
#23Earlier quoted context omitted.
Just as you wouldn't want to use a general purpose PRNG for security applications so too you wouldn't want to use a secure PRNG for general purposes, particularly demanding applications such as Monte Carlo simulations. Your dismissal strikes me as both ignorant and rude.
> Just as you wouldn't want to use a general purpose PRNG for security applications so too you wouldn't want to use a secure PRNG for general purposes, particularly demanding applications such as Monte Carlo simulations. Why not? It's perfectly valid to use a secure RNG for non-secure purposes. As I mentioned, I've used ChaCha20 for those sort of purposes too. And the random number generation barely shows up as a fra…
Re: PCG, A Family of Better Random Number Generators
#24Earlier quoted context omitted.
Just as you wouldn't want to use a general purpose PRNG for security applications so too you wouldn't want to use a secure PRNG for general purposes, particularly demanding applications such as Monte Carlo simulations. Your dismissal strikes me as both ignorant and rude.
> Just as you wouldn't want to use a general purpose PRNG for security applications so too you wouldn't want to use a secure PRNG for general purposes, particularly demanding applications such as Monte Carlo simulations. Why not? It's perfectly valid to use a secure RNG for non-secure purposes. As I mentioned, I've used ChaCha20 for those sort of purposes too. And the random number generation barely shows up as a fra…
It's much slower. Yes, in your application it was a fraction, but they are still much slower than non-secure RNG's.
Re: PCG, A Family of Better Random Number Generators
#25Re: PCG, A Family of Better Random Number Generators
#26Earlier quoted context omitted.
Just as you wouldn't want to use a general purpose PRNG for security applications so too you wouldn't want to use a secure PRNG for general purposes, particularly demanding applications such as Monte Carlo simulations. Your dismissal strikes me as both ignorant and rude.
> Just as you wouldn't want to use a general purpose PRNG for security applications so too you wouldn't want to use a secure PRNG for general purposes, particularly demanding applications such as Monte Carlo simulations. Why not? It's perfectly valid to use a secure RNG for non-secure purposes. As I mentioned, I've used ChaCha20 for those sort of purposes too. And the random number generation barely shows up as a fra…
This gives you both good quality random numbers during the simulation run yet lets others reproduce your results and expand with more results if required.
Re: PCG, A Family of Better Random Number Generators
#27Earlier quoted context omitted.
> Just as you wouldn't want to use a general purpose PRNG for security applications so too you wouldn't want to use a secure PRNG for general purposes, particularly demanding applications such as Monte Carlo simulations. Why not? It's perfectly valid to use a secure RNG for non-secure purposes. As I mentioned, I've used ChaCha20 for those sort of purposes too. And the random number generation barely shows up as a fra…
One of the benefits of a PRNG is reproducibility. If you are doing a monte carlo simulation, then you can get good results while still starting runs from predictable seeds. (e.g. [0,1,2,3,4,...]) This gives you both good quality random numbers during the simulation run yet lets others reproduce your results and expand with more results if required.
Re: PCG, A Family of Better Random Number Generators
#28There is a seminar about PCG from its author available on youtube. https://www.youtube.com/watch?v=45Oet5qjlms Its a bit long but I highly recommend it. I learned a lot about RNGs from it.
Has this something to do with address space randomization?
Re: PCG, A Family of Better Random Number Generators
#29There is a seminar about PCG from its author available on youtube. https://www.youtube.com/watch?v=45Oet5qjlms Its a bit long but I highly recommend it. I learned a lot about RNGs from it.
Re: PCG, A Family of Better Random Number Generators
#30Wow talk about a coincidence - I just implemented this algorithm today as the RNG for some bootstrapped statistic code. One thing I can say is it very fast, but the code for seeding is not great on any platform without /dev/random.
I had been limited in selection on the random number generator reproducibility (so that each planet is only stored as the seed for the generator)
I'll have a try later on, it'd be interesting how a sampling of planets turn out from both rngs, if they are visually different - the rng is used both for features and for the perlin noise that generates cloud&land textures, so any artifact should come up easy in the textures