Pokémon Switching Statistics
This is a program that reads Shoddy Battle battle logs in order to prepare statistics regarding Pokémon switching. This program was written by Cathy Fitzpatrick in September 2009 and it is licensed under the GNU Affero General Public License, version 3 or later.
logs directory contains several sample logs to run the program on. The
main.php program parses the input logs and produces a results output file.
sort.php program reads the results file (sample:
and produces a set of HTML output files.
- This program requires PHP.
sort.phpprogram optionally uses HTML Tidy, which is assumed to be on the
tidyis not found, the program will still work; the only difference is that the HTML output will not be indented.
In order to understand the statistics, it is necessary to define some terms.
Except for at the start of the battle, whenever one player sends out a new Pokémon X (including through Baton Pass and U-turn), if there is a Pokémon Y on the opponent's side of the field, then we say that Pokémon X switched into Pokémon Y. We call Pokémon X the subject of the switch in and Pokémon Y the object of the switch in.
We can sort the switch in statistics both by subject and by object. Given a particular Pokémon X, the statistics sorted by subject tell you the most common Pokémon that Pokémon X switches into. Similarly, given a particular Pokémon X, the statistics sorted by object tell you the most common Pokémon who switch into Pokémon X.
Here is an example of how to interpret this data. This is an excerpt from the statistics sorted by subject showing you the most common Pokémon that Gyarados switches into on the Standard ladder:
- Scizor - 7.12% (12166)
- Heatran - 6.37% (10897)
- Swampert - 4.85% (8284)
- Infernape - 4.62% (7907)
- Salamence - 3.86% (6597)
- Gyarados - 3.7% (6321)
- Lucario - 3.34% (5715)
This means that in August 2009, Gyarados switched into Scizor 12166 times, which was 7.12% of all switches in which Gyarados was the subject.
August 2009 data
This program was run on the battle logs from Smogon's Shoddy Battle server for August 2009. Here are the results as generated by this program:
- Standard ladder sorted by subject (5 MiB)
- Standard ladder sorted by object (5 MiB)
- Ubers ladder sorted by subject (768 KiB)
- Ubers ladder sorted by object (756 KiB)
- Underused (UU) ladder sorted by subject (2.5 MiB)
- Underused (UU) ladder sorted by object (2.5 MiB)
You may be interested in more information about Shoddy Battle's statistical functionality.
- Cathy Fitzpatrick created the program.