swinch

Ultra Jump Math

Sep 20th, 2018
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. SMRPG Expected # of Ultra Jumps
  2. ----------------------------------
  3.  
  4. Intro
  5. ----------------
  6. Just a bit of forewarning, there are some mathematical concepts involved. Feel free to skip the intro and math sections if this is a "no math" paste. Ultra Jumps have a probability of 1/N where N is the number of enemies on the screen. I think we all assumed that. The question becomes how many times will I expect to hit N enemies where I have to hit each enemy Y_1, Y_2, Y_3, ... Y_N number of times depending on the enemy. A lot of the times the number of times is the same such as "hit each Axem ranger at least once", but there are cases where the amount of times you have to hit each ranger matters. Looking at you Axem Pink.
  7.  
  8. Relevant Peach Chart 1.08 Results
  9. ---------------------------------
  10. "land on each Axem Ranger at least once": 7.33333 additional jumps
  11. "land on each Axem Ranger at least once, landing on Pink 4 times": 13.2986 additional jumps
  12. "land on each enemy on Countdown at least once": 4.5 additional jumps
  13. "land on Gunyolk and Factory Chief at least once": 2 additional jumps
  14.  
  15. Math (optional)
  16. -------------------------------------
  17. This Ultra Jump problem follows something called a geometric distribution. Feel free to google this if you want to know more about this in depth. The most important thing about the geometric distribution is that it has a property called the "memoryless property". You just Ultra Jumped on Axem Black? The game doesn't care. You have the same chance to land on any of the Axem Rangers regardless of who you landed on before. At any point, calculate the probability "p" that you will land on whatever it is you needed. The expected amount of trials is 1/p.
  18. Small proof of this fact:
  19.  
  20. With probability p, our number of attempts is 1. Hence, p*1.
  21. With probability (1-p), we fail the first attempt, so our number of attempts is E[X] + 1 (since the geometric distribution is memoryless, and we've failed once already). Hence, (1-p)*(E[X] + 1). This accounts for all possibilities.
  22. E[X] = p*1 + (1-p)*(E[X] + 1)
  23.  
  24. Distribute (E[X] + 1).
  25. E[X] = p + (1-p)*E[X] + (1-p)*1
  26.  
  27. Subtract (1-p)*E[X] from both sides.
  28. E[X] - (1-p)*E[X] = p + 1 - p
  29.  
  30. Factor out E[X] from both left-hand side terms. Simplify right-hand side.
  31. E[X](1 -(1-p)) = 1
  32.  
  33. Simplify parenthesis of left-hand side.
  34. E[X](p) = 1
  35.  
  36. Divide by p.
  37. E[X] = 1/p
  38.  
  39. But... The best way to understand this concept is to jump right into a calculation:
  40.  
  41. "land on each Axem Ranger at least once":
  42. The unique thing about ultra jumps is that you fix the first jump.
  43.  
  44. Probability that you uniquely land on 1 of the Axem Rangers given you already landed on 0 : 1
  45. Probability that you uniquely land on 1 of the Axem Rangers given you already landed on 1: 3/4
  46. Probability that you uniquely land on 1 of the Axem Rangers given you already landed on 2: 2/4
  47. Probability that you uniquely land on 1 of the Axem Rangers given you already landed on 3: 1/4
  48. Probability that you uniquely land on 1 of the Axem Rangers given you already landed on 4+: 0/4
  49.  
  50. Note that each of these are separate geometric distributions that end directly after the one before it found success.
  51.  
  52. Expected jumps needed to uniquely land on 1 of the Axem Rangers given you already landed on 0 : 1/1
  53. Expected jumps needed to uniquely land on 1 of the Axem Rangers given you already landed on 1: 1/(3/4) = 4/3
  54. Expected jumps needed to uniquely land on 1 of the Axem Rangers given you already landed on 2: 1/(2/4) = 2
  55. Expected jumps needed to uniquely land on 1 of the Axem Rangers given you already landed on 3: 1/(1/4) = 4
  56. Expected jumps needed to uniquely land on 1 of the Axem Rangers given you already landed on 4+: 0/4 = 1/(0/4)... could say this tends towards infinity, but you already accomplished your goal.
  57.  
  58. Finally subtract out the first jump since it is a given.
  59.  
  60. Adding those jump times together gives you 1+4/3 +2 + 4 -1 = 7.33333333 jumps.
  61.  
  62.  
  63. Please contact me if you have issues or concerns with the results or want to know more.
  64. swinch
Add Comment
Please, Sign In to add comment