Pseudorandom number generation: Difference between revisions

Added some initial info for Gen 8 RNG, but this whole page could really be better formatted because it's kind of arbitrary to list one type of RNG for a given process when it's determined by several types of RNG at different stages. Also reworded part of the RNG abuse section.
(→‎Alternative pseudorandom number generator (ARNG): updated to include Ranch Mew and Phione.)
(Added some initial info for Gen 8 RNG, but this whole page could really be better formatted because it's kind of arbitrary to list one type of RNG for a given process when it's determined by several types of RNG at different stages. Also reworded part of the RNG abuse section.)
Line 51: Line 51:
* Individual values in Generation V
* Individual values in Generation V
* AI move decisions in Generation V
* AI move decisions in Generation V
===Xoroshiro===
Found in [[Generation VIII]], {{wp|Xoroshiro128+}} is another type of random number generator used, however this is not the sole form of RNG used, as it is used in tandem with [[Pseudorandom number generation in Pokémon#Cryptographically Secure (CSPRNG or CPRNG)|CSPRNG]].
The following is a non-comprehensive list of instances where this algorithm appears:
* RNG advancements in {{g|Sword and Shield}}
* [[Symbol encounter]], [[random encounter]], [[fishing]], and [[wanderer]] [[personality value]] and [[stat]] generation in {{g|Sword and Shield}}<ref>[https://gist.github.com/Lusamine/e17168d92019672c1f9dcc1a246d9818 Overworld RNG in Gen 8 (SWSH)]</ref>
* [[Pokémon Den]] and [[Dynamax Adventure]] generation in {{g|Sword and Shield}}<ref>[https://github.com/Admiral-Fish/RNGWriteups/blob/master/Gen%208/Raid%20Generation.md Raid Den Generation]</ref>
* Partial [[Egg]] generation in Generation VIII<ref>[https://github.com/Admiral-Fish/RNGWriteups/blob/master/Gen%208/Egg%20Generation.md Egg Generation in Gen VIII]</ref>
* The spawning algorithm in {{g|Let's Go, Pikachu! and Let's Go, Eevee!}}<ref>[https://gist.github.com/Lusamine/c9c6be1287daa3aff2c5010a01d662f7 LGPE Spawning Algorithm]</ref>
* AI move decisions in {{g|Brilliant Diamond and Shining Pearl}}
===Xorshift===
Found in [[Generation VIII]], {{wp|Xorshift}} is another type of random number generator used, however this is not the sole form of RNG used, as it is used in tandem with [[Pseudorandom number generation in Pokémon#Cryptographically Secure (CSPRNG or CPRNG)|CSPRNG]].
The following is a non-comprehensive list of instances where this algorithm appears:
* [[Trainer ID]] and Secret ID generation in {{g|Brilliant Diamond and Shining Pearl}}
* Pokémon generation in {{g|Brilliant Diamond and Shining Pearl}}
===Cryptographically Secure (CSPRNG or CPRNG)===
Found in [[Generation VIII]], {{wp|Cryptographically secure pseudorandom number generator|Cryptographically secure RNG}} is another type of random number generator used, however this is not the sole form of RNG used, as it is used in tandem with [[Pseudorandom number generation in Pokémon#Xorshift|Xorshift]] or [[Pseudorandom number generation in Pokémon#Xoroshiro|Xoroshiro]].
Notably, this type of random number generator is not possible to RNG abuse due to its nature.
The following is a non-comprehensive list of instances where this algorithm appears:
* Initial seeding in {{g|Let's Go, Pikachu! and Let's Go, Eevee!}} and [[Generation VIII]]
* [[Trainer ID]] and Secret ID generation in {{g|Let's Go, Pikachu! and Let's Go, Eevee!}}, {{g|Sword and Shield}}, and {{g|Legends: Arceus}}
* [[Personality value]] generation in {{g|Let's Go, Pikachu! and Let's Go, Eevee!}}
* Non-overworld [[Legendaries]], [[Curry]], and scripted encounters in {{g|Sword and Shield}}
* [[Egg]] seeding and individual rolls in Generation VIII<ref>[https://github.com/Admiral-Fish/RNGWriteups/blob/master/Gen%208/Egg%20Generation.md Egg Generation in Gen VIII]</ref>


==RNG abuse==
==RNG abuse==
Line 61: Line 91:
In [[Generation III]] and Generation IV, there are some limitations. As a player's [[Trainer ID|Trainer ID and Secret ID]] numbers determine a Pokémon's shininess, Shiny Pokémon generated through certain methods can only have certain individual values. Due to [[Wonder Card]] gifts using a timer register to create personality values, it is not possible to manipulate a gift's Nature. In Generation V, this is no longer the case as the individual values and personality values are determined from two different RNGs.
In [[Generation III]] and Generation IV, there are some limitations. As a player's [[Trainer ID|Trainer ID and Secret ID]] numbers determine a Pokémon's shininess, Shiny Pokémon generated through certain methods can only have certain individual values. Due to [[Wonder Card]] gifts using a timer register to create personality values, it is not possible to manipulate a gift's Nature. In Generation V, this is no longer the case as the individual values and personality values are determined from two different RNGs.


In the Pokémon fandom, RNG abuse is slightly controversial. Proponents note that RNG abuse does not require a third-party device and that the Pokémon obtained through RNG abuse can be obtained through normal gameplay. In addition, Pokémon obtained through RNG abuse have been used at the {{DL|Play! Pokémon|Video Game Championships}}, an official tournament. They also say that RNG abuse is very complicated, and not as simple as typing a cheat code. However, some players believe that RNG abuse is cheating, as the action of picking a Pokémon's characteristics is similar to using a [[cheating]] device. Opponents of RNG abuse claim that it gives those who can RNG an unfair advantage, however the proponents say that with RNG everyone can have the best stats, and therefore no one will have an unfair advantage by catching a Pokémon that happens to be better.
In the Pokémon fandom, RNG abuse is slightly controversial. RNG abuse largely does not require third-party devices or custom firmware, and the Pokémon obtained through RNG abuse can be obtained through normal gameplay, with only [[Appendix:Fan terminology#Legal|Legal]] values. In addition, Pokémon obtained through RNG abuse have been permitted at the {{DL|Play! Pokémon|Video Game Championships}}, as the rules do not explicitly disallow Pokémon obtained in this manner, with some participants reporting that event staff permitted their use even with admission of having performed RNG abuse.<ref>[https://gamefaqs.gamespot.com/boards/661226-pokemon-black-version-2/65249276 "Nintendo staff confirms RNG being allowed at VGC tournaments"]</ref> RNG abuse also requires a degree of preparation, effort, and skill, as the player is required to learn and use various tools and programs to calculate how to obtain a Pokémon with specific attributes, whereas using a cheat device or editing software can grant a Pokémon with specific attributes nearly instantly, and unlike RNG abuse, would permit [[Appendix:Fan terminology#Illegal|Illegal]] values.
 
However, some players believe that RNG abuse is cheating, as the action of picking a Pokémon's characteristics directly is similar to using a cheat device. Opponents of RNG abuse claim that it gives those who can RNG an unfair advantage, however the proponents say that with RNG everyone can have the best stats, and therefore no one will have an unfair advantage by catching a Pokémon that happens to be better.


==External links==
==External links==
Line 69: Line 101:
* [http://smogon.com/ingame/rng/dpphgss_rng_intro Smogon's explanation and guide on Generation IV RNG Abuse]
* [http://smogon.com/ingame/rng/dpphgss_rng_intro Smogon's explanation and guide on Generation IV RNG Abuse]
* [http://smogon.com/ingame/rng/bw_rng_intro Smogon's explanation and guide on Generation V RNG Abuse]
* [http://smogon.com/ingame/rng/bw_rng_intro Smogon's explanation and guide on Generation V RNG Abuse]
==References==
{{reflist}}


{{Project Games notice|game mechanic}}
{{Project Games notice|game mechanic}}
1,546

edits