Skip to content

Releases

v0.34.0 — a parallel live suite, and three League bugs fixed

Choose a tag to compare

@haggyroth haggyroth released this 30 Nov 08:30
3a033b8

The live suite now runs in parallel (about 25 minutes down to 8), and chasing why the model-free chain loses the League 44–57 times turned up three real bugs.

Fixed

  • quest('elite_four') no longer refuses once you are inside a League room. The level wall guards the door; with LEAGUE_LOSS_RULE=wall it was also applied after Lorelei fell, in a room that had sealed behind the player, who then looped until the stall detector ended the run.
  • grind() with no level balances to the League's depth floor once all eight badges are won, so it no longer says "Party is balanced" while quest('elite_four') says "only 2 of your team are L58+". The scripted chain also trains the ace to the level a refusal names.
  • The run stats' blackouts count is real: a whiteout inside a skill call (quest, grind) is counted, once. A chain run had reported 7 blackouts for 57 lost League battles.

Changed

  • python tools/live_suite.py --jobs N (default min(6, cores - 2)) splits the live tests across parallel pytest processes, each with its own emulator, balanced by per-test timings. 234/234 in about 8 minutes on a 10-core Mac.
  • The README's scripted-run time is the measured 40–55 minutes.

Measured and left alone: heal trips are 3% of a chain run's time, the League's button presses show no waste, and LEAGUE_LOSS_RULE=wall does not help the model-free chain (the default advise stays).

Full list: CHANGELOG

v0.33.0 — fewer wasted presses, achievements in the log, a press tracer

Choose a tag to compare

@haggyroth haggyroth released this 30 Nov 02:22
4069458

The agent presses far fewer wasted buttons, the terminal shows achievements, and the model nicknames its starter. The work follows a press-by-press audit of the drivers on the real ROM, and a press tracer now ships so it can be repeated.

Fewer wasted button presses (real ROM, same scenarios before and after)

  • Poké Mart: the player no longer walks into the counter 32 times before talking to the clerk, and shop() no longer silently skips items. A Vermilion shop went from 160 presses to 90; a Cerulean shop from 358 to 149, and it now buys all six planned items instead of three.
  • New game: the 13 attempts to leave Oak's lab before choosing a starter are gone, and the intro no longer probes every text box with Down + Up. A whole new game went from 1,314 presses to 1,106.
  • Pokémon Center: a heal at the counter went from 28 presses to 12, and a first visit to a town (the stop that registers it) from 89 to 45.
  • Catching and saving: a failed catch went from 37 presses to 27, and save_game from 24 to 18.

Achievements and the terminal

  • Unlocks print as 🏆 Achievement Unlocked - 'Humble Beginnings' - Defeat your rival in Professor Oak's Lab. - 1 Point (1 Point Total) and are recorded in run.jsonl. Local tracking is always on.
  • Half-updated Pokémon frames no longer log bursts of learned move_4272.

The model chooses, one choice at a time

  • STARTER, PLAYER_NAME and RIVAL_NAME in .env are each the human's choice if set and the model's if blank (STARTER=charmander alone leaves both names to the model). The starter's and Lapras's nicknames are always the model's.

Reliability

  • Two more Cable Club flakes fixed: the trade swap and the walk to the seats are now driven by what the game shows, and a trade that did not happen fails with evidence instead of reporting success.

Tooling

  • python tools/trace_presses.py --fixture vermilion --tool shop --timeline shows what every button press of a driver did (a move, a turn, a bump, a key the game dropped).
  • Every tool call's button presses and frames are recorded in run.jsonl, and python tools/analyze_run.py lists the tools and calls that cost the most. Press budgets for the fixed drivers are pinned in the live suite.

Upgrading from 0.32.x

  • No breaking changes. If your .env sets PLAYER_NAME / RIVAL_NAME / STARTER, those are still yours; leave any of them blank and the model now picks that one.
  • run.jsonl tool records gain presses and frames; older logs simply lack them.

Full notes: CHANGELOG · Full range: v0.32.0...v0.33.0

v0.32.0 — the whole game, start to Hall of Fame and beyond

Choose a tag to compare

@haggyroth haggyroth released this 29 Nov 05:09
af7a859

The first release since 0.31.2 — about 570 commits. Agent Indigo now plays the whole game: a new game to the Hall of Fame, then the side quests, the Sevii Islands and the post-game. A model-free scripted run of the story chain clears the Hall of Fame in about 40 minutes; how far a real model gets depends on the model.

The whole story, as quest(...) beats. 54 resumable beats — 22 on the road to the Elite Four, 32 optional: the new game, the eight gyms, S.S. Anne and Cut, Bill, the Rocket Hideout, Silph Co., Pokémon Tower and the Poké Flute, the Safari Zone, Victory Road, and the Elite Four. After the Hall of Fame: the Sevii Islands, the legendary birds, Mewtwo, the Pokédex plan, the Game Corner and the rest.

A team that gets built. PC and party control, catch policy and shinies, IV / EV / nature quality grades, team reports that say what the next gym needs, held items, move tutors, the Move Deleter, the Day Care, the Name Rater, and a shop that buys what the money allows.

The Cable Club trade partner. Two emulator cores on a virtual link cable run the game's own trade code: trade_evolve for Kadabra, Machoke, Graveler and Haunter, and link_trade for the FireRed exclusives (needs your own FireRed ROM). Failures keep their evidence under logs/link_failures/.

Navigation and battle. A region-aware map graph generated from the pokefirered decompilation, Fly when it saves walking, the Cycling Road, HM field moves. Battles rank moves by type, STAB, immunities and foe abilities, and the model plays every fight.

Reliability and measurement. A skill watchdog, checkpoints and resume, one journal per save, a live event stream and per-run logs, an eval harness, local RetroAchievements tracking (124 of 128 achievements mapped), and a runtime allow-list of the only memory writes the agent may make.

Quality gates. About 1,500 hardware-free unit tests on Python 3.11–3.14; a 229-test live suite against the real ROM that is a required check on every merge; CI regenerates every decomp-derived table and fails on any difference.

Upgrading from 0.31.x

  • The legacy mGBA-http backend is removed. The in-process libmgba binding is the only backend (rebuild it with python -m game._mgba_build if you have not).
  • Boolean settings are parsed strictly. USE_VISION=1 used to turn vision off; it now means on, and an invalid value warns and falls back to the default instead of silently flipping a setting. A start point that cannot be loaded (RESUME, START_FROM_STATE, START_FROM_SAVE) stops the run with exit code 2 instead of starting something else.
  • SAVE_IN_PLACE (on by default) writes in-game saves through to START_FROM_SAVE; evals, tests and scripted runs boot from a copy.
  • The overhead area-map images are removed from the vision input.
  • History was rewritten on 2026-11-28 to drop logs/scripted/ (ROM-derived save states). Commits from 2026-11-14 onward have new SHAs (the tags and everything before are unchanged); if you cloned earlier, re-clone or git fetch && git reset --hard origin/main.

Full notes: CHANGELOG · Full range: v0.31.2...v0.32.0

v0.31.2 — stability fixes since 0.30.0

Choose a tag to compare

@haggyroth haggyroth released this 29 Nov 05:09

Stability fixes since v0.30.0, tagged for the record. The project went from 0.30.0 to 0.31.2 in two days of watched runs; every fix has its own entry in the CHANGELOG.

Battle

  • switch_pokemon fails fast instead of hanging, and brings the right Pokémon in when the battle order shifts.
  • use_move no longer races a fainting Pokémon, handles the active battler correctly, and drives the post-battle menu back to the overworld (the "stuck in the Pewter Gym" stall).
  • The move-learn driver no longer stalls, and evolution is allowed to run.

Navigation

  • Cerulean / Mt. Moon routing fixed (Route 4 is a split map); Mt. Moon navigation fixed.
  • Fixes for the Poké Center exit stall.
  • Travel auto-fights the trainers on the way (0.31.0).

Guardrails and hygiene

  • A transition-hang guardrail; history hygiene and CI hardening.

Full range: v0.30.0...v0.31.2

v0.30.0 — full gameplay skill set

Choose a tag to compare

@haggyroth haggyroth released this 12 Jul 18:21

First tagged release since v0.3.9 — the project matured from the native-backend correctness pass into a full deterministic-skill agent. Highlights across 0.4.0 → 0.30.0:

Navigation & world

  • go_to cross-map/warp routing (BFS over the generated map graph), walk_to A* with NPC/ledge avoidance, go_to_map edge crossings; region-aware routing through split maps (Viridian Forest).
  • Stall detection that breaks the travel retry loop with actionable guidance.
  • Ground item pickup (pick_up_items).

Battle

  • use_move (drives the FIGHT menu by memory), flee_battle, catch (gBattleOutcome-verified), use_item (Potions/status cures), switch_pokemon (bring in another party member).
  • Deterministic level-up move-learn driver (never cripples the moveset).
  • Status-aware battle observation + best-move ranking.

Progression & survival

  • heal, shop (badge-gated par-level restock), grind, team-building (go_to stops on new wild species + roster nudge), overworld PP awareness.
  • Authoritative badge detection/reconciliation; next-unbeaten-gym routing.

Robustness / ops

  • Run guardrails: per-call LLM_TIMEOUT + wall-clock cap (an unattended run can no longer hang for hours).
  • Eval harness (python -m evals) with goal predicates + scorecards.

See CHANGELOG.md for the full per-version history. Known follow-ups tracked in issues (HMs/dungeons #94, party-switch reliability, minor robustness items).

v0.3.9 — Reward completeness

Choose a tag to compare

@haggyroth haggyroth released this 08 Jul 01:35

Rounds out the reward schedule (since v0.3.6).

Rewards

  • trainer_win now fires — via the real gBattleTypeFlags (0x02022B4C, TRAINER bit 0x08), verified against live wild vs. trainer battles.
  • key_item now fires on any key-item pickup — via the bag key-items pocket (gSaveBlock1 + 0x3B8), a generic count that covers all key items (HMs, Silph Scope, Poké Flute, …).

Combined with the earlier gym_leader_win / party_faint wiring (v0.3.3), every reward except the late-game elite_four_win / champion_win now fires, so total_reward is meaningful across essentially the whole playthrough.

Other since v0.3.6

  • Battle "Best move" now ranks by power × STAB × effectiveness (MOVE_POWER table), so a strong neutral move can beat a weak super-effective one.

Known remaining

  • #22: elite_four_win / champion_win still count as trainer_win — distinguishing them needs the E4/Champion trainer IDs from a late-game save. Tracked with a detailed handoff.

Full history: CHANGELOG.md.

v0.3.6 — Native backend + correctness pass

Choose a tag to compare

@haggyroth haggyroth released this 08 Jul 00:42

First tagged release. Highlights since the project's HTTP-transport era:

Headline

  • Native in-process libmgba backend (default) — drives the emulator directly via a cffi binding: no mGBA GUI, Lua, or mGBA-http, deterministic, ~50× real-time. Legacy http backend retained as a fallback.
  • Live viewer — optional pygame window to watch the agent play (SHOW_WINDOW=true).
  • Save loading — boot straight into a battery .sav via load_save() + reset().

Correctness (verified live against real save states)

  • Context detection rebuilt around gMain.callback2 — the old OVERWORLD_FLAG read 0 during free-roam (overworld was misdetected as TRANSITIONING). Overworld / battle / dialog / menu / transition are now all correct, including a general "field menu open" flag so every menu (Start/Bag/Party/…) reads as IN_MENU.
  • Badge sync no longer overwrites game RAM (RAM is the source of truth; LTM reconciles monotonically).
  • Battle journal logs the Pokémon that actually fought, not always the lead.
  • Agent pipeline fixes: wait_frames advances the emulator; history trimming can't orphan tool messages (no more mid-run API 400s); loss-lessons reach the model; gym-win/faint rewards fire; best-move excludes status moves and applies STAB.

Infrastructure

  • Hardware-free test suite + GitHub Actions CI (Ubuntu 3.11–3.13 unit tests, macOS native-binding build).
  • Docs (README/CLAUDE.md) rewritten for the native architecture.

See CHANGELOG.md for the full history (0.2.0 → 0.3.6).

Known deferred work: #19 (base-power move ranking) and #22 (trainer/E4/champion rewards).