Ohh, so that's what this is supposed to do... (Patreon)
Content
One of the ideas I had in our AI revamp was in the inclusion of Role tags for the AI team's Pokemon. If you are experienced in competitive battling, you may know these roles already-- sweepers kill lots of things, walls are super annoying and dont go away, phasers force switches to block set up and do hazard damage, etc. Understanding the roles of various pokemon and how they work in a team is critical in being able to battle well.
so why should the AI not understand the same?
our role system is ultimately just a shortcut-- based on various conditions we have it assign a label to the pokemon (multiple roles allowed), and then in other parts of the code it figures based on those roles. this allows us greater ease in specific moves where we can tell it for instance, set up moves are better on sweepers than on tanks, as opposed to having to ask for the given criteria on each one. Aside from that it helps us work in the AI easier.
So, below are the roles we've outlined (and have already implemented), including what defines them for the AI, and where we plan to use them:
- Sweeper
- Used in: when to set up; switching decisions
- Defined by: max EV speed, modest/jolly/timid/adamant natures if no EVs, choice items
- Physical Wall
- Used in: when to recover; switching decisions
- Defined by: a recovery move + (max def ev or + def nature if no EVs)
- Special Wall
- Used in: when to recover; switching decisions
- Defined by: a recovery move + (max spdef ev or + def nature if no EVs)
- Lead
- Used in: suicide when support options are exhausted, or get out/switch back in sooner, don't waste potions on it
- Defined by: first party slot
- Cleric
- Used in: switching decisions
- Defined by: has Heal Bell/Aromatherapy, or Wish + max HP EV
- Screener
- Used in: get out of there when screens are up, send out earlier
- Defined by: has light clay
- Revenge Killer
- Used in: send in after KO against low HP enemy
- Defined by: has priority moves that can hit and KO, or outspeeds given opponent
- Pivot
- Used in: switching decisions, prefer u-turn/volt-switch
- Defined by: has U-turn/Volt-Switch + a recovery move, or has Regenerator
- Spinner
- Used in: switching decisions
- Defined by: has rapid spin/defog
- Tank
- Used in: prefer potion usage on this
- Defined by: Max HP EV with no recovery move, or Assault Vest
- Baton Passer
- Used in: set up priority, switching decisions
- Defined by: has baton pass
- Stallbreaker
- Used in: switching decisions
- Defined by: has taunt, choice band or choice specs
- Status Absorber
- Used in: switching decisions, ignore status for item use
- Defined by: has rest, comatose, toxic or flame orb, guts, quick feet, flare boost, toxic boost, natural cure, magic bounce or magic guard, hydration in rain, shed skin
- Trapper
- Used in: switching decisions
- Defined by: has shadow tag, arena trap, magnet pull
- Weather setters
- Used in: send in earlier
- Defined by: has weather-setting move or ability, or has weather rock
- Field setter
- Used in: send in earlier
- Defined by: has field-setting move or ability, or has Amplifield Rock
- Ace
- Used in: send in last, prefer potions
- Defined by: last slot in party when ace switch is on
- Second
- Used in: send in later, prefer potions
- Defined by: second highest level on the team when ace switch is on
many.
as i'm thinking about it we'll probably separate out special/physical sweeper
but that puts mixed in a rough spot
so we'll see.
i spent most of yesterday writing out a lot more AI stuff already using this, so I'll post that on monday too