Advertisement
Exarion

Perish Song AI for Gen 2 Kaizo

Oct 13th, 2023 (edited)
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. In Gen 2, trainers choose moves based on a scoring system. Each of their Pokemon's moves is assigned a score that's determined by checking all the AI clauses the trainer has. The move with the highest score is always chosen. If multiple moves are tied for the highest score, one is chosen at random.
  2.  
  3. Boss trainers, such as gym leaders, have "Smart" AI, which includes clauses for specific moves. One of those moves is Perish Song. The AI scoring for Perish Song is as follows:
  4.  
  5. a. If the AI considers its current matchup to be unfavorable, assign a score of 0.
  6. b. Otherwise, generate a random number from 0 to 255. If the number is less than 128 (which is 50% likely), assign a score of -1. If the number is 128 or greater, assign a score of 0.
  7.  
  8. Other useful moves, such as the Pokemon's most damaging move, typically have a score of 0. So when the AI faces an unfavorable matchup, Perish Song is usually tied for the highest score and can be chosen randomly. Otherwise it usually has a 50% chance of being excluded from random selection.
  9.  
  10. The AI scoring for determining an unfavorable matchup is bugged. The AI performs two checks:
  11.  
  12. 1. Look at the type effectiveness of the moves your Pokemon has used, and if you haven't used a move yet, assume you have moves that correspond to your type(s). However, because of a bug, all moves are set to the type of Perish Song, which is Normal. So the AI assumes you are using Normal-type moves, and if their current Pokemon is weak to Normal-type moves, they consider the matchup unfavorable (score -1). Since no Pokemon are weak to Normal-type moves, an unfavorable matchup is impossible. If their Pokemon resists Normal-type moves, the AI considers the matchup favorable (+1), and if their Pokemon is immune to Normal-type moves, the AI considers the matchup very favorable (+2).
  13.  
  14. 2. Look at their own Pokemon's damaging move with the greatest type effectiveness against your Pokemon. Again, the type of this move is mistakenly set to Normal because Perish Song is a Normal-type move. If your Pokemon resists Normal-type moves, the AI considers the matchup unfavorable (-1). If your Pokemon is immune to Normal-type moves, the AI considers the matchup very unfavorable (-2).
  15.  
  16. The AI then sums the scores in each of the checks. If the overall score is negative, the matchup is considered unfavorable for the purposes of Perish Song AI. This will give Perish Song a score of 0, which usually allows it to be chosen randomly.
  17.  
  18. Because of the scoring in check #2, Pokemon with resistance or immunity to Normal-type moves have a higher chance of seeing Perish Song. So Rocks, Steels, and especially Ghosts are more vulnerable to it. These three types are also more likely to see Perish Song on trainers with "Types" AI, which give a score of -1 to damaging moves that your Pokemon resists and -10 to moves your Pokemon is immune to. (Rocks and Steels have a lot of resistances, and Ghosts have a lot of immunities.)
  19.  
  20. Trainers with smart AI: Super Nerd, Juggler, Pokefan (M/F), Executive (M/F), "Boss"
  21.  
  22. Trainers with types AI: Boarder, Officer, Bird Keeper, Beauty, Fisher, Psychic, Kimono Girl, Swimmer (M/F), Guitarist, Schoolboy, Super Nerd, Juggler, Pokefan (M/F), Biker, Scientist, Skier, Sage, Medium, Grunt (M/F), Executive (M/F)
  23.  
  24. Sources (all by entrpntr):
  25. https://pastebin.com/EjAW76cx
  26. https://pastebin.com/0mGjnp9J
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement