All the possible figth are tested : each Pokémon species with each moveset are simulated, both in offense and in defense. This represents 2,891,904 fight simulations in total.
The fight simulations are based on these parameters :
Both opponents are level 40 with perfect IV.
The fight lasts 99 seconds or until one of the Pokémon faint.
The defending Pokémon has twice its normal HP.
A Pokémon can store 100 energy.
The defending Pokémon waits on average 2 seconds after using a move (between 1.5 and 2.5 seconds).
The defending Pokémon starts the fight with a double quick move. The second quick move starts at 1 second (even if the first one is not finished yet) and doesn't count in the cooldowns of the defender.
The attacking Pokémon dodges every charged move in the most optimized way possible. The damage of the charged move are reduced by 75%, but dodging takes 500ms.
A Pokémon gains 0.5 energy for each HP it loses (rounded up).
The defending Pokémon uses its charged move 50% of the time when it is available.
At the end of the fight, a score between 0% and 100% are given to each fighters using 3 variables :
Duration : the length of the fight in percentage (0 seconds = 0%, 99 seconds = 100%)
Dmg att : the damage dealt by the attacking Pokémon in percentage of the defender's max HP (0% if the defender didn't lose HP, 100% if it lost all its HP).
Dmg def : the damage dealt by the defending Pokémon in percentage of the attacker's max HP.
The scores are calculated using these formulas :
Attacking Pokémon : Dmg att + (1 - Duration) + 0.5 × Dmg def2.5