Pseudorandom number generation: Difference between revisions

Section headers
(Section headers)
Line 1: Line 1:
== What is a pseudo-random number generator? ==
A '''pseudo-random number generator''' is an electronic device or software's attempt at creating a sufficiently random number.  There are limitless ways of accomplishing this.  The degree of sufficient randomness depends on the ability to predict the next result of the algorithm.
A pseudo-random number generator is an electronic device or software's attempt at creating a sufficiently random number.  There are limitless ways of accomplishing this.  The degree of sufficient randomness depends on the ability to predict the next result of the algorithm.


==Mechanics==
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.
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.


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.
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.


'''More information on this topic can be found at: {{wp|Pseudo-random number}}
==In Pokémon==
 
== How pseudo-random numbers are generated in Pokémon ==


Let ''Seed'' be a number between 0 and 0xFFFFFFFF or the ''Result'' of a previous call to the equation.
Let ''Seed'' be a number between 0 and 0xFFFFFFFF or the ''Result'' of a previous call to the equation.
Line 33: Line 31:
* Determining the Pokémon in the Trophy Garden.
* Determining the Pokémon in the Trophy Garden.
* Mystery Gift shiny restriction for Type 1 Wondercard Pokémon (currently all released with variable natures).
* Mystery Gift shiny restriction for Type 1 Wondercard Pokémon (currently all released with variable natures).
==See also==
* {{wp|pseudo-random number generation}}


[[Category:Game mechanics]]
[[Category:Game mechanics]]