Incinerator Drone: Difference between revisions
Appearance
moving m2k2 info to wiki |
No edit summary |
||
| Line 23: | Line 23: | ||
There are 301 possible durations (numbers of frames) for the first round and 601 possible durations for the rest. Since there are 65536 possible random numbers, each duration for the first round should correspond to about 218 different random numbers, and each duration for the rest should correspond to about 109 different random numbers. | There are 301 possible durations (numbers of frames) for the first round and 601 possible durations for the rest. Since there are 65536 possible random numbers, each duration for the first round should correspond to about 218 different random numbers, and each duration for the rest should correspond to about 109 different random numbers. | ||
==Best possible RNG== | ===Best possible RNG=== | ||
For the rounds other than the first, the there are 109 initial random numbers (0-65535) that result in the minimum number of frames (900), which are 0-128. For the first round, however, it turns out that there is only 1 initial random number that results in the minimum number of frames (480), which is 0. This is due to the nature of floating-point arithmetic. The probability of getting a perfect round is thus 1/65536 for the first round and 109/65536 for the other three rounds, for an overall probability of (1)*(109)^3 / (65536)^4, or (109^3) / (2^64), or about 7.02e-14, or about 1 in 14 billion. | For the rounds other than the first, the there are 109 initial random numbers (0-65535) that result in the minimum number of frames (900), which are 0-128. For the first round, however, it turns out that there is only 1 initial random number that results in the minimum number of frames (480), which is 0. This is due to the nature of floating-point arithmetic. The probability of getting a perfect round is thus 1/65536 for the first round and 109/65536 for the other three rounds, for an overall probability of (1)*(109)^3 / (65536)^4, or (109^3) / (2^64), or about 7.02e-14, or about 1 in 14 billion. | ||
==Worst possible RNG== | ===Worst possible RNG=== | ||
For the rounds other than the first, there are only 2 initial random numbers (0-65535) that result in the maximum number of frames (1500), which are 65534-65535. For the first round, there is again only 1 initial random number that results in the maximum number of frames (780), which is 65535. The probability of getting the worst possible round is thus 1/65536 for the first round and 2/65536 for the other three rounds, for an overall probability of (1)*(2)^3 / (65536)^4, or 1 / (2^61), or about 4.34e-19, or about 1 in 2.3 quintillion. | For the rounds other than the first, there are only 2 initial random numbers (0-65535) that result in the maximum number of frames (1500), which are 65534-65535. For the first round, there is again only 1 initial random number that results in the maximum number of frames (780), which is 65535. The probability of getting the worst possible round is thus 1/65536 for the first round and 2/65536 for the other three rounds, for an overall probability of (1)*(2)^3 / (65536)^4, or 1 / (2^61), or about 4.34e-19, or about 1 in 2.3 quintillion. | ||
==Everything in between== | ===Everything in between=== | ||
This [https://github.com/Skull64/metroid-rocks/tree/master/i_drone code] calculates the probability of I-Drone taking every possible number of frames. It also displays the cumulative probability of it taking all numbers of frames less than or greater than every possible number of frames. | This [https://github.com/Skull64/metroid-rocks/tree/master/i_drone code] calculates the probability of I-Drone taking every possible number of frames. It also displays the cumulative probability of it taking all numbers of frames less than or greater than every possible number of frames. | ||