Pokemon Nerd Dan

in which I blather on about Pokemon Go, including occasional bouts of code

Now that we've talked about ideal IV spreads and IV floors from the various means of Pokemon acquisition we can put them together and see how things conspire to become even more complicated.

All of the stats I'm using here came from the data/ directory of the api that powers wobbotfet, the Discord bot I wrote to rank your spreads. You can run best_spread.py in the root of that repo to see the results.

Today we're going to focus on Forretress, because the data works out a little bit better than Charizard.

In which Best Friends are not the best

The optimal Forretress for Great League is 0/9/15.

Having read my previous two posts, something about that should jump out at you.

The only way to have an IV of 0 is to catch it in the wild without weather boost.1

Many times this doesn't matter: you could trade with a Good Friend, for example, and have spread rank #2 (1/15/15). But it bears keeping in mind that the higher your friendship, the more IV spreads that are impossible to achieve via trade. The majority of the trades that I make to try to get a decent PVP Pokemon are with the people I interact with most: that is, Best Friends.

The perfect is the enemy of the good (friend)

The highest ranked Forretress you can get from a Best Friend trade is 5/15/13, rank 57. Now, this is still a good Pokemon. Its stat product is 98.75% of perfect. If you have this Pokemon, use it!2

Instead of urging you to eschew your friends and family and start a new life on the docks, constantly seeking out new trading partners with whom you have no emotional connection, what I'm trying to illustrate is when you should consider something good enough.

Let's switch Pokemon again, to an example given by Charm2Sul in my local Discord: they have a Skuntank that's 6/13/11, or rank #402 (97.24%). 401 out of the possible 4096 IV spreads are better than this one, which is 9.79%. So you might be tempted to keep looking instead of powering this one up: after all, it's like 1 in 10 that you find a better skunk!

But that's only wild catch. Here's the full breakdown:

  • 9.79%: Wild catch
  • 8.68%: Trade with Good Friend
  • 7.58%: Trade with Great Friend
  • 6.78%: Trade with Ultra Friend
  • 5.9%: Weather boosted catch
  • 4.73%: Trade with Best Friend
  • 0.46%: Hatched/Raid/Research
  • 0%: Lucky Trade

There are 401 better Skuntank than 6/13/11, but only 15.7% of those have their lowest IV as 5 or higher (ranks 52, 59, 60, 67, 72, 81, 128, 149, 150, 151 are the 10 best). Depending on what your local friendship situation is you may have a hard time doing better.

A skunk in the hand is worth two in the tall grass.

Ask a robot if you can do better

Much like determining IVs and calculating spread rank/stat products, this can and is facilitated by coding. You can ask wobbotfet !betterthan skuntank 6 13 11 to see what your chances are of getting a better spread from the different methods/floors.

There are always exceptions. No exceptions.

I should have covered this in the IV spread post. My apologies.

There are some Pokemon that either don't or barely reach 1500 CP at level 40 but are nevertheless strong enough to be meaningful in PVP. Medicham and Sableye max out at 1431 and 1476, respectively. Azumarill and Bastiodon barely make it.

PVP subverts the “bigger is better” IV rule, and these Pokemon in turn subvert that rule. If it maxes out at under 1500 then you do want as close to 15/15/15 as you can get.

For most Pokemon the IV floor is inversely proportional to your chance of getting a better one: floor goes up, chance goes down. For the Dust Busters the chance goes up: and a Lucky Trade would reduce the amount of your dust life savings you have to pour into the damn thing.

And then it starts getting weird

I was preparing a “weird esoterica” section but it rapidly started ballooning to the point where it detracted from the actual useful not-fun-edge-case information here. Expect that soon.


1 Or to trade with someone you've befriended but never interacted with, to be fair.

2 Except for how, in my experience, Forretress is only useful against grass, which Mantine also is and doesn't literally melt when faced with a fire type. I want to love my shiny golden orb, but I'm not sold.

Yet another building block in the PGo PVP series.

CP in Pokemon Go

CP itself has two functions in the game:

  • to be a reflection of a Pokemon's stats
  • to act as a cap for Great and Ultra league

That's it. Not just “as it relates to PVP”. That's it. CP is a summary of stats, not a stat itself that's ever used in the game.

The second point leads to an interesting nuance in CP-capped PVP.

The CP formula

CPM = (a number based on level from 0.094-0.79030001)
stamina = (base stamina + stamina IV) * CPM
attack = (base attack + attack IV) * CPM
defense = (base defense + defense IV) * CPM

CP = MAX(10, FLOOR(Stamina^0.5 * Attack * Def^0.5 / 10))

The key bit: you use the square root of stamina and defense when calculating CP, but the value of attack on its own. This means that a Pokemon's attack IV has a much larger impact on its CP than stamina or defense.

Bigger is better, unless...

...unless?

See that line at the top about CPM? It's a multiplier that goes up with each level1. This means that in addition to attack, defense and HP/stamina, there's a fourth factor in how “good” a Pokemon is for PVP: how high of a level it can be and stay under the CP cap.

A case study: Charizard

Let's say you're preparing for the Silph Arena cup for the month when this was written (June 2019), which is the Rainbow Cup. PvPoke says the best overall (and lead) option is Charizard with Blast Burn.

“Great!”, you say. “I managed to get a perfect 15/15/15 one with Blast Burn on Community Day, and it's Great League eligible!”2

But not so fast! Let's look at the TDO (Total Damage Output) of that flappy boy:

  • IVs: 15/15/15
  • CP: 1486
  • Level: 18.0
  • Attack: 134.887571
  • Defense: 106.549846
  • HP: 113
  • Stat Product: 1624064.2406621396

1.6 million? That's a lot of... product? But consider this one (insert end-of-Clue title cards mentally)

  • IVs: 0/15/13
  • CP: 1500
  • Level: 19.5
  • Attack: 131.54500330559998
  • Defense: 110.89892655359999
  • HP: 117
  • Stat Product: 1706819.3602294535

Ignore the CP increase: it's a red herring3. You do take a 3 point hit to attack, but due to it being three levels higher the defense and HP are each 4 higher, giving you a stat product of 1.7 million. That's 100,000 higher! (100,000 what? uh, product!)

The whole paradigm done just shifted

attack is out, defense/stamina are in!

Learning this bit of mostly-inconsequential math singlehandedly turned Pokemon that are appraised as having attack be their best stat from being the ones I star/evolve to being fodder for Professor Willow's Pokemon Compost Machine.

Making robots do this math for you

The most popular site to check an IV spread is GO : Stadium (neé Pokemon PVP Club). I like mine better, because I made it. (It also does the calculations client-side, which means the burden of calculation isn't on my server, which is — along with a baby — what I gather caused the demise of Pokemon PVP Club)

I've also written a Discord bot, wobbotfet, which you can query with !rank charizard 0 15 13, or !vrank charizard 0 15 13 to get the detailed numbers of how it calculated the rankings. It's how I gathered the numbers for this post.

If you'd like to add wobbotfet to your Discord server, here's the URL to invite it. !rank help will tell you nearly everything you need to know, including a third command that I'm leaving for another post.


1 Really, each half level, because instead of numbering levels from 1-79 like decent people Niantic has made then 1, 1.5, 2, 2.5 ... 39.5, 40. Because, as far as I can tell, they want to make those of us who code in statically typed languages like civilized folk cast between int and float a bunch.

2 First off, stop gloating. Damn CD Pokemon released before we cared about sub-1500 CP, grumble grumble...

3 Like Communism.

I just added this to the custom stylesheet of my blog (/me/c/<blogname>):

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 5px;
}

th {
    border-bottom: 1px solid #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
} 

Lately I've been focusing my obsessive nature on Pokemon Go. Which, yes, is still a thing, and you can do more than catch another goddamn Pidgey.

Because, like the main games, you can chuck some balls at the various critters that pop up and call it a day — which is a completely valid way to play — or you can get deep into the mechanics. I've gone a step farther and written tooling to explore the mechanics. (Parents, next time you hear “teach your kids coding!”, remember they might turn out like me)

IVs

There's been plenty written about Individual Values in Pokemon Go, so I'll just link to Pokemon GO Hub and call it a day.

Except to add that the values of an IV — a number between 0 and 15 — can be expressed in four bits (0000 to 1111). Which is also known as a nybble, because it's smaller than a byte. Computers can occasionally be adorable.

IV floors

Something that I haven't really seen documented anywhere, at least in a concise manner, is that in certain circumstances a Pokemon's stats will meet one of a number of IV floors: that is, each one is guaranteed to be at least a certain number.

The most well known of these is a “lucky Pokemon”, which was the result of a Lucky Trade (whether by crazy random happenstance or through a trade with a Lucky Friend). Lucky Pokemon are guaranteed to have at least 12/12/12 IVs1.

But there's more! Here, have a table:

Minimum IV Condition
0 Wild catch
1 Trade with a Good Friend (one heart)
2 Trade with a Great Friend (two hearts)
3 Trade with an Ultra Friend (three hearts)
4 Weather Boosted
5 Trade with a Best Friend
10 Hatched/Raid/Research breakthrough
12 Lucky Trade

For PVE (gym battles) and raids, higher IVs are always better. For PVP, though, things get trickier, and as such trading with better friends can actually make it harder to get the stats you want. But more on that later.


1 I'll be using the standard format of attack/defense/stamina (or HP) for IVs