Exarion

Sapphire AI guide

Nov 2nd, 2016
1,614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. TABLE OF CONTENTS
  2. I. Basic AI principles
  3. II. AI by fight
  4. III. Notes by fight
  5.  
  6. NOTE: Sapphire's code has been only partially disassembled, so this guide is based mostly on observations and may not be 100% accurate.
  7.  
  8. ----------------------
  9. I. BASIC AI PRINCIPLES
  10. ----------------------
  11. - There are many AI clauses. Which clauses are in effect depends on trainer class, but given our current knowledge, it's easiest to simplify trainers as having "good AI" or "bad AI"
  12. - Characteristics of good AI (some exceptions apply):
  13. > Always try to OHKO if possible. This overrides most other decisions
  14. > Favor stat-increasing or stat-lowering moves on the first turn of battle (e.g., Harden, Bulk Up, Growl)
  15. > Choose most damaging move (e.g., Rock Throw over Tackle)
  16. > If multiple moves will kill, select one at random
  17. > If faster than the player (you), do not use a Speed-lowering move
  18. > "Ignore" fixed-damage moves such as Seismic Toss and Sonicboom (they can be used but are never encouraged or discouraged)
  19. > Discourage confusion moves when the player is at low HP (e.g., Supersonic, Confuse Ray)
  20. > Dismiss useless moves (e.g., Supersonic if already confused)
  21. - Characteristics of bad AI:
  22. > Select a move at random
  23. > Dismiss useless moves in some cases, but not all
  24. > Do not calculate damage
  25. - When calculating damage, the AI first "simulates" a roll. This is separate from the actual roll that occurs if the move is chosen. For example, if you have 13 HP and a trainer with good AI has one attacking move that does 12-15 damage, it will always choose that move if the simulated roll is 13, 14 or 15, but not necessarily if the simulated roll is 12.
  26. - In double battles, the AI selects a target randomly, then proceeds as normal
  27. - All wild Pokemon will choose a move at random under all circumstances
  28.  
  29. ----------------------
  30. II. AI BY FIGHT
  31. ----------------------
  32. Rival 1 Good
  33. Calvin Bad
  34. Grunt Bad
  35. Josh Bad
  36. Tommy Bad
  37. Roxanne Good
  38. Clark Bad
  39. Grunt Bad
  40. Joey/Jose Bad
  41. Laura Bad
  42. Brawly Good
  43. Grunt Bad
  44. Grunt Bad
  45. Rival 2 Good
  46. Wally Good
  47. Vivian Bad
  48. Shawn Bad
  49. Wattson Good
  50. CTB Good
  51. Grunt Bad
  52. Matt Good
  53. Archie 1 Good
  54. Flannery Good
  55. Mary Good
  56. Lori Good
  57. Berke Good
  58. Norman Good
  59. Grunt Bad
  60. Grunt Bad
  61. Shelly Good
  62. Rival 3 Good
  63. Jared Bad
  64. Kylee Bad
  65. Winona Good
  66. Grunt Bad
  67. Grunt Bad
  68. Grunt Bad
  69. Matt Good
  70. Samantha Bad
  71. T&L Good
  72. Shelly Good
  73. Archie 2 Good
  74. Wallace Good
  75. Hope Good
  76. Shannon Good
  77. Julie Good
  78. Edgar Good
  79. Wally Good
  80. Sidney Good
  81. Phoebe Good
  82. Glacia Good
  83. Drake Good
  84. Champion Good
  85.  
  86. ----------------------
  87. III. NOTES BY FIGHT
  88. ----------------------
  89. These fights follow "good AI" rules unless otherwise noted. Also see this paste: https://pastebin.com/fhayLRVE
  90.  
  91. RIVAL 1
  92. - Seems to discourage Leer after turn 1, but can still use it
  93. - Seems to never use Leer when you're below 70% HP
  94. ROXANNE
  95. - Favors Rock Tomb if Mudkip is faster; can't be used otherwise
  96. - Favors Harden on turn 1
  97. - Favors Harden on the turn after you use Growl (~75% likely if nothing else is favored)
  98. - Occasionally uses Tackle even when it can't kill
  99. BRAWLY
  100. - Seems to discourage Leer at all times
  101. - Seems to discourage Bulk Up on subsequent uses
  102. - Arm Thrust's damage calculation only includes the first hit (so 6 HP is generally safe)
  103. RIVAL 2
  104. - Dismisses Growl if your HP is 70% or less (usually 40/57)
  105. - Dismisses Growl on turn 2+ if your Attack stage is 1+
  106. - Rarely uses Growl on turn 2+ if your Attack stage is <1
  107. - Always uses QA if it kills
  108. - Splash is not considered a useless move
  109. WALLY
  110. - Generally spams Double Team
  111. WATTSON
  112. - Discourages Supersonic if your HP is 70% or less; dismisses it at 50% or less
  113. - Voltorb rarely uses Selfdestruct
  114. CTB
  115. - Dismisses Growl if your HP is 70% or less (usually 49/70)
  116. - Dismisses Supersonic if your HP is 50% or less
  117. - Roselia usually uses Stun Spore if Mega Drain doesn't kill
  118. ARCHIE 1
  119. - Discourages Sand-Attack if your HP is 50% or less
  120. - Dismisses Supersonic if your HP is 50% or less
  121. - Sharpedo almost never uses Crunch if it can't kill
  122. FLANNERY
  123. - Slugma is ~40% likely to use Smog, ~30% to Light Screen and ~30% to Sunny Day
  124. - Slugma cannot use Light Screen if it has 50% HP or less
  125. - Slugma cannot use Sunny Day if it has 40% HP or less
  126. - Dismisses Overheat unless it can kill
  127. - Body Slam is ~60% likely, Attract 40%
  128. MARY
  129. - Favors Sing
  130. LORI
  131. - Favors Headbutt
  132. BERKE
  133. - Favors Swords Dance
  134. NORMAN
  135. - Slightly discourages Yawn
  136. - Does not dismiss Yawn if you are asleep
  137. - Never uses Encore
  138. - Second Slaking seems to weigh moves based on damage (Focus Punch is favored, but not guaranteed, when kill AI is the same between moves; Facade is favored over Faint Attack as well)
  139. SHELLY
  140. - Swagger seems unaffected by "confusion move" AI
  141. WINONA
  142. - Favors Double Team
  143. - Favors Protect
  144. - Dismisses Supersonic if your HP is 50% or less
  145. - Discourages Sand-Attack if your HP is 50% or less
  146. - Favors Dragon Dance
  147. MATT
  148. - Dismisses Screech if your HP is 50% or less
  149. T&L
  150. - See this paste: http://pastebin.com/dDCH7V19
  151. SHELLY
  152. - Dismisses Screech if your HP is 50% or less
  153. - Can spam Taunt
  154. - Favors Scary Face, then Swagger
  155. ARCHIE 2
  156. - Favors Scary Face, then Swagger
  157. - Dismisses Confuse Ray if your HP is 50% or less
  158. - Always uses Roar if you are +3 in Attack or Sp. Atk
  159. WALLACE
  160. - Milotic favors Recover if it is below 50% HP
  161. WALLY
  162. - Favors Double Team and Calm Mind
  163. SIDNEY
  164. - Discourages Sand-Attack if your HP is 50% or less
  165. - Favors Double Team
  166. PHOEBE
  167. - First Dusclops is ~30% to use Curse
  168. - Dismisses Confuse Ray if your HP is 50% or less
  169. GLACIA
  170. - Always uses Hail if it's raining
  171. DRAKE
  172. - Shelgon is ~80% to use Rock Tomb, ~10% to Protect and ~10% to Dragon Claw
  173. STEVEN
  174. - Discourages Toxic if your HP is 50% or less
  175. - Dismisses Confuse Ray if your HP is 50% or less
Add Comment
Please, Sign In to add comment