Data Attack Pair Analysis Weighted by OU Usage

Status
Not open for further replies.


# Introduction


Inspired by the work here (http://www.smogon.com/forums/threads/two-type-move-combos-gen-6-coverage-resistances.3495469/) and here (http://www.smogon.com/forums/threads/attack-pair-analysis.3490312/), I've decided to do an upgraded computer analysis of attack pairs using the latest OU usage statistics from January 2014.

I believe that the current analyses, although very good, don't take into account the context which the attack pairs are used. Being able to score a super effective hit against the type Water/Electric with Levitate should be weighted more than being able to score a super effective hit against a type like Normal/Ghost in the OU metagame.

# The Data

I've sorted the attack pairs by the following formula:
1. Gain 1 * (% OU usage) if the attack pair is super effective against a given Pokemon.
2. Lose 2 * (% OU usage) if a given Pokemon is immune to a certain attack pair due to typing or an ability.
3. Lose 1 * (% OU usage) if a given Pokemon resists a certain attack pair.

This is iterated over every single Pokemon that has been used in OU. Mega Pokemon are not double counted, even if their types are different, however they are listed as 0% usage in the resistance list. If their types are different, the base Pokemon's type was used in the calculation. If a mega's abilities are different, the base Pokemon's ability used to calculate immunities/resistance (i.e. no Thick Fat on Venusaur). Pokemon with two types that are not listed multiple times in the usage statistics (like Darmanitan-Zen or Keldeo-Resolute or Aegislash-Shield/Blade) are only single counted as their base form.

Below are the top 20 attack pairs generated by this formula along with a list of every single Pokemon that resists it, sorted by usage statistics.

It is formatted in the following form:
<Type 1> <Type 2> <# Pokemon SE against> <# Pokemon NVE against> <# Pokemon Immune> <Calculated Value>

Code:
Ground Ice 376 7 1 2.539263
    rotom-wash, rotom-heat, bronzong, shedinja, cryogonal, rotom-frost, surskit, bronzor
Rock Fire 315 30 0 2.526052
    garchomp, terrakion, gastrodon, keldeo-ordinary, quagsire, swampert, rhyperior, flygon, zygarde, golem, seismitoad, poliwrath, hariyama, rhydon, whiscash, onix, geodude, graveler, gible, marshtomp, gabite, palpitoad, pupitar, wooper, rhyhorn, larvitar, vibrava, makuhita, barboach, garchomp-mega
Electric Ice 328 10 1 2.4812889
    mamoswine, magnezone, rotom-heat, lanturn, shedinja, magneton, rotom-frost, magnemite, piloswine, swinub, chinchou
Fire Electric 342 51 0 2.4746271
    garchomp, goodra, latios, latias, hydreigon, gastrodon, haxorus, quagsire, rotom-heat, swampert, rhyperior, tyrantrum, flygon, zygarde, dragalge, lanturn, golem, seismitoad, druddigon, rhydon, camerupt, whiscash, numel, dragonair, onix, sliggoo, geodude, shelgon, zweilous, graveler, gible, marshtomp, gabite, palpitoad, goomy, pupitar, fraxure, tyrunt, axew, chinchou, wooper, rhyhorn, larvitar, vibrava, bagon, dratini, barboach, deino, charizard-mega-x, garchomp-mega, ampharos-mega
Fighting Ghost 302 0 0 2.4681555
   
Fighting Rock 360 16 0 2.452864
    aegislash-shield, medicham, nidoking, toxicroak, gallade, doublade, golurk, claydol, nidoqueen, meditite, honedge, baltoy, croagunk, golett, medicham-mega, mewtwo-mega-x
Ground Rock 337 10 0 2.4352804
    breloom, chesnaught, flygon, bronzong, torterra, claydol, virizion, bronzor, baltoy, vibrava
Water Fairy 228 22 1 2.3833567
    ferrothorn, venusaur, tentacruel, roserade, empoleon, amoonguss, shedinja, victreebel, vileplume, qwilfish, ferroseed, bulbasaur, roselia, ivysaur, tentacool, bellsprout, gloom, foongus, oddish, weepinbell, skrelp, budew, venusaur-mega
Fighting Ice 382 26 1 2.3719693
    aegislash-shield, azumarill, volcarona, starmie, tentacruel, slowbro, chandelure, jellicent, victini, delphox, froslass, slowking, doublade, shedinja, qwilfish, grumpig, surskit, tentacool, marill, slowpoke, frillish, lampent, honedge, spoink, larvesta, litwick, skrelp
Fire Fairy 282 49 0 2.3131784
    talonflame, charizard, heatran, tentacruel, chandelure, arcanine, darmanitan-standard, ninetales, rotom-heat, entei, victini, delphox, typhlosion, flareon, torkoal, pyroar, magmortar, moltres, rapidash, camerupt, qwilfish, magcargo, heatmor, numel, simisear, magmar, fletchinder, charmeleon, braixen, charmander, tentacool, cyndaquil, quilava, growlithe, chimchar, fennekin, darumaka, lampent, vulpix, torchic, tepig, magby, ponyta, litwick, pansear, skrelp, slugma, litleo, charizard-mega-y
Ghost Fairy 209 2 0 2.2788743
    pyroar, litleo
Rock Ghost 302 9 0 2.1975352
    bisharp, diggersby, scrafty, krookodile, pangoro, scraggy, pawniard, krokorok, sandile
Ghost Electric 270 13 1 2.1587343
    hydreigon, diggersby, heliolisk, krookodile, sawsbuck, shiftry, cacturne, zweilous, krokorok, deerling, nuzleaf, helioptile, sandile, deino
Dark Fairy 205 3 0 2.1490452
    mawile, klefki, mawile-mega
Ghost Water 233 14 2 2.1289246
    greninja, hydreigon, crawdaunt, heliolisk, sharpedo, sawsbuck, shiftry, cacturne, bibarel, zweilous, deerling, carvanha, nuzleaf, helioptile, deino, gyarados-mega
Electric Fairy 261 27 1 2.0962838
    ferrothorn, excadrill, venusaur, magnezone, nidoking, rotom-heat, roserade, amoonguss, steelix, shedinja, nidoqueen, victreebel, vileplume, magneton, camerupt, magnemite, numel, ferroseed, bulbasaur, roselia, ivysaur, bellsprout, gloom, foongus, oddish, weepinbell, budew, venusaur-mega
Ground Fairy 271 17 1 2.0883392
    talonflame, charizard, gengar, skarmory, crobat, rotom-heat, weezing, bronzong, shedinja, moltres, golbat, haunter, koffing, fletchinder, bronzor, zubat, gastly, charizard-mega-y
Ghost Ice 305 20 0 2.0710096
    greninja, bisharp, crawdaunt, weavile, snorlax, houndoom, sharpedo, miltank, pyroar, bibarel, munchlax, purugly, sneasel, pawniard, carvanha, azurill, houndour, litleo, gyarados-mega, houndoom-mega
Electric Dark 261 15 0 2.0498759
    breloom, hydreigon, whimsicott, chesnaught, krookodile, virizion, shiftry, cacturne, dedenne, cottonee, zweilous, krokorok, nuzleaf, sandile, deino
Fighting Dark 293 26 0 2.0441354
    azumarill, togekiss, sylveon, clefable, heracross, florges, whimsicott, hawlucha, toxicroak, slurpuff, granbull, aromatisse, dedenne, togetic, cottonee, clefairy, floette, togepi, marill, cleffa, swirlix, spritzee, croagunk, flabebe, snubbull, heracross-mega
This next set is calculated to maximize neutral coverage. It follows the following formula:
1. Gain nothing for being SE.
2. Lose 1 * (OU Usage %) for resistance.
3. Lose 2 * (OU Usage %) for immunity.

Code:
Fighting Ghost 302 0 0 0
   
Ghost Fairy 209 2 0 -0.0019346
    pyroar, litleo
Bug Ghost 194 29 0 -0.0234042
    staraptor, chatot, pyroar, swellow, braviary, wigglytuff, pidgeot, dodrio, noctowl, farfetchd, unfezant, fearow, taillow, starly, jigglypuff, doduo, pidgeotto, fletchling, pidgey, igglybuff, staravia, azurill, tranquill, hoothoot, rufflet, pidove, litleo, spearow, swablu
Ghost Dragon 147 2 4 -0.0388692
    bisharp, wigglytuff, jigglypuff, pawniard, igglybuff, azurill
Rock Ghost 302 9 0 -0.0749253
    bisharp, diggersby, scrafty, krookodile, pangoro, scraggy, pawniard, krokorok, sandile
Ghost Electric 270 13 1 -0.0846715
    hydreigon, diggersby, heliolisk, krookodile, sawsbuck, shiftry, cacturne, zweilous, krokorok, deerling, nuzleaf, helioptile, sandile, deino
Ground Rock 337 10 0 -0.0894422
    breloom, chesnaught, flygon, bronzong, torterra, claydol, virizion, bronzor, baltoy, vibrava
Dark Fairy 205 3 0 -0.1013646
    mawile, klefki, mawile-mega
Electric Ice 328 10 1 -0.1141409
    mamoswine, magnezone, rotom-heat, lanturn, shedinja, magneton, rotom-frost, magnemite, piloswine, swinub, chinchou
Electric Dark 261 15 0 -0.1291682
    breloom, hydreigon, whimsicott, chesnaught, krookodile, virizion, shiftry, cacturne, dedenne, cottonee, zweilous, krokorok, nuzleaf, sandile, deino
Normal Ghost 113 4 0 -0.1453766
    tyranitar, bisharp, pawniard, tyranitar-mega
Flying Ghost 271 6 0 -0.1563087
    tyranitar, bisharp, heliolisk, pawniard, helioptile, tyranitar-mega
Ground Ghost 274 10 23 -0.1690504
    mandibuzz, hydreigon, staraptor, honchkrow, chatot, swellow, braviary, murkrow, sawsbuck, shiftry, cacturne, pidgeot, dodrio, noctowl, farfetchd, unfezant, fearow, taillow, starly, doduo, vullaby, pidgeotto, fletchling, deerling, pidgey, staravia, tranquill, hoothoot, nuzleaf, rufflet, pidove, spearow, swablu
Poison Ghost 195 11 0 -0.1756437
    tyranitar, bisharp, diggersby, krookodile, drapion, skuntank, pawniard, krokorok, stunky, sandile, tyranitar-mega
Ghost Grass 250 43 7 -0.208557
    mandibuzz, bisharp, hydreigon, staraptor, honchkrow, houndoom, drapion, chatot, miltank, pyroar, swellow, braviary, murkrow, skuntank, sawsbuck, shiftry, cacturne, bouffalant, pidgeot, dodrio, girafarig, noctowl, farfetchd, unfezant, stantler, fearow, taillow, starly, zweilous, doduo, vullaby, pawniard, pidgeotto, fletchling, deerling, pidgey, staravia, azurill, tranquill, stunky, hoothoot, houndour, nuzleaf, rufflet, pidove, deino, litleo, spearow, swablu, houndoom-mega
Ghost Water 233 14 2 -0.2172182
    greninja, hydreigon, crawdaunt, heliolisk, sharpedo, sawsbuck, shiftry, cacturne, bibarel, zweilous, deerling, carvanha, nuzleaf, helioptile, deino, gyarados-mega
Ghost Steel 196 15 0 -0.2214739
    greninja, bisharp, crawdaunt, heliolisk, houndoom, sharpedo, pyroar, bibarel, pawniard, carvanha, houndour, helioptile, litleo, gyarados-mega, houndoom-mega
Ground Dragon 205 5 3 -0.2233454
    togekiss, skarmory, whimsicott, bronzong, shedinja, togetic, cottonee, bronzor
Fighting Rock 360 16 0 -0.2285474
    aegislash-shield, medicham, nidoking, toxicroak, gallade, doublade, golurk, claydol, nidoqueen, meditite, honedge, baltoy, croagunk, golett, medicham-mega, mewtwo-mega-x
Fighting Flying 355 10 0 -0.2298739
    aegislash-shield, thundurus-incarnate, zapdos, thundurus-therian, doublade, dedenne, rotom, rotom-fan, emolga, honedge
# Final Notes

I did write this program up today in a couple of hours, so there still might be some bugs in it. It was implemented in Python using the Veekun Pokedex SQLite database as a backing. Any feedback is welcome, as is any feedback on the current formula being used.

# Updates
2.21.14: Fixed a minor bug where it was miscounting the number of Pokemon that resisted/were immune to an given attack pair.
2.22.14: Fixed a minor bug where Abomasnow-Mega's typing was accidentally set to Electric/Ice.
 
Last edited:
I did write this program up today in a couple of hours, so there still might be some bugs in it. It was implemented in Python using the Veekun Pokedex SQLite database as a backing. Any feedback is welcome, as is any feedback on the current formula being used.
Interesting. As an FYI, my experiments have led towards Pokemon Showdown's source code. I usually just download this file and run analysis on it now.

Ghost Electric is the attack combo that is most surprising to me. I never noticed it in my charts, but it is theoretically a great type according to yours.
 
Interesting. As an FYI, my experiments have led towards Pokemon Showdown's source code. I usually just download this file and run analysis on it now.

Ghost Electric is the attack combo that is most surprising to me. I never noticed it in my charts, but it is theoretically a great type according to yours.
Nice, I probably should have known that file existed since Showdown is open source. I'll open source my little utility once I've cleaned up the code a bit. The Python I wrote is disgustingly hacked together right now.
 
If I understand correctly, the second set of code is pairing pokemon that resists both stab combinations. There is one bug so far as I've seen. Under Electric/Ice combination, Abomasnow-mega is listed as a resistance to both types. This is untrue. Abomasnow itself isn't listed so I suspect there was an issue specifically with Abomansnow-mega's typing.
 
If I understand correctly, the second set of code is pairing pokemon that resists both stab combinations. There is one bug so far as I've seen. Under Electric/Ice combination, Abomasnow-mega is listed as a resistance to both types. This is untrue. Abomasnow itself isn't listed so I suspect there was an issue specifically with Abomansnow-mega's typing.
Good catch. Turns out I accidentally modified the DB at some point in time and messed up Abomasnow-Mega's typing. I've reverted to a clean version of the database and the bug is gone. Since it was a mega, it didn't affect the actual calculated values, but it did alter some of the SE/Resist/Immune counts.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top