Skip to content

FRLG League sim: AutoStory policy old vs new rows - #110

Draft
dayfine wants to merge 3 commits into
sim/frlg-e4-replicafrom
sim/frlg-league-escalate
Draft

dayfine wants to merge 3 commits into
sim/frlg-e4-replicafrom
sim/frlg-league-escalate

Conversation

@dayfine

@dayfine dayfine commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Depends on #109

Ports Arduino-Source #613's budgeted-setup League policy into the chain sim as autostory_old (as run on 2026-11-16 15:35) and autostory_new (sleep cure, Full Restore for a status at KO risk, bigger heal when a heal doesn't outpace the foe, escalate after two item turns, Strength finisher, Hyper Potion and Full Heal budgets). The port now reads the plan's foe_threats rows like the program does, and a two-turn move (Solar Beam without sun) is no KO risk until the foe is charging; before that the Champion was 0% because Venusaur's Solar Beam counted every turn. Adds --level, --fights and --only-foe, and records foe crits per turn.

Current bag (FR 7, X Sp 10, X Spe 5, X Acc 3, GS 2, Max Elixir 1, Full Heal 2), 200 chains each, still 0 full wins at Lv51/54/57. The Champion alone goes from 0/200 to 7-10/200: a landed Solar Beam does 168-198 to our 171 HP. Lance is lost mostly with Surf out of PP (one Max Elixir for the whole League). Tested with the new test_autostory suite (red before the fix); result files are in the lab notes (e4-sim/escalate/fix1).

Real bag read at 17:47:49 (FR 8, X Sp 15, Elixir + Max Elixir), Lv54, 500 chains: still 0 full wins. The program's split gets 34% of chains to the Champion; a p75-based split (FR 1/2/1/3/1, X Sp 4/2/3/3/3, X Spe 0/3/1/1/0, X Acc 0/0/0/2/1) gets 48%, mostly from Bruno and Agatha. Adds --budget, frlg_league_spend (per-fight spend tables) and frlg_league_policycheck, which replays the console's policy lines through the port: 35/47 turns agree. Results in e4-sim/real-bag.

…ith the 2026-11-16 rows (new); --level sweep
…two-turn move's charge turn is no KO risk

The port took D from the live planning_risk(), which counted Venusaur's Solar Beam
(168-198 at Lv54, 171 HP) on every turn, so D >= max HP and the policy only attacked:
the Champion was 0%. The program reads frlg-20.01's foe_threats rows; the port now
does too (by party slot, by species when the party is cut down), poison as the only
residual. Solar Beam without sun (and Dive) threatens nothing until the foe is
charging; then the row applies.

frlg_league_chain: --fights and --only-foe for a subset; each fight records the turns
a foe crit landed on us.
…er-fight spend tables, policy-line replay

frlg_league_chain --budget takes per-fight budgets in place of the planner split.
frlg_league_spend prints won/reached and item spend (mean/p75/p90) per fight and proposes a split.
frlg_league_policycheck rebuilds each 'Battle: policy:' state from the console log, asks the
autostory_new port for its action, and compares it, the foe's damage and our damage with the
engine's previews. Results: ~/BDSPLab/notes/e4-sim/real-bag/.
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