AI Rules & Scores

Vanilla AI explanation

The AI evaluates all available moves each turn, assigns a score to each one, and selects the move with the highest score. If several moves share the same score, it randomly chooses one of them. In Double Battles, the AI scores every possible move against each valid target and then selects the move target combination with the highest overall score.

Custom AI Rules & Scores

This document explains the Pokémon Utopia AI. It aims to provide a clear overview of the custom AI’s general decision making process, while noting that certain individual situations may behave differently where appropriate, as covering every possible exception would be too extensive for a general explanation.

The goal is not to go overboard, but to make the AI significantly smarter while keeping it largely consistent with the vanilla AI.

- Every Move starts with 90 Score -

General AI

General AI:

  1. The AI can always bring out their Ace/Mega Pokémon whenever they want.

  1. The AI calculates Multi-Hit-Moves with max damage (3+ Hits)

  1. The AI always checks if they’re slower/faster than their current target!
    - And sees a Speed Tie as faster than their current target!

  1. The AI always receives a bonus for “stab move” on top!
    - +12 Score

  1. The AI always receives a bonus for “most damaging move” on top!
    - +10 Score

    The AI always receives a bonus for “super effective move” on top!
    - +12 Score

  1. The AI always subtracts for “resistance damaging moves” on top!
    - -17 Score

  1. Is the AI slower and can K.O the player? (slow kill)
    - +8-10 Score if yes
  2. Is the AI faster and can K.O the player? (fast kill)
    - +10-12 Score if yes

  1. Does the AI have a high-crit move and is it super effective against the Player?
    - +5 Score if yes

  1. If the Player is at or below 16% HP, a random damaging Move

will be selected to kill!

Double Battle: Only the faster AI Pokémon will select a random damaging Move!

Otherwise the highest Roll for a move will be selected for a kill!

With Immunity etc. still in mind!

General Moves AI

General Moves AI:

Pursuit:

  1. Can the AI faint the Player?
     - +15 Score if yes 

If the Player is below 40% HP
- 50% chance for +10 Score
If the Player is below 20% HP
- +18 Score if yes 
If the Player is at or below 10% HP
- +30 Score if yes 

Regardless, if AI is faster:
        
- Additional +4 Score if yes


        
Future Sight:

  1. Is the AI faster than the Player and gets KO’d by it?

 - +8 Score
        Else
         - +6 Score

Imprison:

  1. If the AI has at least one move in common with the Player:

 - +5 Score
        Else
         - -15 Score

Trick, Switcheroo:

       4.        Is the AI holding: Toxic Orb, Flame Orb or Black Sludge?        
          - +7 Score
        Is the AI holding: Iron Ball, Lagging Tail or Sticky Barb?
          - +7 Score

Else
         - +3 Score

Recover, Slack Off, Heal Order, Soft-Boiled, Roost, Strength Sap
Morning Sun, Synthesis, Moonlight:

       5.        If the AI decides it should use a recovery move:        
          - +6 Score
        Is the AI at full HP?
          - -20 Score
        Is the AI at 85% HP or higher?

           - -10 Score

       5.1 Morning Sun, Synthesis, Moonlight (Sunlight case):
              If Sun is up and AI decides it should use one of these recovery moves:
              - +7 additional Score

                                

                                

        Icy Wind, Electroweb, Mud Shot, Low Sweep:

          6. Is the AI slower than the Player?
             - +6 Score if yes
        Is the AI faster than the Player?
        - +2 Score if yes
        Is the Player Pokemon ability either (Contrary, Clear Body or White Smoke)?
        - never uses those moves

Will-O-Wisp:

           7. - +2 Score always
        Does the Player have a physical move?
        - 37% chance +3 Score if yes / 37% chance -5 Score if no

Destiny Bond, Grudge (If the Player knows it):

           8. If the Player knows Destiny Bond or Grudge
              - -15 Score if yes

               Player is at or below 12.5% HP and the player has

               Destiny Bond or Grudge?
         - -80 Score (
For the move Darkest Lariat)

 If the Player uses Destiny Bond
              - -20 Score (
For the move Bullet Punch)

 –15 Score additional score  if the AI has no other Pokémon alive

When the Player is faster than the AI:

               Would the AI K.O the Player and last move was Destiny Bond
              - 20 Score if yes

               –10 Score additional score  if the AI has no other Pokémon alive

               Would the AI KO the Player and last move was Grudge

               - 15 Score if yes

               – 7 Score additional score  if the AI has no other Pokémon alive

Destiny Bond:

           9. If the AI is at or below 50% HP and last move was Destiny Bond
              - 50% chance -55 Score

               If the AI is at or below 25% HP and last move was not Destiny Bond

               -  +20 Score

Spore, Sleep Powder, Lovelykiss, Hypnosis, Sing, Grasswhistle, Dark Void, Yawn:

         10. Does the AI have more than 80% HP?
        - +35 Score if yes
         Does the AI have more than 50% HP but below 80% HP?
        - +20 Score if yes
         Does the AI have less than 50% HP and is slower than the Player?
        - +5 Score if yes
        Is the AI slower than the Player?
             - +10 additional Score

        Will never use these Moves when the player is immune!

Reflect, Light Screen:

          11. Does the Player have a physical move in their pool?
        - +15 Score if yes (
For Reflect)

  Does the Player have a special move in their pool?
        - +15 Score if yes (
For Light Screen)
          Is the AI holding a Light Clay?
             - +8 additional Score if yes

Stealth Rock, Spikes, Toxic Spikes, Stickyweb:

          12. Is this the first turn for the AI’s active Pokémon?:

         - If Yes:

          - +15 Score with 75% chance

          - +12 Score with 25% chance

           Is the ability Sturdy or the Item Focus Sash active?

- If Yes:

          - +20 addtional Score

         - If it’s not the first turn anymore:

          - +4 Score with 75% chance

          - +3 Score with 25% chance
           AI used Spikes/Toxic Spikes last turn and Player Pokémon has Rapid Spin?:
        - If Yes:

          - 50% chance -35 Score

           

Tailwind, Trick Room:

          13. Is the AI’s active Pokémon slower than the Player?:

          - +20 Score if yes

Protect, King’s Shield:

          14. Is it Round 1 and not a Double Battle?:

          - -3 Score if yes

                Is the AI afflicted by Poison or Burn?:

          - -5 Score if yes

  Is the Player afflicted by Poison or Burn?:

          - +2 Score if yes

  Does the AI have used Protect/King’s Shield last turn?:

          - 50% -20 Score if yes

Leech Seed, Attract, Confuse Ray, Thunder Wave, Fake Tears, Tickle, Focus Energy:

          15. Does the AI have more than 50% HP and last move was not one of these?:

          - +3 Score if yes

                Is the AI faster than the Player Pokémon and last move was not one of these?:

          - +5 additional Score if yes




        Substitute:
         16. Is the AI at or below 50% HP?:

          - -80 Score if yes
               Did the AI used Substitute last turn?:
        - 50% chance -25 Score if yes

                 Is the Player Pokémon asleep?:
        - +3 additional Score if yes
           Is the Player Pokémon leech seeded and is the AI faster?:
        - +3 additional Score if yes


        Fake Out (Singles):
         17. Is it the first turn?:

          - +22 Score if yes
        
Fake Out (Doubles):
               Is it the first turn and the AI deals less than 40% damage to either target?:

          - +55 Score if yes

Terrain Pulse:
         18. When an active Terrain is present and the move is super effective:

          - +20 Score
           Does the AI outspeed the Player?:

          - +5 additional Score if yes

        
Fishious Rend/Bolt Beak:
         19. When the AI is faster and the move is resistant:

          - +20 Score
           When the AI is faster and the move is neutral:

          - +25 Score
           When the AI is faster and the move is super effective:

          - +35 Score

        
Encore:
         20. The Player Pokémon is faster and used a non-damaging move:
           If Yes:

          - +6 Score with 50% chance
        - +5 Score with 50% chance
           The Player Pokémon is slower and used a non-damaging move:

          - +7 Score if yes

        
Bind,Clamp,Fire Spin,Infestation,Magma Storm,Sand Tomb, Sand Trap,

Thunder Cage,Whirlpool,Wrap:
         21.: Is it the AI’s Pokémon first turn and one of these moves isn’t super effective?:

          - +10 Score if yes
          Was the Player Pokémon previously freed from these moves?:

          - +5 Score if yes

Double Battle AI

 Double Battle AI:

  1. Magnitude/Earthquake:
    If Partner Pokémon is immune to those moves
    - +15 Score if yes
    Partner Pokémon
    has Magnet Rise or Levitate and is faster than the User?
    - +6 Score if yes
    Partner Pokémon is from typing Flying?
    - +5 Score if yes
    Partner
    Pokémon has a vulnerable type? (FIRE, POISON, ELECTRIC, ROCK)
    - -35 Score if yes

  1. Icy Wind, Electroweb, Mud Shot, Low Sweep:

- +8 Score always
Is the Player Pokemon ability either (Contrary, Clear Body or White Smoke)?
- never uses these moves

  1. Helping Hand, Follow Me:
    Helping Hand:

- +10 Score always
Did the AI use Helping Hand the last turn?
- -5
additional Score if Yes
Follow Me:

- +12 Score always
Did the AI use Follow Me the last turn?
- -5
additional Score if Yes
- +5 additional Score if No

The AI didn’t use Helping Hand the last turn?
- 20% +35 score if yes
The AI won’t use either of those moves (if) the partner also uses either one
of these moves or is using a status move

  1. Will-O-Wisp:

- +1 Score always
Does the Player have a physical move?
- 37% chance +2 Score if yes
Does the Player have no physical move?
- 37% chance -4 Score if yes
Does the partner Pokemon know Hex?
- +6 Score if yes

  1. Tailwind, Trick Room:

              Is the AI’s active Pokémon or Partner slower than the Player?

          - +25 Score if yes
             
The AI chooses randomly which Pokémon uses Trick Room

       6.    Swagger(Target = Partner):

              Does the AI Partner Pokémon have Own Tempo/Misty terrain active?

          - +27 Score if yes (Turn 1)
             - +12 Scores otherwise
             Is the Partner Pokémon grounded?
             - -80 Score if no

Priority AI

Priority AI:

  1. Is the AI under 30% HP and does the Player outspeed (Single Battle)?
    - 90% chance +99 Score if yes
    Is the AI under 30% HP and does the Player outspeed (Double Battle)?
    - +12 Score if yes

  1. Sucker Punch:
    If the AI successfully used the move
    - 50% chance for -10 Score if yes (no changes if not!)
    Is the Player below 10% HP?
    - +8 additional Score if yes

Setup AI

Setup AI:

  1. General Setup AI:

Is it Round 1 and does the AI outspeed the Player?
- +10 Score if yes
Did the AI take more than 50% HP damage last turn?
- -30 Score if yes
Is the AI at or below 50% HP?
- -2 Score if yes
- -10 Score if yes and
Double Battle
Is the AI at or below 40% HP?
- -3 Score if yes
Is the AI at or below 10% HP?
- -60 Score if yes (
Will never use a Setup Move)

Will never use a Setup Move when the player has Unaware etc.!

  1. Ancient Power, Silver Wind, Ominous Wind:
    - +20 Score always on top
    Does the Player resist one of those moves?
    - -23 Score if yes
    Does one of those moves hit the Player neutral?
    - -13 Score if yes

Switch-In AI

Switch-In AI:

  1. The AI evaluates whether its current Pokémon is in a bad matchup.
    It checks:

If the situation is unfavorable, the AI may consider switching out.

  1. Does it have an immunity for the opponent’s moves?
    - +35 Score if yes
    Does it have a resistance for the opponent’s moves?
    - +25 Score if yes
    Does it get hit neutral?
    - +15 Score if yes
    Is it weak to the opponent’s moves?
    - -30 Score if yes
    Is the switch-in faster than the Player?
    - +20 Score if yes
    Can the switch-in deal high damage to the Player?
    - +30 Score if it can deal roughly 50% HP
    - +15 Score if it can deal roughly 33% HP
    Can the switch-in potentially KO the Player?
    - +60 Score if yes
    Does the Player deal very little damage to the switch-in?
    - +45 Score if less than 25% HP
    - +15 Score if less than 50% HP
    Can the Player heavily damage the switch-in?
    - -35 Score if more than 60% HP
    - -90 Score if it is likely to be KO’d

  1. Does one of the switch-ins have Sticky Web?
    - +3 additional Score if yes
    Does one of the switch-ins have Parting Shot?
    - +2 additional Score if yes
  2. If all of these Conditions are met:
    - 13% Chance for a switch (Single Battle)
    - 16% Chance for a switch (Double Battle)
    The switch-in Pokémon needs at least 31 score

  1. The AI won’t switch-in a Pokémon that is at or below 45% HP!
  2. The AI can switch-out if their Pokémon has terrible moves

and has more than 50% HP!

  1. If The AI Pokémon reaches below 50% HP it won’t switch out!
  2. If the AI Pokémon has at least x1 boost it won’t switch out!

Post Ko Switch-In AI

Post KO Switch-In AI:

  1.   Is the switch-in faster than the Player?

                    - +20 Score if yes

  1.   Can the switch-in deal high damage to the Player?

                     - +30 Score if it can deal roughly 50% HP

                     - +15 Score if it can deal roughly 33% HP

  1.   Can the switch-in potentially KO the Player?

                   - +60 Score if yes

  1.   Does the Player deal very little damage to the switch-in?

                     - +35 Score if less than 25% HP

                    - +10 Score if less than 50% HP

  1.   Can the Player heavily damage the switch-in?

                   -35 Score if more than 60% HP

                   -100 Score if it can potentially KO

              6.      Does the switch-in hold an Eviolite?

                   -  +2 additional Score if yes

              7.        Does one of the switch-ins
have Sticky Web?
                - +3 additional Score if yes
                Does one of the switch-ins have Parting Shot?
                - +2 additional Score if yes