| name | extract-deck |
| description | Reconstruct a player's exact 60-card PTCG decklist from their Kaggle ladder replays (any submission_id → deck JSON). Use to copy/clone/mimic a top-ranker's or opponent's deck, or seed a counter. Triggers — "copy charmq's deck", "リプレイから60枚を複製", "clone sub <id>", "extract the top player's decklist". |
Extract a deck from replays
Given a Kaggle submission_id, download that submission's ladder replays and
reconstruct the owner's MAIN deck (= the most frequent exact 60-card list across
their games) as a JSON ready for a build. Works for any submission_id — ours or a
rival's reached by traversing episodes.
Steps
-
Get the target submission_id. If the user gave one, use it. Otherwise find
it: it appears as an opponent's submission_id in any episode you can list.
-
Run the extractor (replays are cached under references/raw/replays/, gitignored):
cd workspace/exp011_meta_watch
uv run python extract_deck.py <submission_id> [out.json]
- Omit
out.json to just print the decklist + archetype.
- Pass an output path (e.g.
../exp012_nonex/<name>_deck.json) to save the
60-card-id JSON list for a build script.
-
Report the archetype label, ex-card count, and the Pokémon/Trainer/Energy
breakdown (the script asserts it sums to 60).
-
(Optional) turn it into a submission with the /build-submit skill (deck JSON
→ tar.gz → smoke-test → submit after approval).
Notes
- Needs Kaggle API auth + the cabt engine; run via
uv run.
- Pilot choice (updated 07-14): if a PUBLIC DEDICATED pilot exists for the archetype,
prefer it over generic-piloting — the two current-era wins (v020 Archaludon, v021/v023
LO) both shipped a public notebook's own pilot (+ our crash wrapper + targeted patch),
while generic-piloting a foreign deck caps far below the dedicated pilot (deck⊗pilot,
5+ confirmations). The generic
lucario_v2 route (Crustle v004, non-ex v006) is the
fallback when no dedicated pilot exists.
- Also reusable:
exp053_bandpool/extract_band_decks.py (per-archetype REAL decklists
from any cached replay set — how the band pools are built), and scanning all caches for
a deck's signature card ids to find same-deck players (exp054-C).
- A copied deck is only as good as its pilot — validate with
/build-submit's smoke test
before trusting it.