Skip to content

AutoStory engine: verify rows run the verification loop (League fights) - #642

Closed
dayfine wants to merge 5 commits into
frlg/e4-loopfrom
frlg/e4-runner
Closed

dayfine wants to merge 5 commits into
frlg/e4-loopfrom
frlg/e4-runner

Conversation

@dayfine

@dayfine dayfine commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Depends on #641 (base frlg/e4-loop; the diff shows only this change).

The League's verification loop moves into the shared story engine, as the user asked: a checkpoint's plan can carry "execution": {"verify": {"tries": 10, "min_pass": 5, "reset_budget": 5}}, and run_segment() plays that row as phase 1 (tries from one save, no save, stop below min_pass) then phase 2 (retry until a pass, which saves, within reset_budget). A try passes when it completes, the game's postcondition check holds and a new SegmentHooks::verify_pass holds; a failing start check stops the loop. FRLG reads the block into its rows and supplies the pass predicate (the League's item caps, counted from the start save's supplies). Not yet in this PR: splitting 20.01 into five verify rows, removing run_league_fight()/plan_league()/between_fight_action(), and a console top-up step. Tested with the new Pokemon::StoryVerifyRows suite (the loop on a fake game); touched files compiled locally.

A checkpoint's execution can carry {"verify": {"tries", "min_pass",
"reset_budget"}}. run_segment() then plays the row as a loop: phase 1's
tries from its start save save nothing and reload between them, and the
segment stops below min_pass; phase 2 reloads and tries again until a try
passes, which saves, or stops after reset_budget. A try passes when it
completes, the game's postcondition check holds and the game's new
verify_pass hook holds; a start check that fails stops the loop at once.

FRLG reads the block into its rows and passes them to the segment; its
verify_pass is the League's item caps, counted from the start save's
supplies (league_row_pass()). Engine tests run the loop on a fake game.
@dayfine

dayfine commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #652 (frlg/lean), which continues from this branch's tip; the branch stays.

@dayfine dayfine closed this Nov 18, 2026
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