Skip to content

WIP: BDSP AutoStory: Oreburgh Mine map alignment, corridor legs, and Floaroma pathing - #226

Closed
dayfine wants to merge 177 commits into
bdsp/simfrom
bdsp/autostory-mine-floaroma-wip
Closed

dayfine wants to merge 177 commits into
bdsp/simfrom
bdsp/autostory-mine-floaroma-wip

Conversation

@dayfine

@dayfine dayfine commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

WIP PR containing the end-to-end verified pathing, map alignments, and timing fixes for BDSP AutoStory checkpoints 01.03 (Oreburgh Mine) through 01.11 (Floaroma Town).

  • Aligns Oreburgh Mine B1F and B2F maps to decomp warp tiles (row 21 in B1F, row 10 bypass in B2F).

  • Standardizes down_the_hall to 19 taps and into_the_coal_room to 1 tap with exact warp transition.

  • Implements exact slalom corridor and return path in Oreburgh Mine B2F.

  • Passes all simulation tests: 00.00 to Floaroma with zero regressions.

  • AutoStory core stage 2 (d00f00a): the console StoryExecutor and the sim SimExecutor are now two bindings of one story_action_table() (on AutoStory: story steps meet screen state (action table and interrupts between steps) #122's StoryActionTable/TableExecutor); the old run() guard is ConsoleStepGuard. Behavior unchanged: the 00.00 to 01.11 sim trace is byte-identical and AutoStory: seeded disturbance sim (wild battles, drift, wanderers, missed screens) #262's Monte Carlo results match at the same seeds. New tests check every row's steps have an action, every (kind, variant) runs what the old dispatch ran, and every step the sim stubs needs the console; the sim now reports its stubbed steps per row (stub_report()).

  • AutoStory core stage 7 (56ecb74): run_into_door() and tap_to_banner() now judge fades with BDSP navigation v4: the walker, with battles passed in #129's WarpFadeWatch (DOOR_FADE_RULE, TAP_FADE_RULE). They use the same thresholds as the watchers they replace, now taken from BDSP_FADE_PROFILE, and a fade whose hold went unseen still counts. The sim sends a fade's frames (sim_fade_frames()) through the same watches, and SimMisses::hold can drop one fade's hold. With any single fade's hold dropped, every row from 00.00 to 01.11 still passes. The 00.00 to 01.11 trace is byte-identical. The flash and white-hold limits in the profile are still guesses.

Core stage 5: the story's tap legs place a wild battle by the leg's screen events too. Red first: "a battle on an open leg's taps, placed by its screen events" (east 14, taps 3, 7 before it moved, and 14) failed with the whole leg kept; green after. Full-run trace 00.00 to 01.11 unchanged.

Core stage 5, engine half (b77c917): BDSP binds #122's between-step interrupts (PokemonBDSP_AutoStory_StoryInterrupts.h). Before each step the console watches the screen for 300 ms with BdspScreenObserver and the shared classifier sorts out what it saw. A wild battle is run from (run_from_wild_battle()) and a trainer who saw us is fought (fight()). A dialog is pressed through to the quiet overworld (settle()), and so is a warp's scene, after which the pose is lost. Steps that press through text (MASH, ANSWER, BATTLE, GAME, NEW_GAME) start on a dialog, so a dialog before one of them is not an interrupt. A BATTLE also starts on a trainer's lines and TRAIN on a wild battle, and GAME and NEW_GAME start on anything. ConsoleStepGuard logs each interrupt it clears. The sim binds the same table to dialogs it pops up (SimWorldKnobs::dialog_before). A dialog left up stops a walk or a talk, as on the console, and clear_interrupts = false gives the old behavior for comparison. New Story sim test: with a dialog before every step from 00.00 to 01.11, the run passes when the dialogs are cleared and fails on the first walk when they are left up. The 00.00 to 01.11 trace is byte-identical and the Monte Carlo results are unchanged. The console's 300 ms look and the starts-on list are not yet checked on console B.

Map fix: Mom's call fires on (6, 9), not on the mat (6, 10) (2026-11-09, e5fa8bb; approved by the user). The map's coord event for Mom's call after her heal sits on the door mat (6, 10). On console B it fires one tile earlier, on (6, 9). The sim now fires it on (6, 9) (console_triggers() in PokemonBDSP_AutoStory_StorySim.cpp, which carries a short note), and 00.04's into_moms_call goes round Mom to (7, 9) and runs west until her call stops us.

Evidence:

  • 17:29, lab-B, the first sighting: a walk west along row 9 was stopped by her call on (6, 9), with all 4 taps moved. The step south that followed went out of the door. With the old plan (step onto the mat) on 2026-11-04 12:20, her line came only after that step was pressed, so the step itself moved nobody (r45, r46).
  • 18:08 to 18:53, 00.04 verify ×4 with the new route: each run starts from 00.04's save. Runs 1 to 3 passed. Each time the walk went round Mom to (7, 9), ran west, and her dialogue stopped it after at most one tile, on (6, 9):
    • 18:19:21 into_moms_call: ran west to a dialogue: 2 moved chunks, 1 tiles at most, limit, 0 wild battle(s).
    • 18:30:19 ... 1 moved chunks, 1 tiles at most ...
    • 18:41:19 ... 1 moved chunks, 1 tiles at most ...
    • Screenshots at the moment of the call (player on the rug's edge west of Mom, her line "Dis donc, ma puce ! Tu n'aurais pas oublié quelque chose d'important ?"): run 1, run 2, run 3. Log excerpt: run-excerpt.log.
  • Run 4 failed earlier, at step 12 into_the_house, for an unrelated reason: a wanderer blocked into_twinleaf's "south 33" at Twinleaf (15, 11). The replan's "west 1 (to wall)" had no wall to stop it, so the dead-reckoned pose was off, and the walk ended beside the house instead of on its door (shot). This is now a red case for the route planner (BDSP AutoStory: route bench and shared route scorer #315 follow-up), not part of this fix.
  • Decomp: the event's tile in the Diamond source is the mat. BDSP moved the trigger, much like the other remake differences we have found. Under the map overlay design (PokemonSimulation docs/maps/OVERLAYS.md), this becomes a trigger op on PlayerHouse1F, why: console_measured, when BDSP step 2 moves the BDSP tables to overlays.

Update (a08d4f0): into_moms_call's target is now her trigger (6, 9) itself, a ROUTE with the new variant "trigger" (route costs; RouteWalkPlan::goal_is_trigger), so #315's planner can plan a run west that her call stops. Here it plans taps west onto (6, 9). The BDSP AutoStory suite passes in the headless runner (only AutoStoryResources fails, as before).

@dayfine
dayfine force-pushed the bdsp/autostory-mine-floaroma-wip branch from 8f1840a to ac1ef0b Compare November 7, 2026 22:22
dayfine and others added 23 commits November 7, 2026 15:28
…k safeguard

- StoryWorld: add wander_hazard tracking and wandering_hazard(world, pos)
  helper to distinguish wandering areas from impassable walls.
- RoutePlanner: add per_wander_tile = 3 penalty to TilePlanCosts so
  paths through wander boxes are preferred over long detours while still
  favoring open streets when distances are equal.
- StoryWalkSteps: do not pass wandering hazard boxes into plan.avoid,
  preventing RouteWalker from uncovering and severing main thoroughfares
  such as Oreburgh City column 46.
- Walk: raise WALK_BLOCKED_CHANGE to 16.0 to detect running in place
  against obstacles and wandering NPCs rather than running to timeout.
- PlannedRoute: bound tiles_moved when stop == WalkStop::LIMIT by
  moved_chunks, and add distance safeguard in check_at_wall requiring at
  least 70% of expected distance traversed before verifying arrival.
- GridSim_Tests: add multi-seed test for Oreburgh City north route,
  test custom map check_at_wall safeguard against stalled legs, and
  update above_the_mine test to path through wander zones.
Check for the Center's inside before lining up on a lit door, give
run_into_door's black-screen watcher a 50 ms hold and log which
watcher fired, and target the map's pokemon_center_doorstep point
below the Center's door.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The welcome leaves the party as Route 203 left it, and every reload of
01.03 replayed a paralysed lead with no PP on its water move. New row
01.02b walks from the welcome to the Center and heals; 01.03 now starts
on the Center's doorstep and routes west to Barry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The doorstep point (46, 21) is west of the door: on lab-B the route there
ended against the wall and the heal found no door (2026-11-07 20:18), and
the grid sim finds no door north of it. Keep the tile below the door.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Counted taps along the coal room's open row 29 drifted on lab-B
(2026-11-07: south 3 moved 2). The walk now leaves the counted legs on
Roark's row (27, 28), walks west against the rock east of him and south
against the room's wall, and taps the last two tiles west.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
They exercise tap recovery on the coal room's nine counted legs, which
01.03 no longer walks as one step. Give them a fixed copy of that walk
instead of looking up the table's step by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 2 commits November 10, 2026 23:38
…s fade-in fails

lab-B 2026-11-10 run 3, 00.04b heal_sandgem: the walk to the nurse began
while the inside still faded in, stopped as a transition after 0 moved
chunks, and failed with "nurse not reached". The sim now marks a seen
door fade as fading in until settle(), and its heal fails when it ends
fading in. Red until the heal settles after the fade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
After the Center's fade, the heal waited a fixed 1500 ms and walked to the
nurse while the inside still faded in (lab-B 2026-11-10 run 3, 00.04b
heal_sandgem; 2026-11-08 heal oreburgh): the walk stopped as a transition
after 0 moved chunks. run_into_center() now settles after the fade (the one
talk-over rule for scenes and doors: fade done and quiet), and a transition
before the walk's first step settles and walks once more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 8 commits November 11, 2026 07:00
The planner's funnel holds walked an open leg as a timed run. On lab-B
2026-11-11 (00.05 to_the_center) "north 20" held for 3175 ms overshot,
the walk lost its place and heal_jubilife found no doorway. Timed runs
overshoot by up to a third; D-pad taps are exact. run_variants() no
longer offers held open legs and RouteWalker walks every open leg by taps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…e health)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
#226 did not compile on Mac against v4's DeclaredPose variant and the
ScreenState intro list. Keeps #226's StoryWalkSteps split for the
conflicting StoryExecutor hunks and ports v4's grid_pose_of() and
sim-leg map changes into it (as lab/dev-bdsp's 359a54e did).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ue; recovery test default legs

The story action table bound every action with no args, so lint flagged
every step's args; it now binds each named action with its spec's args
(events keep theirs). ROUTE's optional legs no longer default to an
empty list on every route step. StoryWalkSteps::legs() lost the
to_dialogue branch in the move out of StoryExecutor (00.04 to_moms_call
failed unknown_action). The recovery tests named the removed \"open\"
action. SerialProgramsTests PokemonBDSP::AutoStory: 42 -> 26 failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…cene

The JSON rows came from v4's table, so #226's table changes were lost:
00.01 stepped onto Mom's mat before leaving (the sim warps there), 01.02
ended at the Center where 01.02b starts from the welcome's (23, 23), and
00.04/00.04b/01.05/01.06/01.10/01.11 lost their walls and named steps. The
rows are converted again from #226's last C++ table (a25e3d1), as on
bdsp/story-engine (33a9d1f).

- ROUTE "trigger" is a named action; 00.03's runs into Rowan's and Dawn's
  scenes name ROUTE "into_scene", which takes the leg to run.
- The old Mom walk's step onto her mat is a plain step, as the table's.
- Goldens regenerated: 00.04's road and 01.05's walk tap their open legs
  (523b040); 00.03's into-scene steps name their costs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 11, 2026
…after #226's merge)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…floaroma-wip

Plan files: lab/dev-bdsp (8415116, console B's branch) already holds
#128's 2fe00a0, the only #128 commit on these files, and runs this
branch's versions of the five that conflict. That commit is content
(legs rewritten as routes), not a format change, so each takes this
branch's version, byte-identical to lab/dev-bdsp:
- bdsp-00.01, 00.04, 00.04b, 01.11, mine-01.03 .plan.json: ours.
The auto-merged plan changes (00.02, 00.05, 00.05b, 01.02, 01.08: legs
to routes) are the same ones lab/dev-bdsp runs.

Code:
- StoryExecutor.cpp: ours; this branch dispatches walks through
  story_action_table(m_walks, ...), so the sim's forwarders are gone.
- StoryWalkSteps.cpp: ours (already reads pose_after via grid_pose_of,
  plus taps_to_banner, through_already, door_run and one_step).
- PlannedRoute.cpp blocked_open_leg: both, as lab/dev-bdsp has it:
  mark_tiles_past() when nothing moved, then blocked_stop_tiles().
- Simulation/StorySimulation_Tests.cpp: Walked keeps both fields
  (measured, golden).
- PlannedRoute_Tests.cpp: union. Includes merged; #128's SimulatedRouteIO
  and its tests (blocked from several tiles, Jubilife kids, the story
  route fault sweep) added beside this branch's tests. Both branches wrote
  a Jubilife held-overshoot test; this branch's (OvershootingRouteIO,
  running) keeps its name, #128's walking one becomes
  test_jubilife_center_walk_overshoot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…te-carlo

Brings #128's seam work down through #167 and #226. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…ro-picks

Brings #128's seam work down through #167 and #226.
Conflict: PokemonBDSP_AutoStory.cpp includes, both NewGame.h (this
branch's IntroPicks) and Actions.h, as lab/dev-bdsp has them.
Semantic: ScreenState gained a field in the base; the language-select
and look-select states pass nullptr for it, as lab/dev-bdsp does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…tings-lang-free

Brings #128's seam work down through #167 and #226. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…ttle

Brings #128's seam work down through #167 and #226. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 2 commits November 11, 2026 22:05
… (code health)

plan_route() grew to 56 lines once #128's golden lines met this
branch's recovered-route planning in the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The merge of #128 brought its SimulatedRouteIO beside this branch's
OvershootingRouteIO, both written for the same Jubilife overshoot, and
took the file over its 1000-line limit. SimulatedRouteIO now times wall
walks at the walk's pace, and one Jubilife Center test runs it with every
timed hold overshooting, running and walking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…te-carlo

Picks up #226's code-health fixes after the #128 merge. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…ro-picks

Picks up #226's code-health fixes after the #128 merge. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…tings-lang-free

Picks up #226's code-health fixes after the #128 merge. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…ttle

Picks up #226's code-health fixes after the #128 merge. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
Brings #128's seam work down through #167, #226 and #364. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine

dayfine commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Folded into #375, the consolidated BDSP console stage (#167 + #226 + #364 + #375, base bdsp/autostory-v4); this branch stays as its history.

@dayfine dayfine closed this Nov 12, 2026
dayfine added a commit that referenced this pull request Nov 12, 2026
…with #128) into lab/dev-bdsp

Brings #128's seam work (StoryRun shell, start gate, golden plans, fault
sweeps) to console B's branch through #167/#226/#364/#375 and #400.
No plan file changes: every BDSP plan JSON stays as lab/dev-bdsp had it.
Conflicts:
- PlannedRoute_Tests.cpp: theirs. This branch's extra lines were the
  cherry-picked SimulatedRouteIO and its blocked-from-several-tiles case,
  now in SimulatedRoute_Tests.cpp on #375.
- CommonFramework/Main.cpp: keep this branch's cleanup after the
  command-line test mode return (headless runner), with main's PA_SDL
  gamepad tracker stop added to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine deleted the bdsp/autostory-mine-floaroma-wip branch November 13, 2026 03:26
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