Has your pseudo random number generator (PRNG) never been random?

Have you ever written simulations or randomized algorithms in which you ran into a problem due to the quality of the (pseudo) random numbers you used?

What's happening?

How did you find / understand that your problem is related to the problem?

Is PRNG switching enough to fix the problem, or did you have to switch to the source of true randomness?

I'm trying to figure out what types of applications require someone to worry about the quality of their source of randomness and how this is realized when it becomes a problem.

+4
source share
2 answers
  • The RANDU random number generator was notorious in the seventies for creating "bad" random numbers. My PhD researcher noted that this affected his doctorate, and he had to repeat the simulation. A Google search for a RANDU linear congruent generator leads to other examples.
  • When I run simulations on several machines, sometimes I am tempted to generate "random seeds", and not just use my own parallel random number generator. For example, generate a seed using the current time in seconds. It caused me enough problems, and I avoid it at all costs.

This is mainly due to my special interests, but in addition to parallel computing, the thought of creating my own random number generator will never cross my mind. Calling a well-tested random number function is trivial in most languages.

+3
source

Itโ€™s good practice to use your prng for DieHard . A very good and fast PRNG exists at present (see Marsaglia Work), see the โ€œNumerical Recipesโ€ edition 3 for a good introduction.

+1
source

Source: https://habr.com/ru/post/1340896/


All Articles