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.
The data used by Goptimiz comes from 2 sources:
- The GAME_MASTER. This file contains most of the information needed to run the site. A script scans the GAME_MASTER and automatically loads the information it contains. The script is run everytime a new version of the GAME_MASTER is available so Goptimiz is always up to date.
- Manual input. The translations, eggs kilometers, availability of Pokémons and legacy movesets are added by hand. No critical data (that could influence the fight simulations) is manually input.
Using fight simulations results in very accurate results (unlike rankings that use spreadsheets, or website that do not take every possible variable into account). 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 328 506 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:
- Both Pokémons are level 39.5 (the maximum you can reach without cheating) with perfect IV (best/worst case scenario).
- The fight lasts 99 seconds or stops when one of the two opponents faints.
- Defending Pokémons have their HP doubled.
- A Pokémon can store up to 100 energy.
- The defending Pokémon waits before each attack (between 1.5 and 2.5 seconds in game, set at 2 seconds during the simulations).
- The defender starts the fight with a double quick attack. The second quick attack starts at 1 second (even if the first attack is not over), and it does not count in its cooldowns.
- The attacker dodges all charged moves in the most optimized way possible. Damage from the charged move is reduced by 75%, and the dodge lasts 500ms.
- A Pokémon gains 0.5 energy each time it takes 1 point of damage (rounded up).
- Some moves, like Transform, have specific effects.
- The defending Pokémon uses its charged move 50% of the time when available.
What makes a good attacker ?
- The role of an attacker is to defeat the defending Pokémon. This is why we attack gyms. The most important thing to consider is if the Pokémon has won the fight or not.
- The duration of the fight. The more powerful the attacker, the shorter the fight. This indirectly takes into account the DPS of the attacker. Relying solely on the DPS would make the results less accurate (it would not consider everything that revolves around the DPS).
- The damage taken by the attacker. Winning a fight is good; winning a fight without losing too much HP is better. Although less important, it is necessary to take into account the state of the health bar of the attacker at the end of the fight.
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:
- The duration of the fight. The longer the fight, the more the defending Pokémon has resisted efficiently. Taking down the gym will take a lot of time to the attacker, which could also discourage him from continuing.
- Damage dealt by the defending Pokémon. Even if you lose the fight, you can put the opponent Pokémon in a weak position. He will find it harder to win the following fights (and again, it might discourage him from continuing).
- The fight duration (
Dur). This duration is expressed in percentages between 0% and 100%: 0% if the combat lasted 0 seconds (which never happens), 100% if the combat lasted 99 seconds (or if the defender won).
- Attacker's DPS (
DPSatt). Damage is expressed as a percentage of the defender's maximum HP. Example : 5% if the attacker dealt 5% of the defender's max HP every second.
- Defender's DPS (
DPSdef). Damage is expressed as a percentage of the attacker's maximum HP.
From these variables, we can calculate the score obtained by each of the opponents:
- For the attacking Pokémon :
(DPS att+ (1 - Dur)) / 2
- For the defending Pokémon :
1 - (DPS att+ (1 - Dur)) / 2
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 takes into account the fact that the best Pokémon are used more than the others (using an emerging phenomenon).
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 worst scores obtained against each Pokémon with this moveset? This allows to go for the worst case scenario (when the defender has the moveset that disavantages most the attacker).
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 takes the worst score obtained by this moveset in the simulations where this Pokémon was the defender.
The best defenders page lists the 100 movesets with the highest defensive 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 the attackers who win against this Pokémon.
The best attackers page lists the 100 movesets with the highest offensive score, ponderated with the defender's defensive scores.
Some bonus informations :
- The images used by Goptimiz have been retrieved from TheSilphRoad for the Pokémon images and here for the logos of the 3 teams displayed in the IV calculator. Thank you !
- Information about the mechanics of the game and other aspects of Pokémon Go comes largely from Reddit, mainly the /r/TheSilphRoad/.
- Besides the enormous participation of the Pokémon Go community, without whom nothing would have been possible, Goptimiz is the work of one person (Hi!).
- Unlike many developpers, I'm not fueled with coffee + pizza, but tea + french fries (not at the same time, though). I'm a fan of Trainer Tips and I'm passionate about artificial life (neural networks, machine learning, emergence ...). In game, I chose to join team Mystic (but I'm not sectarian, Pokémon Go is above all about friendship and sharing).
- On the technical side, Goptimiz uses Twitter Bootstrap, jQuery and a home-made framework (as well as the database).
- The adds displayed on Goptimiz are used to pay the costs of hosting the site and the tea necessary for the proper functioning of its administrator. Do not hesitate to use a add blocker (I personally use uBlock Origin).