Assume all opponent's Pokemon have optimum EVs and IVs for all stats Assign values to moves based on hard-coded rules, choose best one found Limit search to 1 minute 30 seconds ...
The following website provides the method used during damage calculation: The following website was used as a reference to give created Pokémon correct stats with 252 252 6 EVs distributed accordingly ...
This portion of the Pokemon Sword and Shield Walkthrough and Guide explains what is Effort and EVs and how to EV train Pokemon. Effort Values (or EVs) make Pokemon stronger in a particular stat.