How Goptimiz works, some useful links and other infos.

In order for the numbers and calculations on this site to be verified, improved and reused if needed, this page lists the formulas on which the calculations used by Goptimiz and the methodology used are based.

It is also an opportunity to explain how and why these formulas are used.

Data gathering Fight simulations Results analysis Score calculation Generation of rankings Bonus

Data gathering

The data used by Goptimiz comes from 2 sources:

Fight simulations

To calculate the offensive and defensive power of each Pokémon (and each of its movesets), Goptimiz simulates all possible fights in Pokémon Go.

Using combat simulations results in very accurate results (unlike rankings that use spreadsheets). Simulations allow to take all the possible parameters into account (dodging, combat timing, interactions between fighters ...) and they allow to carry out millions of different fights (8 340 165 simulations in total), which makes the results more reliable.

All possible battle combinations are tested: each Pokémon species with each possible moveset is simulated, both as attacker and defender. For the attackers, simulations are also made without using their charged moves, which makes it possible to know how good a Pokémon is in attack if it does not use its charged move.

Goptimiz fight simulations are based on all known parameters of gym fighting:

  As in game, the simulations use a one-place queue system for the different actions of the Pokémon.
Although there is no solid evidence that defending Pokémons also use a queuing system, simulations also use this system for defenders. When a defender has enough energy to use his charged move, the script adds it to the queue and uses it either immediately (if his queue is empty) or after his next action (if there is already an action in progress). This system allows to obtain results similar to what one sees in game: the defending Pokémon uses its charged move about 50% of the time.
Feel free to share your research on this subject.

Results analysis

In order to analyze the results of the simulations and determine how strong a Pokémon is in attacking and defending, it is necessary to know what makes a good attacker and a good defender:

What makes a good attacker ?

What makes a good defender ?

The best case scenario is that the defender wins the fight. This prevents the attacker from taking the gym.

If the defender loses the fight, it must at least prevent the attacker from easily taking the gym. For this, two variables must be taken into account:

Score calculation

Now that we know what makes a good attacker and defender, we can mathematically judge the outcome of a fight. For this, Goptimiz uses 3 variables, which encompass everything you want to know:

From these variables, we can calculate the score obtained by each of the opponents:

These results (scores) are expressed in percentages (between 0% and 100%). The higher the percentage, the better the Pokémon did during the fight.

For some calculations, the script removes 100% from the score of the Pokémon which lost the fight in order to assign a negative value to its score. For these "non-standard" scores, the value is therefore between -100% and 100%.

These formulas allow weak Pokémon to have a small impact on rankings, while powerful Pokémons will have a much greater impact on overall results. Therefore, Goptimiz indirectly takes into account the fact that the best Pokémon are used more than the others.

Generation of rankings

Once all the simulations have been done, the results must be analyzed in order to be able to rank the Pokémon. Here is how the rankings in Goptimiz are calculated:

Offensive movesets

In order to calculate the offensive score of each moveset of a Pokémon (which is displayed on the individual pages of the Pokémon and on the Pokédex page), the script averages all the standard scores obtained by this moveset in the simulations or This Pokémon was the attacker.

Defensive movesets

In order to calculate the defensive score of each moveset of a Pokémon (which is displayed on the individual pages of the Pokémon and on the Pokédex page), the script averages all the standard scores obtained by this moveset in the simulations or This Pokémon was the defender.

Best defenders

The best defenders page takes the best defensive moveset of the 40 best defenders and ranks them according to their score.

Each Pokémon's counters

In order to calculate the best counters against a Pokémon (which is displayed on the individual Pokémon pages and on the best counters page), the script averages the scores obtained by all attackers against that Pokémon. In the case where this average is negative, this means that the attacker with this moveset does not counter the defending Pokémon. In this case, this value is not taken into account in the ranking. All movesets of the defending Pokémon are grouped, but all movesets of the attackers are taken separately. Thus, one does not need to know the moveset of a defender to know which attacker to use.

Best attackers

The best attackers page is based on the best counters page. From the top 5 counters against each Pokémon, the script proceeds as follows :

The best attackers displayed are therefore the Pokémons that have obtained the best results against the most possible Pokémon (with an advantage for those who counter the best defenders).

Best prestigers

In order to generate the best prestigers page, the script takes each possible defender and simulates fights against all the possible attackers, with the attacker's level lowered until its CP get under 50% of the defender's CP.

For each possible moveset of every possible attacker, we keep the worst score obtained against each defending Pokémon. This allows to use to anticipate the worst case scenario while using prestigers.

The next steps and the ranking behave similarly to the best counters for each Pokémon.

Still here ?

If you have any questions or would like more information about how Goptimiz works, feel free to contact me on Twitter. I will update this page as I go along, so that everything is explained as well as possible.

Some bonus informations: