Skip to content

FRLG League sim: planned policy (plan JSON + override table), plan search, console regression cases - #111

Draft
dayfine wants to merge 1 commit into
sim/frlg-league-escalatefrom
sim/frlg-league-plan
Draft

dayfine wants to merge 1 commit into
sim/frlg-league-escalatefrom
sim/frlg-league-plan

Conversation

@dayfine

@dayfine dayfine commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Depends on #110

The greedy per-turn League policy made the mistakes seen on console on 2026-11-16: it spent Blizzard PP before Dragonite, set up for moves with no PP left, used Strength finishers that ran into the trainer's Full Restore, chained Super Potions, and read the wrong threat rows. This adds a plan-as-data policy: a League plan JSON (per-foe move ranking, setup goals tied to the move they serve, PP and item reserves, between-fight targets) plus a small override table (sure KO, KO-risk heal, cures, trainer-heal-aware kill order, PP restore). It also adds a coordinate plan search with Monte Carlo over the whole chain and a Champion setup analysis. The engine now puts HM users on our bench, so Roar and Whirlwind succeed, and trainer items follow pret's 4-slot gate. Schema, rows and the C++ port list are in docs/battles/frlg-league-plan.md. Tested with the FRLG unit tests (new test_planned regression cases for each console failure, the old policy pinned red where it made the mistake) and the engine node tests.

…rch, regression cases

- League plan JSON (per-foe move ranking, setup goals tied to the move they serve,
  PP/item reserves, between-fight targets) and the override table (planned.py).
- Engine: our HM users on the bench, so Roar/Whirlwind succeed and reset stages.
- Trainer items follow pret ShouldUseItem's 4-slot gate.
- Lv54 stats from the console's summary read.
- Regression cases for the 2026-11-16 console failures, kill order and the
  Max Elixir reserve; Champion setup analysis; coordinate plan search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant