Pseudorandom Number Generator

Source code for the RNG function: Lua or JavaScript

Set a seed and generate a sequence of pseudorandom numbers using the Linear congruential generator.

LCG is a simple, fast and reliable method for generating pseudorandom numbers. LCG is a great choice for generating pseudorandom numbers, however, it is not cryptographically secure.

For comparison, you can also generate a sequence of pseudorandom numbers using the Middle-square generator.

MSM is a simpler, but far less reliable method as it is bound to begin repeating a sequence or a number indefinitely at some point, at which point there's no resemblance of randomness.

Interesting seed values for MSM that demonstrate repeating patterns: 12345678933, 12345679001, 12745678161, 22745678162.

How to read the results:
The histogram at the top of the image shows the frequency distribution of the generated values. The more evenly distributed and the closer the min and max values are to each other, the better.

The random map below the histogram shows the patterns in the random generation. If you can see any visual patterns, i.e. repetition, then the random generation has failed.