Skip to content

BDSP AutoStory: a warp is a fade or a banner; walks report warps (#268 slices 1-3) - #284

Merged
dayfine merged 25 commits into
bdsp/autostory-mine-floaroma-wipfrom
bdsp/autostory-warp-events
Nov 9, 2026
Merged

dayfine merged 25 commits into
bdsp/autostory-mine-floaroma-wipfrom
bdsp/autostory-warp-events

Conversation

@dayfine

@dayfine dayfine commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

A door or tap step used to need its fade, and a walk that slid onto a warp ended in "unexpected transition" (or, on a cave exit's white, a wild battle). Now a warp is its fade or the far map's banner, either one; walks report the fade that ended them, and a planned route that runs a tile or two on onto a warp hands over to the next step as arrived. Fades are judged as uniform screens (dark to rgb sum 225, or white with no battle after it), which replaces the tap step's brightness-drop and banner-only stopgaps; banner OCR now runs only when its box shows, at most twice per showing. Tested with SerialProgramsTests --filter PokemonBDSP::AutoStory (141 passed, 0 failed, 7 skipped, with #255's wild-battle suites merged in): three of #281's Gate cases leave KNOWN_FAILING, and the every-miss case stays there with its 10 single-signal warps (no banner indoors, no fade at open borders) listed, plus a new case for warps that show both. The fade thresholds and the sim's floor/fade stddevs are a model; they still need checking against the Gate frames on console B.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 25 commits November 8, 2026 16:19
01.05's open walk west to (2, 13), beside the Oreburgh Gate's mouth, slid
onto the warp (lab-B 2026-11-08, four runs). A table test plans every
ROUTE step as the walker does and fails on an open leg that may end on
the tile before a door it walks toward. It flagged 01.05's old
by_the_gate and four more: 00.03 above_the_door_again (now counted legs
from the west), 01.02 by_the_east_mouth and 01.05 through_the_gate (two
tiles short of the Gate's mouths, the taps go the rest), and 01.03
above_the_mine (two rows above the warp row, the door run goes on).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Moved unchanged out of StorySim_Tests.cpp, which is at the 1000-line
limit: r75's and r81's old cave exits and the old mine steps. The next
commit adds 01.05's old tap into the Oreburgh Gate beside them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
On lab-B (2026-11-08 15:31 to 15:54) 01.05's walk slid into the Oreburgh
Gate, and its tap step read the Gate's floor (about 46) as the fade and
waited 8 s for a banner already gone. A look after a tap is the fade only
when black (< 25) or a drop to dark from the look before the tap
(tap_faded()). A banner before the first tap means the walk before took
us through: the step ends with no tap. A tap step taps at most two past
the door its map has ahead, so one begun through the warp with its banner
gone fails a few tiles in, not across the Gate.

Tests: tap_faded() on the Gate's floor and real fades; the story sim's
01.05 tap step begun through the Gate's mouth, banner up and gone (red
before: 24 taps across the Gate); GridSim's part-tile offset taking the
warp on the old open walk west.

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

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

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

On lab-B (2026-11-08 16:50, 01.08 below_the_ravaged_path) the leg
"west 2 (to wall)" from Route 204 (13, 2) stopped at once, 0 chunks moved:
the youngster who wanders (12, 2) to (14, 2) stood a tile ahead. The wait
for the way needed a stop three tiles short of the wall, so he was talked
to at once, and the replan from both (12, 2) and (13, 2) found no plan: an
uncertain start needs a wall both tiles reach, and no wall is anchored
from a tile someone wanders on.

A walk to the wall that never moved stopped where it began, so someone
stands on the next tile: it now waits for the way on short legs too, and
if they stay, the replan starts from the start tile alone with their tile
marked. Two Planned route tests replay the run.

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

On lab-B (2026-11-08, 01.08 below_the_ravaged_path) the plan "north 35
(to wall) to (13, 2), west 2 (to wall) to (11, 2)" walked along the row
Route 204 South's youngster wanders, (12..14, 2). He stopped the leg west
after 1 of 2 tiles; the check at the wall allowed a tile short on legs of
two or three tiles, so the route logged arriving at (11, 2) from (13, 2).

New tests, red on this commit:
- Route planner: a leg may cross a row zone (one tile of it) but not run
  along it (two tiles, the start among them); no plan when the row is the
  only way.
- Story table: every ROUTE step plans and none runs along a wander zone;
  01.08's plan walks at most one tile of (12..14, 2).
- Planned route: a 2-tile leg to a wall that ran out of time after 1 tile
  is a stop short of the wall, not the wall.

The two #271 tests that replayed the console's leg along the youngster's
row now replay it on a plain room: the planner will no longer plan it.

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

plan_robust_route() no longer uses a leg that walks two tiles in a row of
a zone where someone wanders (the leg's start among them): along a row
zone, or through a 2-D one. Crossing a row zone through one tile is still
planned at per_wander_tile, with #271's wait if he stands there. With no
other way there is no plan; nothing falls back.

A leg to a wall of 3 tiles or fewer that runs out of time short of its
tiles is now a stop short of the wall (talk, then plan again), and the
check at the wall needs every tile on such legs.

Plans that change: 01.08 below_the_ravaged_path goes up column 14, then
12, and crosses the youngster's row at (12, 2) only; 00.05b
below_the_tv_clown and 01.03 above_the_mine go round their wanderers.
The story sim now plans ROUTE steps as walk_route() does (from a wall for
a few start tiles, then default costs): from 01.03's two start tiles the
search over both ran out of budget on the longer way. The grid sim's wait
test crosses a row zone on a plain room, and Segment00Lines' reference
line for 00.03 goes along Route 201's row 13, above the Breeder.

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

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

Recovery from a few possible tiles pinned the wall with the fewest held
tiles and ignored the way on to the goal: after Taylor's battle on line 5
it held south 12 and walked 12 back where north 13 and 5 south would do.
It now plans the way on from every anchor and keeps the cheapest whole walk.

01.10's last line ran an open leg up column 11, which has no wall north;
a wild battle on it left no plan. The row now runs north until Floaroma's
banner, which ends the same from any tile of the column, and 01.11 starts
from the rows the run may stop on.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
lab-B 2026-11-08 18:41: 01.11's 8 taps west, then north, ended below the
old man and no one answered the old woman's talk. A grid sim test walks
01.11 to her from each of the nine tiles Floaroma's banner stops us on:
the old taps (OldStorySteps) must miss her from x 10 and 12, and the
table's walk must end below her from all nine.

The westedge batch found the field's edge 3 taps west of the old man,
a column west of Floaroma's map. SimGround adds that column beside the
map, for this test and for the story sim's 01.11 from now on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
8 taps west from where Floaroma's banner stops us (any of x 10..12) did not
end below the old woman: on lab-B (2026-11-08 18:41) they ended below the
old man. A walk west until the field's edge stops us ends on one column
from every arrival; from below the old man the edge is 3 taps west
(westedge batch 2026-11-08), so her column is 4 taps east of it.

That edge is x = -1, a column west of Floaroma's map. The map is left as
it is (a TODO in the table): the field may go on past it, or the old
couple may stand a tile east of their map points.

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

Conflict in PokemonBDSP_AutoStory_StoryTable_Tests.cpp: both sides reworked
the table walk the door test uses. Kept this branch's table_routes() and
plan_table_route() (the golden dump needs routes from unknown places and
the default-costs flag), and #277's plan_story_routes() now builds on them
for the door, wander-zone and youngster tests.

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

Rewritten with PA_UPDATE_ROUTE_PLANS=1 on the merged tree: the recovery
goal (#278) shortens several localizations, the wander-zone costs (#277)
reroute 00.05b and 01.08, and 01.10's line 7 and into_floaroma are no
longer ROUTE steps (#279).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
SimStoryStepIO, SimExecutor and the run helpers move unchanged from
StorySim_Tests.cpp to Simulation/PokemonBDSP_AutoStory_StorySim.{h,cpp},
so other test files can run rows on the same simulation. The header
qualifies Pokemon:: names; the helpers that were file-local stay in an
anonymous namespace.

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

Sim knobs (SimWorldKnobs, all off unless a case sets them):
- slides: an open leg's taps run on; onto a warp the walk sees the fade
  as it looks to its watchers (black: TRANSITION, dim: nothing, white: a
  wild battle), and the far map's banner is up or gone for the next step;
- floor and fade brightness per map, judged by the program's tap_faded();
- wanderers: everyone with a wander box on the maps walks it, seeded;
- late first lines for a talk.

SimFailureCases_Tests runs one case per console failure. Those the
program fails today are on KNOWN_FAILING with the change that is to fix
them; their tests pass while they still fail and fail once they pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
… until fixed) (#281)

* BDSP AutoStory: move the story sim's executor out of its tests

SimStoryStepIO, SimExecutor and the run helpers move unchanged from
StorySim_Tests.cpp to Simulation/PokemonBDSP_AutoStory_StorySim.{h,cpp},
so other test files can run rows on the same simulation. The header
qualifies Pokemon:: names; the helpers that were file-local stay in an
anonymous namespace.

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

* BDSP AutoStory: console failure cases on the story sim, known failing until fixed

Sim knobs (SimWorldKnobs, all off unless a case sets them):
- slides: an open leg's taps run on; onto a warp the walk sees the fade
  as it looks to its watchers (black: TRANSITION, dim: nothing, white: a
  wild battle), and the far map's banner is up or gone for the next step;
- floor and fade brightness per map, judged by the program's tap_faded();
- wanderers: everyone with a wander box on the maps walks it, seeded;
- late first lines for a talk.

SimFailureCases_Tests runs one case per console failure. Those the
program fails today are on KNOWN_FAILING with the change that is to fix
them; their tests pass while they still fail and fail once they pass.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…slices 1-3)

Slice 1: a door step is through on its fade or the far map's banner,
either alone (story_arrival_banner(): towns, routes and caves show one,
houses and other floors none). run_into_door() watches the banner too and
returns what it saw; settle() takes the banner after the fact. A tap step
ends on a fade or the banner; the banner after a fade is evidence only.

Slice 2: walks report the fade that ended a TRANSITION and any banner
read (WalkResult::warp, WarpSeen). A planned route whose leg fades with a
warp a tile or two past its end hands over as arrived
(walk_route_to_warp()), and the door or tap step after it is done.

Slice 3: a fade is a uniform screen, dark (to rgb sum 225, a cave's dim
fade) or white (fade_of(), the shared watchers' stddev test). A white
flash with no battle after it is a cave exit's fade, not an encounter.
Removes the tap step's brightness-drop test and its banner-only "through
already" check (the TODO(#268 slice 2/3) stopgaps).

Banner reads are gated on the box showing, at most two per showing
(LocationBannerReads). leg_path() moves to StoryWorld beside warp_within()
to keep PlannedRoute.cpp under 1000 lines.

Sim: the walk and tap step judge the sim's fades with fade_of(); floors
are textured, fades uniform (a model). Three #281 cases pass and leave
KNOWN_FAILING; the every-miss case stays, its single-signal warps listed,
and a new case checks every warp that shows both.

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

#281 merged as 769e8b7, the same tree as its branch tip ca4d9ab; the
add/add conflicts take this branch's files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
… into bdsp/autostory-route-plan-dump

#285 removed the sim-only Floaroma column (SimGround) and put 01.11's field
edge at x 0 on the real map. Keep this branch's StorySim.{h,cpp} layout and
drop every SimGround use there, in StorySim_Tests.cpp and SourceFiles.cmake.
StoryTable.cpp, GridSim_Tests.cpp and the StoryTable tests take #285's content.

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

GridSim walk_to_wall: keep both the scripted wall-leg wild battle count
(#255) and the warp fade report (#284).

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

The squash has the same tree as bdsp/autostory-route-plan-dump, merged
just before; the add/add conflicts keep this branch's side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Base automatically changed from bdsp/autostory-route-plan-dump to bdsp/autostory-mine-floaroma-wip November 9, 2026 04:36
@dayfine
dayfine marked this pull request as ready for review November 9, 2026 04:46
@dayfine
dayfine merged commit 0192d6b into bdsp/autostory-mine-floaroma-wip Nov 9, 2026
19 of 23 checks passed
@dayfine
dayfine deleted the bdsp/autostory-warp-events branch November 9, 2026 04:48
dayfine added a commit that referenced this pull request Nov 9, 2026
) (#290)

* AutoStory: shared screen events and the judgements over them

A game-agnostic vocabulary of what a story step sees (fades, location
banner, dialog and choice boxes, interact prompt, battle start/end,
player can move, screen still), an observer interface a game implements
with its own detectors, and a run_until watcher form that records events
and stops on chosen ones. The warp judgement (WarpSeen, fade_of) and the
TalkOver judge from BDSP's #284/#289 move here, expressed over the events.

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

* BDSP AutoStory: read the shared screen events and judges

BdspScreenObserver (the talk-over's SceneEyes, made public) reports BDSP's
detectors as the shared screen events, and talk_over(), the walks and the
story sim use the shared TalkOver judge, WarpSeen and fade_of instead of
BDSP's own copies. Behaviour is unchanged.

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

* FRLG AutoStory: screen events from FRLG's detectors

FrlgScreenObserver maps the white dialog box, the selection box, the
battle menu and battle text, and uniform fades to the shared events.
Unit tests on synthetic frames; real frames are the detectors' own tests.

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

* FRLG AutoStory: screen events test builds an empty snapshot plainly

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

* FRLG AutoStory: drop the flat grey frame from the screen-event tests

The battle text box detector reads a flat grey frame as its box; that
frame is no real screen, so it tests nothing about the adapter.

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

* AutoStory screen events: fit the code-health limits

ScreenEvents keeps its set operations; fades and the log text become free
functions (fade_events, fade_in, describe), WarpSeen::see becomes
note_warp(), and the tests use the case-table form.

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

* BDSP AutoStory: use only the shared names BDSP reads, each documented

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dayfine added a commit that referenced this pull request Nov 9, 2026
Moves #226's versions of these files into the PR that owns them. #226 commits:

0192d6b BDSP AutoStory: a warp is a fade or a banner; walks report warps (#268 slices 1-3) (#284)
8eece71 BDSP AutoStory: recovery picks the cheapest whole walk; 01.10 runs into Floaroma (#278)
5493a9e BDSP AutoStory: routes never run along a wander zone; short wall legs walk every tile (#277)
aa19dfa BDSP AutoStory 01.04: 21 taps from below the Center's door to the Gym's
5a16268 BDSP AutoStory: soft cost penalty for wandering hazards and wall check safeguard
9a2eb0a BDSP AutoStory: avoid wandering NPC hazards and simulate wandering NPCs
ac1ef0b BDSP AutoStory: align Oreburgh Mine maps, corridor legs, and Floaroma pathing

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 9, 2026
Moves #226's versions of these files into the PR that owns them. #226 commits:

0d35443 AutoStory: shared screen events and judges; BDSP and FRLG adapters (#268) (#290)
0192d6b BDSP AutoStory: a warp is a fade or a banner; walks report warps (#268 slices 1-3) (#284)
5493a9e BDSP AutoStory: routes never run along a wander zone; short wall legs walk every tile (#277)
71c3ed1 BDSP AutoStory: a wall leg that never moved waits, then plans from its start (#271)
0738cd5 BDSP AutoStory: 01.03 runs straight north up column 46 to the Center
f2567a2 BDSP AutoStory: a battle on a counted leg's first tap re-plans to the step's end
65e145a BDSP AutoStory: a battle on a route leg's first input re-plans too
a0d2204 BDSP walk: do not mark origin as preceding leg when movement moved chunks
f9d253b BDSP AutoStory: tag late encounter origin unknown only when chunks moved <= 1
5a16268 BDSP AutoStory: soft cost penalty for wandering hazards and wall check safeguard
9a2eb0a BDSP AutoStory: avoid wandering NPC hazards and simulate wandering NPCs
ac1ef0b BDSP AutoStory: align Oreburgh Mine maps, corridor legs, and Floaroma pathing

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 9, 2026
Moves #226's versions of these files into the PR that owns them. #226 commits:

24384de BDSP AutoStory: talk-over from events, one rule for scenes and post-battle speeches (#268 slice 4) (#289)
0192d6b BDSP AutoStory: a warp is a fade or a banner; walks report warps (#268 slices 1-3) (#284)
0116fe8 BDSP AutoStory 01.04: take the Gym's taps from the map's doors
aa19dfa BDSP AutoStory 01.04: 21 taps from below the Center's door to the Gym's
d71d6b5 BDSP AutoStory 01.04: drop the brightness check for starting in the gym
ac1ef0b BDSP AutoStory: align Oreburgh Mine maps, corridor legs, and Floaroma pathing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
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