Jump to content

RNG correlation (Generation I): Difference between revisions

→‎Effect on the catch rate: Fixed a long overdue typo.
>Bbbbbbbbba
(Added a graph to further confuse readers (hopefully not). Probably takes too much space (if only we have PDFEmbed, maybe I could have handled the size better), but everything below that is "for nerds" anyway. (Wait, aren't we all nerds?))
(→‎Effect on the catch rate: Fixed a long overdue typo.)
Line 31:
For example, consider Tauros in the Safari Zone. Without throwing bait or rock, C is 45, and a typical value of F is 87 (it can vary a little depending on the max HP of Tauros). Therefore the success rate of each Safari Ball should be (46 / 151) * (88 / 256) ≈ '''10.472%'''. However, simulation shows that, due to RNG correlation, the actual catch rate is only about '''6.633%'''.
 
In fact, this is close to the most devastating effect RNG correlation can have on the catch rate. When the first RNG value tried in the rejection sampling is between 0 and 150, the probability 10.472% should be accurate. Meanwhile, when the first RNG value tried is not between 0 and 150, the probability of success drops to about 1.113%. In general, the catch rate with RNG correlation is at least 151/225256 ≈ 59% of the "ideal" catch rate.
 
Some concrete analysis will illustrate why the effect is so large in this case. Experiment shows that each iteration of the rejection sampling takes 516 cycles (2.015625 rDIV periods), and there are 23960 cycles (93.59375 rDIV periods) between the last RNG call in the rejection sampling and the RNG call for the second random byte.<ref>Thanks entrpntr for those numbers.</ref> Assuming that the rejection sampling did not get 0 ~ 150 on the first try, we can consider the last three RNG calls:
Cookies help us deliver our services. By using our services, you agree to our use of cookies.