Skip to content

FRLG League retry budget: Full Restore accept rules per fight - #114

Draft
dayfine wants to merge 5 commits into
sim/frlg-pokeguy-chainfrom
sim/frlg-league-retry
Draft

dayfine wants to merge 5 commits into
sim/frlg-pokeguy-chainfrom
sim/frlg-league-retry

Conversation

@dayfine

@dayfine dayfine commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Depends on #113

The League chain only counted one unbroken run, but on console a loss doesn't save and we can save between rooms, so each fight can be retried until it wins cheaply. frlg_league_retry gives each fight a Full Restore budget k, samples entry states from the previous fight's accepted wins, sweeps the Champion over 0-8 Full Restores, and searches the 8-Full-Restore split; a landed Roar/Whirlwind at Bruno or the Champion counts as a soft reset (a failed try). frlg_league_tuning adds optional per-foe plan keys (heal block, attack sequence, kill_order; format stays /1, documented in frlg-league-plan.md), searches heal thresholds for Machamp, Hitmonlee, Lapras and Dragonite, scores Bruno early-reset rules from Onix #1's opening, and compares Lapras kill orders. Results: about 8.5 expected tries for the whole League; Champion 61% per try with 4 Full Restores; Machamp heal below 80 HP with a Super Potion and Lapras below 60 HP lift the accept rates; reset at Bruno only when Speed is still lowered after all 3 X Speed; Strength first on Lapras. Tested with the new heal-block, sequence and budget unit tests plus the planned/pokeguy-chain suites; 500 runs per cell (Bruno 1000), tables in ~/BDSPLab/notes/e4-sim/retry/.

The final plan is now all in plan.json: each fight's goal, item caps (the accept rule, top-ups included) and reset rules, with reserves exactly the later fights' caps so no fight can borrow from a later one (test_plan_budget checks the caps add up to the bag). frlg_league_final searches the Super Potion split (0/1/1/3/1, Dragonite heal block kept) and reruns the chain forward with these accept rules, 2000 runs per fight: about 10.3 expected tries in all, Champion 33% per try with its 3 Full Restores; one Elixir covers the PP, so the Max Elixir is spare. Tables in ~/BDSPLab/notes/e4-sim/retry/final.txt.

…on win by Full Restores, backward allocation
…tion split, chain forward

plan.json gets each fight's goal, item caps (Full Restore 1/2/0/2/3, X Special 6/2/3/2/2, X Speed 0/3/1/0/1,
Super Potion 0/1/1/3/1) and reset rules; reserves are exactly the later fights' caps (test_plan_budget).
Lorelei +6 on Dewgong and Lapras Strength -> Bite -> Bite with a heal block; Bruno early reset after Onix #1.
frlg_league_final searches the Super Potion split and reruns the chain with item-aware accept rules.
between() counts only spendable Super Potions when choosing them over a Full Restore.
…ming along the chain

frlg_league_fr_timing runs four Lorelei variants (plan, no Lapras heal block, never heal,
heal only on a sure KO), chains the plan and the variants forward, and logs every Full
Restore and Super Potion of the accepted wins as a top-up before a fight or an in-fight use
by foe and policy row. Lance's 80% top-up with a Super Potion re-split is one more chain.
run_fight now keeps top-ups, item decisions with their policy row, and the KO line.
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