From c8f35b4fce88a8995947958a449eb5d90e99dcc6 Mon Sep 17 00:00:00 2001 From: acamilo Date: Tue, 29 Sep 2026 00:11:14 +0000 Subject: [PATCH] docs: row 64, a ladder underfoot, Route 4's ledges and the way out that goes nowhere (12.28, audit) --- docs/design/macros.md | 62 +++++++++++++++++++++++++++ infra/docs/macros-traps.md | 87 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) diff --git a/docs/design/macros.md b/docs/design/macros.md index 74bb2be..968bbd0 100644 --- a/docs/design/macros.md +++ b/docs/design/macros.md @@ -1650,6 +1650,68 @@ Nothing is ranked or pressed for the fly: frames that were never the fly's deal decoder, the reward catalog, the adapter version, the roles and the compatibility string are untouched. +### 12.28 A ladder underfoot is taken by stepping off it, a ledge is a hop one way, and a way out that goes nowhere is not done (2026-09-28, row 64) + +(12.26 and 12.27 are rows 62 and 63, on their own branches.) Live on v0.6.2/v0.6.4 at rank 12 +(MT. MOON), from 2026-09-26 to 09-28: about 750 macros per ten brain minutes, all `done`, no reward +and no new ground. They were `GO OBJECTIVE` (61%) and `GO WARP`, 27 frames each. Forty-eight flysim +restarts did not clear it. A milestone reset bought a few hours before it came back. + +The pulled checkpoint has the fly on **Mt. Moon B2F (5, 7)**, the ladder up to B1F's exit chamber, +which is the one road on. It reproduces the ring with the ledgers empty; nothing needs rebuilding. + +- **A ladder fires at the end of a step onto it, and at no other time.** `CheckWarpsNoCollision` + runs after a step completes. A bump into the wall beside a warp fires only at a map's edge off the + overworld (`ExtraWarpCheck` uses `IsPlayerFacingEdgeOfMap` for every tileset but the overworld's). + The fly had come down the ladder and was standing on it. `GO OBJECTIVE`, whose first hop is B1F's + exit chamber, and `GO WARP`, whose second tier is the same ladder, both aimed at the tile + underfoot. Both settled there for twenty frames, pressed nothing, and reported `done`. That is + 12.2's trap, with no ledger in it. `GO FRONTIER` was refused `no route` once per restore and marked + the map exhausted (12.14). The mark was **correct**: every reachable tile of B2F's main piece had + been stood on, and the 439 unstood tiles are in its two other pieces. The pad never lacked a way + on. Its two ways on did nothing. +- **A walk that starts on its own step-fired warp steps off and back on.** Taking the warp this way + is what the cartridge requires. The step off goes to free ground, never onto another warp. With + nowhere free it ends `blocked`. +- **Route 4 east of the mountain had no road to Cerulean.** The ledge tile is absent from every + passable list, so the route search read a ledge as a wall in both directions. From B1F's exit the + way down is over ledges (the column at x = 62 and the rows at y = 5 and 9). So `GO OBJECTIVE` + refused `no route`, the east edge rested in the blocked ledger, and `GO FRONTIER` or `GO ITEM` + walked the fly back through the cave mouth (24, 5). It arrived on B1F (27, 3) with a pad of + `GO OBJECTIVE` and `GO OUT`, the same trap one floor up (nobs' "GO OUT / GO OBJECTIVE" of 09-26). + A stray walk over B1F (23, 3) put it back on B2F (5, 7). This is why a milestone reset only + bought hours. +- **A ledge is a hop, one way.** The decoded grid now marks `LedgeTiles` + (`data/tilesets/ledge_tiles.asm`). These count on the OVERWORLD tileset only, read from the + lower-left anchor tiles `HandleLedges` reads. The route search takes a hop from above as one press + that lands two tiles on, if the landing is ground. From below a ledge is still a wall. The flood + that 12.24's pieces are measured with is unchanged. + + `HandleLedges` takes the joypad for the jump, and that reads as a scripted push-back. So the walk + holds while the cartridge carries the fly along the hop's own line. It then plans again from the + landing. Nothing is written to the push-back or blocked ledgers. A wild battle on the landing + still ends the walk. +- **The general half: a way out that does not take the fly anywhere is not `done`.** 12.2's rule is + now held by the executor for every way out instead of by each macro. A `Settle` arrival on an exit + key that leaves the fly on the same map ends `blocked`, and the exit rests in the window. If the + fly never left the tile it pressed from, row 57's refused-from-here ledger (12.21) also keeps the + button off that tile for the window. Without that, the last resort, which ignores the blocked + ledger, would re-deal the dead exit once per hold. This guarantees that **no in-place ring + persists**: at most one no-op per button per tile per window. It cannot supply knowledge the + macros lack. With it alone on base, the live ring broke (1,500 `done` in place dropped to 0 in + 72,000 frames), but the fly still did not reach Cerulean. + +What does *not* guarantee the fly is never stuck, and why it was not built: a repetition budget +that withholds a button after N unrewarded starts. Rows 58, 59 and 61 were rings in which every +macro *moved* the fly across a door, so no effect-based rule sees them. A budget keyed on the fly's +own choice history is a rule about the choice, not knowledge inside a macro (section 12's first +line and the ethos check). In every one of those rows it would have turned a ring into a wait or a +wander, without adding the fact that was missing. The guarantee for those rings stays outside the +fly: the watchdog, the recovery ladder, and the ROM road tests from each trap's checkpoint. + +The decoder, the reward catalog, the adapter version, the roles and the compatibility string are +untouched. Nothing presses for the fly. + ## 13. Shops and Pokémon Centers (the operator, 2026-09-17: "refactor the shop macros. make it a ## priority to visit the shop at least once per area; make shop macros item purchases. same ## for the Pokécenter. heal should be a macro.") diff --git a/infra/docs/macros-traps.md b/infra/docs/macros-traps.md index 04d4d28..e077c81 100644 --- a/infra/docs/macros-traps.md +++ b/infra/docs/macros-traps.md @@ -3051,3 +3051,90 @@ On `main` `510727c` (v0.6.1, row 59 merged): - `npm test` 663 passed; `npm run typecheck` clean; `infra/tests/lint.sh` ALL CHECKS PASSED. - `flysim --print-compatibility`, raw and macros: 648 bytes, sha256 `8ce67b97...a8f68`, the same as `main`. Decoder, reward catalog, adapter version and roles untouched. + +## 2026-09-28, row 64: Mt. Moon's far side, a ladder underfoot and three ledges down + +### What was live + +v0.6.2/v0.6.4 binary, adapter `pokered-unique8-v7`, macros mode, rank 12 (MT. MOON), objective +Cerulean City, from 2026-09-26 to 09-28. The watchdog flagged it as `unrewarded`: about 750 macro +decisions per ten brain minutes, all `done`, no reward, places delta 0. The 09-28 event log has +`GO OBJECTIVE` 41,990 starts, `GO WARP` 25,554, `GO FRONTIER refused` 27 (about one per restore), +and nothing else: no battle and no step. Forty-eight hourly flysim restarts did not clear it. The +milestone-12 reset of 09-26 bought hours; nobs had recorded a "GO OUT / GO OBJECTIVE" pad just +before that reset. + +### Reproduction (the pulled checkpoint, hot generation 218910) + +The fly is on Mt. Moon B2F (`$3d`) at (5, 7), which is warp 3, the ladder up to B1F's exit chamber +(23, 3). With the ledgers **empty** the pad is `GO OBJECTIVE`, `GO WARP`, `GO FRONTIER`: + +- `objective_goals` is `Exit(Warp(3))` at (5, 7), and `ways(Passage)` is `[Warp(3)]` (tier 2, + toward the objective). +- `GO FRONTIER` is refused `no route` and the map is marked exhausted. Correctly: all 452 reachable + tiles are stood on, and the 439 unstood ones are in B2F's north and south pieces and the border. +- Per-frame trace: `GO OBJECTIVE` runs 27 frames with mask `0x00` on every one (a `Settle` arrival + on the tile underfoot) and ends `done`. The next hold does the same. Route survey on main, + 20,000 frames: `GO OBJECTIVE` 205 and `GO WARP` 211 `done`, all on (5, 7). + +With the ledgers rebuilt (`EXHAUSTED=1`, `STOOD=1`) the pad is `GO OBJECTIVE`, `GO WARP` from frame +0. **The coordinator's lead (`GO WARP` and `GO FRONTIER` exhausted) is refuted.** The frontier mark +is correct, and `GO WARP` is never withheld: it is dealt the whole time, at the ladder underfoot. +No ledger removes the way on. Both ways on execute as no-ops. + +**Why it came back after the reset.** Off the ladder (a raw right/left step, then the drive), the +fly goes B1F exit chamber, then (27, 3), then Route 4 (24, 6). There `GO OBJECTIVE` is refused +`no route`, because every road from there to Cerulean's west edge crosses a ledge: the column at +x = 62 on rows 10-15, and the rows at y = 5 and 9. The route search read a ledge as a wall both +ways. The east edge rests, and `GO ITEM` or `GO FRONTIER` walk back into the cave mouth (24, 5). +The fly lands on B1F (27, 3), where `GO OBJECTIVE` settles in place (618 times in 30,000 frames), +or on B2F (5, 7) after a walk over (23, 3). The geometry re-creates the ring; nothing persisted. + +### Fix (three commits) + +1. `014d869`: a walk that starts on its own step-fired warp steps onto free ground beside it (never + another warp) and back on (`CheckWarpsNoCollision` runs only after a step). +2. `e10f48e`: `LedgeTiles` hops. The grid marks them (OVERWORLD tileset only, lower-left anchor + tiles). The route search takes a hop from above as one press that lands two tiles on. The walk + holds while `HandleLedges` carries the fly, so the hop is not written as a push-back. +3. `83e842a` (general, separable): a `Settle` on an exit key that leaves the fly on its map ends + `blocked`. From the tile it pressed from, row 57's refused-from-here ledger also holds the + button off for the window. + +Ablations from the checkpoint: + +- 1 alone becomes a B1F/Route 4 ring (`GO OBJECTIVE` done on Route 4 151 times, `GO ROUTE` on B1F + 150). +- 3 alone breaks the in-place ring (1,500 done in place drops to 0 in 72,000 frames), but the fly + does not reach Cerulean. +- 1 + 2 reach Cerulean at frame 1,972. + +### Before and after + +Route survey from the live checkpoint, 72,000 frames per arm, `main` `eecd574` vs the branch: + +| driver | base | branch | +| --- | --- | --- | +| prefer GO OBJECTIVE, GO WARP | rank 12, 3,290 tiles, 1,500 of 1,500 done on B2F | rank 13 CERULEAN, 3,434 tiles, Cerulean f1973 | +| uniform, seed 7 | rank 12, 3,290, 1,499/1,500 | rank 15 NUGGET BRIDGE, 3,551, Cerulean f3331 | +| uniform, seed 12345 | rank 12, 3,290, 1,499/1,500 | rank 13, 3,436, Cerulean f3041 | +| uniform, default seed | rank 12, 3,290, 1,499/1,500 | rank 13, 3,447, Cerulean f1973 | + +ROM test `the_fly_takes_the_ladder_it_stands_on_and_hops_down_to_cerulean_from_mt_moons_far_side` +(`FLY_ROW64_CHECKPOINT`): + +- base: 167 done in place, never leaves B2F, **fails**; +- branch: the first `GO OBJECTIVE` goes to B1F, 80 hop frames under a walk on Route 4, Cerulean at + f1972, pushed ledger empty, passes. + +### Why nothing inside the fly broke it, and the general guarantee + +The in-place ring wrote no ledger. `Done` records nothing, and every ledger with a window was +empty after a restore anyway. The per-macro form of 12.2's rule had no case for a warp underfoot. +Commit 3 makes the rule structural for every way out. + +Rows 58, 59 and 61 were rings in which each macro crossed a door, so no effect-based rule sees +them. A repetition budget keyed on the fly's own starts was considered and not built. It is a rule +about the choice, not knowledge in a macro, and it would turn a ring into a wait or a wander +without adding the missing fact. Those rings stay guarded outside the fly: the watchdog, the +recovery ladder, and the ROM road tests.