Forum rules: Do not post bugs or feature requests here! Report bugs to our Issue Tracker and suggestions to Suggest a Feature.

This site is not for solicitation of services or 'purchasing' development. Please do not post requesting side mods/plugins and so on. Your thread will be removed, and you will receive a warning.
By Salmjak
#171767 Hi! Not sure where to post this.
I have a question about AI (advanced AI in particular) and abilities.

Do advanced AI consider the ability when they choose move or switch out?

E.g. If an advanced AI have an Azumarill with sap sipper and I send out a grass type, then the AI should very rarely switch out (unless the grass type in particular have few grass moves). Is this considered in the AIs type evaluation? Similarly, is Thick Fat included in type-advantage switch outs?

Would an AI using an Absol with Super Luck prioritize moves with increased crit-rate like night slash? Are type-increasing abilities like Torrent evaluated/prioritized when the pokemon is below 1/3 HP?

User avatar
By Some Body
#171768 Abilities that influence type matchups, stats, or power directly (e.g., Sap Sipper, Thick Fat, Torrent) are accounted for. Aggressive/Tactical AI also know about these Abilities when making their decisions.

Abilities that are reliant on probability, like Super Luck, are ignored. You can simply give a Pokémon moves that take advantage of the Ability, and if Night Slash happens to be the best move for the turn, ignoring the critical hit ratio, then the AI will use it anyway and end up taking advantage of Super Luck.
By Salmjak
#171769 Thanks a bunch for the quick answer! :) I'm glad to hear that this behaviour is implemented!

Do they also consider other pokemons (in the team) abilities when evaluating moves? E.g. The AI have 2 pokemon with sand veil and the pokemon that it in combat has sandstorm but not sand veil. Will it use sandstorm as a "plan ahead" (if no other super effective moves are available) or will it simply use the most effective move at the time?

Regarding probability: Wouldn't it make sense to increase the evaluated damage value by the probability percentage when evaluating such moves? E.g. Night slash has 12.5% chance of crit. Thus the evaluation would be "normal damage + (normal damage*2*0.125)". Giving this move priority due to potential damage, just like you probably prioritize moves with chance of status infliction.
User avatar
By Some Body
#171774 Weather moves will not account for party Pokémon that are not in battle. However, if an allied Pokémon in a double battle has an Ability/move that benefits from the weather, the AI will take that into account.

Effects with less than a 50% chance of occurring (critical hits, most secondary effects) are ignored. While it is possible to use something like expected value and rely on the law of large numbers, I decided to favor consistency.
By Salmjak
#171777 I understand the consistency argument :) A huge problem is strange behaviour that occur when introducing potential damage when most of the time it will actually perform worse. Over-evaluating moves when in reality you can win in two moves.
It would be nice though if secondary status effects were introduced as a tie-breaker, based on the chance of success or "none vs any".

I suppose the AI doesn't look ahead/plan at all? (Does not simulate the fight)

But thanks for all your answers! I feel like I can design tougher trainers now! (and trainers that actually make sense)
User avatar
By Some Body
#171788 I can introduce a very small tiebreaker for infrequent secondary effects.

The AI is not omniscient about all of your movesets and party Pokémon, so it will not look several steps into the future. However, there are certain things that it does look ahead for, such as certain move combos, stat modifiers, and whether you can outspeed or KO it in the next turn.
By Salmjak
#171791 Yeah, I know that pokemon isn't a perfect information game unless you want the AI to cheat ^^' It could consider the moves that a pokemon can learn by level or TM though, but this would create a very large branching factor if simulated. In the end it would probably create an AI which is too cautious anyway. An alternative is a probability table of moves derived from common move-sets used in competitive play.

Does the AI keep a list of "known moves" (tied to a pokemon) as the battle goes on and consider these in evaluation?

I'm really amazed about the amount of thought and work that have been put into the AI! :) I kind of expected a very simple AI with just type match-ups and move decision by power*accuracy. I'm now confident that AIs as "Gym Leaders" can be a very viable option!
User avatar
By Some Body
#171792 To avoid needing to query the database, the AI does not look at move compatibility. Instead, it starts by assuming that a Pokémon has basic high-powered STAB moves of the higher attack stat (e.g., Flamethrower, Dragon Claw), and remembers what moves the Pokémon uses throughout the battle.
JOIN THE TEAM