How to Create a Random Generator

random

How could a random generator be implemented?

I'm not speaking about the invocation of a language mathRandom() method, but the implementation of the routines that lead to generate numbers totally random.

Best Answer

The key for a truly random number is random data source. Sometimes this is information such as delays in keyboard events or network events. Where high quality random data is desired, it may be radioactive decay. SGI implemented lavarand which drew its seed for a random number generator from a digitized image of a lava lamp. This was sufficient for being considered a random number generator.

Outside of truely random data, one can work with a deterministic but chaotic system. For example, the mersenne twister. In these situations, one seeds the generator with a number and then runs it forward to get pseudo-random numbers. These are sufficient for games and the like where it isn't critical if someone can determine the seed (and the next number in the sequence).

Consider reading patent 5,732,138 and http://www.lavarnd.org/ for the implementation details on how to make a number.