Open main menu

Bulbapedia β


Pseudorandom number generation in Pokémon

349 bytes added, 02:31, 6 June 2009
no edit summary
A '''pseudo-random number generator''' is an electronic device or software's attempt at creating a sufficiently random number. Computers are not designed to be random, and cannot yet be truly 'random' on their own. In order to generate 'random' events in games and other forms of software, they must get as close to looking it as they can. There are limitless ways of accomplishing this. The degree of sufficientapparent randomness depends on the ability to predict the next result of the algorithm.
First the generator must have a seed, a number to start with. This number is usually a date & time referring to the first time the algorithm is called during the usage of the device or the software's active session. Seeds are also occasionally derived from user input, as it is highly improbable to do the exact same thing more than once, making it appear 'random'.
This number is put through a complex algorithm and the result is formatted according to the needed context. The raw result then becomes the seed for any subsequent uses of the random generator. Therefore the nature of the generator is a recursive algorithm.