Repository navigation
Conversation
…odel The planner searches for the cheapest legs (hold one direction, then the next) and prefers legs that end against a wall. Each game supplies what one press of a direction does; the planner doesn't know any tile legend. Tested on a small made-up game. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Holds one leg while watching for what can stop it part-way. On an interrupt, a leg to a wall is held again and an open leg walks what is left, estimated from when the interrupt was seen. The bookkeeping is a plain function, tested with scripted holds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Routines that mash a button or hold a direction for a fixed time break when an input drops or a stray press opens a menu, and nothing notices until much later. run_screen_machine() is the closed-loop alternative: it reads the screen (two frames must agree), takes the one step that state calls for, and fails on a screen the previous state cannot lead to, a state seen too often or too many times in a row, eight steps that change nothing, or the timeout. A capture that drops out for up to 10s is waited out. StepTrace logs each change of recognized screen with a numbered screenshot and each input, and a failure lists the screens that led to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
# Conflicts: # SerialPrograms/Source/ComputerPrograms/ComputerPrograms_UnitTestRunner.cpp
BDSP's hand-traced tile grids, now on the shared Direction and TilePos. plan_tile_route() runs Pokemon::plan_legs() on the grid's step rules (a ledge hop is one press of two tiles); plan_robust_route() keeps its own search over sets of possible tiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Tile grids traced from the DP maps, joined into map sets, with named tiles and trainer sight lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
walk_until() stops on what the screen shows; walk_route() walks a plan on the story maps, tracking every tile the player may be on and planning again after a trainer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Names typed on the Switch keyboard or picked from the preset list, each screen read before the next input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Our rewrite of segments 00 and 01 on PokemonAutomation#1717: the closed-loop intro, the planned walks and the battles to the Coal Badge and on to Floaroma. The checkpoint list holds 00 and 01 only; segments 02 to 09 from PokemonAutomation#1717 are kept and still build, but start where PokemonAutomation#1717's own 01 ends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Two d-pad taps north from the house door were meant to put the player level with Mom; on r108b one tap did not move and the A press talked to nobody. The door fixes the column, so face east and press A one row at a time going north until Mom answers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
r109 failed entering Sandgem Town because the banner OCR read "andgemltown". Accept a read within a quarter of the name's letters (edit distance), with the digits matching exactly so one route is never taken for another. Unit test covers the r109 read and negative cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
r113a stopped two tiles west of the counted tile (44, 3), facing away from her, and talked to nobody. Add talk_to_adjacent_npc(), which turns each given way, presses A and keeps the direction a dialogue opens from. Probe east, west, north and south for her, and tell apart "nobody answered" from "she talked but no Potion arrived" (she gives them once). Mom's row search uses the same helper, with only east. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
She does not stay on (43, 3): r113a and r114a walked west along row 3 to its west end through her tile, and found her two tiles east in the row or one tile east and one row up. Take her off the grid, walk to the corner that pins the row (42, 3), then walk east pressing A until she blocks the walk and answers, as done by hand. If nobody answers along the row, try the other sides of where the walk stopped. The walk back plans from the whole row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
r115a: 8 A presses left the Poke Mart lady's Potions talk open and the menu open failed. finish_dialogue() now takes a button instead of an A count: it presses it only while a dialogue box shows and returns once the overworld has shown with no box for 1.5 s (the box blinks off between lines and during "obtained" jingles), failing after 40 s. A where a talk asks Yes/No or gives an item, B elsewhere. The Poke Mart lady uses it instead of her fixed 8 A presses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
r116a: the walk back planned east along her row from where she answered. She stood next to us, east; the tall grass kept the screen changing, so "blocked after 4000ms" read as a walk to the far wall, and the next legs (one ending on its time limit) went from a pose that was never there. The player ended at the bottom of the route, not at Sandgem. The map was not at fault: the leg screenshots fit the Route 201 grid. Now walk west along her row to its corner, away from her, then plan with her row and the row below as walls (walk_route()'s new `avoid`): south out of the grass and round by column 57, so every Route 201 leg ends on a wall out of the grass, where a stop can be read. The location banner check accepts any banner seen during the leg, as a wild battle or a second walk to the wall may come after it. The offline plans test checks the walk back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…al at Sandgem's Center Three runs (r113a..r117a) failed after the Poke Mart lady's talk: the walk back went round her rows through the tall grass, where a walk cannot read that it has stopped, and once she stood in the way every later leg was off. Her row is the top row of the north-east grass (the DP map and the r117a screenshots show her and the player in the tufts right under the tree trunks); east of the grass it is open as far as Sandgem's fence. So the walk now comes to (56,3) on that open strip, which the trees and the sign's row pin, walks west along the row until she answers, and leaves east along the same row to its end at (63,3), requiring the stop to be read there (out of the grass) and waiting for her to move when a walk only runs out of time. From there the open east edge leads south into Sandgem. The planner is left the rest, with a test that no leg on Route 201 ends where a stop cannot be read. After training, the party heals at Sandgem Town's Pokemon Center instead of with the Bag's Potions, keeping them for the Route 202 trainers; the walk to the tile below the Center's sign is the one r75 made. The post-catch half is split into free functions, one per step; the save spot loses its "Potion" name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…er grass r118a: the approach tile (56,3) has no wall to stop on, so the plan went east to Sandgem's fence and back in, and failed on the Sandgem banner. Approach from (53,3) instead: west along row 5 or 6 to the trees, then north onto her row under the trees, and walk west from there. The plan test now checks the route stays on Route 201 once there and ends with the step north. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
She stands on the open ground between the tree trunks above her grass, diagonal to the row, so walking west along row 3 never meets her (r114a, r119a). From the approach tile, face north and west and press A at each tile, stepping one tile west at a time, and fail after the row's west end. Drop walk_along_row_to_talk(), which nothing else uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…eeting the lady The Poke Mart lady on Route 201 wanders between the top grass row and the open ground under the trees above it, and moves while we probe: eight runs (r113a..r120a) never got her talk or the walk back. Drop her and buy the Potions next door to Sandgem's Center instead. New order after the catch: train x3 in the catch grass (from either save), heal at the Center, walk to the Mart's door, buy 5 Potions with buy_items() and check the Bag has them, walk back to Route 202's save spot and save, then the Route 202 trainers and Dawn as before. Potions in the Bag at the start mean step 4's save, so a retry from it goes straight to the trainers. The walk to the save spot first anchors at the trees east of the Mart (SandgemTown::FRONT_ROW_EAST_END): planned from the door's three tiles no leg north is robust and the plan loops round the south of town. The Center's exit walk becomes leave_door_south() so the Mart shares it. Remove the lady's Route 201 anchors, story_potion_giver_row() and her tests; the plan tests now cover the Center-to-Mart, Mart-to-trees and trees-to-save-spot walks, and check those never stop in tall grass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
r121a reached the Mart but enter_door_north()'s whole-tile side steps never lined up with the door: movement is not locked to tiles. Pull the Pokemon Center's sight-based door entry out as enter_lit_door() and use it for the Mart too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…gain when short of it r122a's walk to Sandgem's Poke Mart counted itself to the door's row but stood three rows south of it (someone wandering the dirt stops an open leg short), and enter_lit_door() then failed with "no lit doorway on screen": it only looked at the band just above the player (y 324..628 of 1080, tuned for the Center's door straight ahead), and its colours were the Center's yellower door (255, 255, 185), not the Mart's (235, 243, 205). Look for the doorway over the upper two thirds of the screen, as the pale yellow-white columns at least 32 px tall (the roof bands are 12 to 20) and the biggest such run near the middle, and give its position as tiles across and rows up from the player, whom the camera keeps at the centre. enter_lit_door() steps across by the tiles and walks north for the rows, looking again after every move, and says so after 12 moves. The Mart step reads the doorway after its walk: shown further than straight ahead, the walk ended short, and it is made once more from the tiles the offset puts us on (give or take one) before lining up. Tests: the two failure screenshots (in CommandLineTests under PokemonBDSP/AutoStory) give the door 0.4 tiles east and straight ahead (r121a) and 0.8 tiles west, three to four rows up (r122a); every block of tiles south of the Mart has a robust plan to its front row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
… to Route 202 through the gap between the signs r123a walked from the trees east of the Poke Mart into a house. The Sandgem grid, read from Bulbapedia's map image, squeezed rows 7..18 into 7..15: the houses' doors sat on row 15 instead of 18, and the east house's wall sat on rows 10..14, where the game has open ground. The plan went south, then west "to" that wall, ran on past it, and walked north into the west house's door (7, 18). Rows 7 on now come from Platinum's land data for Sandgem (pret/pokeplatinum map_data_007.bin collision bits) with signs and doors from its event file. Step 4 now walks six tiles west from the trees and north through the gap between the Center's and the Mart's signs, nudging a tile west if a sign or the Mart stops it, instead of the planner's detour round the south of town where townspeople wander. Tests: the 00.04 walks are checked for legs that could walk into a door, even with open legs running long, and north from every column the west leg may reach. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…or walk at its fade r124a's 00.04 saved beside Sandgem's Poke Mart with a log that said "arrived at Route 202 (30, 19)". leave_door_south() held the stick until a wall: the Mart's fade did not read as black, so the walk went on about ten rows south of the door, and every plan after started from the door's front row. Both "to wall" legs then ended on walls, as walls always do, and the save had no check of its own. The Center's exit overshot the same way (its doorway correction hid it). - leave_door_south() stops as soon as a look differs from the last by more than walking can (the fade reads 121 to 192, a Center's scroll 102 at most), then waits for the fade-in. - save_game() takes an expected location: the save card's name (OCR on its salmon text, made black on white) must match it, or the save is backed out of and the step fails, "About to save in sandgemtown, expected Route 202". Step 4 uses it. The location reading lives in a Location module, with the banner reading and matching moved from RouteWalk. - walk_route() requires the banner of the map it ends on when the walk changes map, over the whole walk, not just legs whose ends sit on one map. north_through_sign_gap() watches for Route 202's banner and keeps only the ends on the map it saw. - With Potions in the Bag, 00.04 reads the save screen's location before planning: Route 202 goes on as before; Sandgem Town walks east to the trees and north to the Mart's row, places itself by Route 202's banner or the Mart's lit doorway, and walks back to the save spot without saving. Tests: the r124a save prompt (CommandLineTests PokemonBDSP/AutoStory) reads "sandgemtown"; the other AutoStory tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #66. Based on PokemonAutomation#1717 at
45a206f0d(branchbase/bdsp-1717), with #66 merged in.Our BDSP AutoStory work on top of the current PokemonAutomation#1717: the tile grids and map sets on the shared planner, the story maps from Route 201 to Route 204, walking by the screen and planned route walks, the new-game intro on the screen machine, and our rewrite of segments 00 and 01 through the Coal Badge to Floaroma. The checkpoint list holds 00 and 01 only; PokemonAutomation#1717's segments 02 to 09 are kept untouched and still build, but they start where PokemonAutomation#1717's own 01 ends. The old Lab Console, its BDSP commands and the BBQ files are left out, and
walk_routeis not on the shared leg walker yet. The segment plan tests pass on the shared planner; the branch needs 00.04 and 01 run on a console before anyone relies on it.🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E