Under the Hood

Drafted by an LLM, reviewed and edited by TitanTrainers15 and others.

This guide is for readers who already know PvP IV analysis - anchors, breakpoints, bulkpoints, CMP - but haven’t seen the internals of this tool. It walks the pipeline end to end. Nothing here assumes you read code.

If you’re looking for “what do these terms mean” rather than “how is this generated,” the other six guides are a great starting point.

What the tool actually does

For each dive, we sim each of the 4,096 possible IV spreads of the focal species (0/0/0, 0/0/1, …, 15/15/14, 15/15/15) at their best under-cap level against a pool of opponents (currently GL top-50 plus Championship Series additions, ~65 species), across all nine shield scenarios (0v0 / 0v1 / … / 2v2), under two opponent-IV variants (PvPoke default vs stat-product rank 1) and two bait policies (selective vs never-bait). One “score” per focal IV spread × opponent × scenario × opp-IV × bait cell. That’s the raw input to every narrative and category decision on the page.

The sim itself is a pure-Python port of PvPoke’s JavaScript ActionLogic and Battle engine; we verify exact score parity against PvPoke on a fixed oracle set. When we diverge, we document the divergence and pin the case as an expected-failure test (xfail in pytest; Paul Ganssle’s post on xfail-vs-skip is the short read if you’ve never used it) rather than quietly differ. (There are a handful of known PvPoke bugs we intentionally don’t reproduce; the How This Works guide walks through the parity check at a higher level.)

The pipeline, top to bottom

The dive’s configuration - which opponents to sweep, which damage breakpoints we care about, which hand-authored tier cutoffs to surface - lives in TOML files under thresholds/. TOML is a plain-text configuration format (think INI with better typing); one file per focal species. The sections and anchors in that file are what the pipeline layers below read from. A minimal example:

# thresholds/tinkaton.toml  (abbreviated)

[Tinkaton]
sources = "HomeSliceHenry's Discord #iv-tech"

# A tier spread: a named stat cutoff that the tier-cards section
# on the dive will render as a row. `source` routes it into the
# gold Expert zone.
[Tinkaton.Great.spreads."GH Good"]
attack = 0            # no attack floor
defense = 141.66      # Medicham Dynamic Punch survival, 1s no bait
stamina = 138         # HP co-floor
description = "Medicham Dynamic Punch survival (1s no bait)."
source = "HomeSliceHenry's Discord"

# A Level-3 damage-breakpoint anchor: enumerate every attack BP
# the sim finds against Jellicent. The resolver picks moves
# automatically; we just name the opponent.
[Tinkaton.Great.anchors.jellicent_brkp_any]
kind = "damage_breakpoint"
opponent = "Jellicent"
description = "Discover all Jellicent damage breakpoints."
source = "HomeSliceHenry's Discord"

Every section under [Species.League.spreads] or [...anchors] becomes an input to the categorization and narrative layers below.

1. Anchors (the TOML authoring layer)

An “anchor” is a single named threshold with a comparison. Three kinds:

You can author an anchor at three levels of precision, depending on how much you know:

Levels are just about which fields you filled in; the resolver handles all three uniformly. A TOML with nothing but opponent names and “Level 3” still produces a useful dive, because we auto-derive anchors even when you don’t hand-author any. Hand-authoring lets you carry expert provenance the tool can’t know: “this is the HomeSlice Henry Discord Tinkaton spread, def≥143.03 + hp≥138 is the Corsola-Galarian 2-GH-survival line.”

2. Auto-anchor fallback

When a species’s TOML is empty or light on anchors, we scan the whole opponent pool and synthesize Level-3 damage-breakpoint and bulkpoint anchors against every opponent that shows signal. The synthesis is gated so that species with rich hand-authored TOMLs don’t get noisy auto-additions on the same axis.

Concretely: if the TOML already has a Level-3 breakpoint anchor against Medicham, the auto-fallback doesn’t synthesize breakpoint anchors against anyone - the whole breakpoint axis is treated as hand-covered. A TOML with only bulkpoint anchors still gets auto_sealeo_brkp_any and friends on the breakpoint axis.

3. Notable IVs (the category layer)

Every focal IV spread gets tagged with the set of anchors it passes. A “category” is a named group of IV spreads sharing some structural property:

Categories are ranked on a selectivity metric (how many IV spreads pass vs the dive baseline) so the ones that actually differentiate IV spreads float to the top.

4. Threshold tier cards

The tier-card block at the top of the dive is separate machinery from the Notable IVs list. A “tier” is a flat stat-cutoff spread with a matchup-flip justification: “def ≥ 141.76 flips 2 scenarios vs Dusclops.” Tiers come from three sources:

Auto-derived and boundary-search tiers are shown in blue (auto), TOML-authored tiers in gold (expert). Both stay in the same grid. The Threshold Tiers guide walks through reading a tier card in more detail.

5. Narrative flavors

This is the purple “IV Flavor Guide” zone on every dive. Derivation:

The IV Flavor Guide guide is the reader-facing companion for this section; this one describes how the flavors get derived.

6. Meta Role (CD articles only)

On CD articles, the Meta Role block above the Move Comparison table is a separate auto-gen surface. It pulls:

Nothing in that block is editorial; every phrase is a literal rollup of sim output. If it reads as editorial, we have a bug.

Four authorship tiers (the colored sidebars)

Every narrative block carries one of four attribution colors:

The Reader’s Guides (including this one) use “both” - LLM-drafted, then human-reviewed and edited. The Species narrative blocks on dives default to “auto” now, replacing earlier ai-drafted prose, so there’s no unreviewed LLM prose on the main dives.

Overriding any of this - for project contributors

The tool is designed so expert authoring always wins over automation. The overrides below all live in thresholds/<species>.toml and apply on the next dive run. There is no client-side UI for this today - adding or removing anchors / thresholds requires editing the TOML in a local clone and re-running the dive. A per-Pokemon custom-anchor surface in your browser is a future feature on the TODO; for now, contributions flow through the project repo.

For removal: the auto-fallback layer is gated per axis, so a TOML that hand-authors a breakpoint anchor against (say) Annihilape suppresses all auto-fallback breakpoint anchors - auto-anchors only appear on axes (breakpoint / bulkpoint / CMP) the TOML doesn’t already cover. If a tier card has too many bullets, the right move is usually adding a hand-authored narrower anchor against that opponent rather than trying to remove the auto one.

If you see something on a shipped dive that you disagree with, there’s a TOML knob for it. The auto-fallback is specifically designed to stay out of the way when authored content is present.

Where to push back

The auto-gen is deterministic; if it says something wrong, the input was wrong (bad anchor, wrong opponent pool, stale TOML) or the template is wrong (a bug). Both are fixable. If something reads like editorial judgment on an auto-labeled block, flag it - that’s exactly the “template writing prose it can’t justify” failure mode we want to catch before it ships.

Battle engine is a Python port of PvPoke; all game data from PvPoke by Empoleon_Dynamite (MIT license). This project would not exist without it.

Part of the PvP dive site. Explainers regenerate from current dive data every publish, so numbers stay in sync with the methodology. Last regenerated 2026-09-28.