Phantoon RNG

Beastworm Jan 25th, 2020 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from:
  4. Phase 1:
  5. - Left or Right direction doesn't matter for which pattern (slow, mid or fast) you get.
  7. - The pattern is decided by looking at the frame counter (increases by 1 every frame since your last reset or so),
  8.   not the RNG accumulator.
  10. - Since it uses 4 values (looking at bit 2 and 3 of the frame counter), we get the following possible results:
  11.   slow, fast, mid, slow.  So there's 50% chance it'll pick slow, and 25% for fast and mid.
  13. Phase 2:
  14. - The game does two things when Phase 2 starts, first it generates a new random number to decide the direction
  15.   (0 = left, 1 = right), then it generates a new random number to decide the pattern (a number between 0-7).
  16.   This number is then indexed into an array of patterns, that goes like this: slow, fast, mid, slow, mid, fast, mid, slow.
  18. - By looking only at the array, it would seem like 2/8 is fast, 3/8 is mid and 3/8 is slow.
  20. - The reason we get not-so-random results for the second phase, is due to the AI generating two new random numbers in the
  21.   same frame. When doing it twice in a row like that, the two values will be highly correlated. Basically, an even number on
  22.   the first one will usually generate an odd number on the next one.  So. If the first number is even (meaning left), the second
  23.   number is usually odd, and it can then only pick fast, slow, fast or slow. And similar idea if it chooses to start on the
  24.   right side.
  26. - I've simulated every possibly RNG seed (with seeds you will get in the game) and have found the following percentages for phase 2:
  28. left:
  29. - slow = 24.87
  30. - mid = 0.70
  31. - fast = 24.52
  33. right:
  34. - slow = 12.76
  35. - mid = 36.80
  36. - fast = 0.35
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand