Repository navigation
Aquilo: terrain matches a real surface through tile correction, at 1.3x cost (#454) - #562
Conversation
At one tile per pixel on a whole-tile origin the Aquilo render now runs the game's tile correction after the argmax, as Gleba's does, with Aquilo's nine layers read from the game. correction.rs is unchanged. - New fixture oracle-aquilo-real-surface.seed123456.json (2.1.23, -128..127, levers off), from the Gleba probe, which now takes FMW_PLANET. - Real surface: 531 pixels (551 tiles by name) before, 0 after. Two uncommitted 1024 real surfaces (levers off, and neutral with every entity autoplace removed) also match at every tile, and so does the land mask of oracle-aquilo-surface (172 wrong raw). - No ties in 1,327,104 tiles; no Aquilo tile has allowed_neighbors. - Preview PNG tests become references: terrain 0 -> 718, full PNG 3 -> 1,067 (1,064 tile pixels, all where the real surface differs). 13 of 14 aquilo:render digests moved; every moved pixel is terrain. - About 3x render cost (256 terrain 64 -> 189 ms; default 1024 all view as 64 tiles 2.2 -> 6.6 s of CPU). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
The Aquilo render's tile correction cost about 3x the raw argmax. Three changes bring the app's default view (1024 all, 64 worker tiles of 128) to about 1.3x without changing an output byte: - correction.rs gains correct_window: the shared entry point a renderer calls with a raw-tile closure. It reads raw tiles lazily, so the outer ring of chunks costs only the band the walks reach. Gleba uses it too. - The scan skips a walk whose seed sits in a 3x3 block of one id; such a walk changes and queues nothing. - The Aquilo render keeps the fields correction evaluated for the window's chunks (KeptFields) and the entity generator reuses them. Default view, map seed 123456: WASM under Node 2,236 ms raw, 6,645 ms first wiring, 2,920 ms now; headless Chrome wall 590, 1,691, 750 ms. Output checked byte for byte against the previous module on 52 Aquilo and Gleba requests and the tiled and whole 1024 all view. Unit tests pin both correction changes on random grids. Real-surface counts stay 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Aquilo's terrain now matches a real Aquilo surface at every tile, where before it matched only the game's map preview. Tile correction alone closes the gap. A shared change to
correction.rscuts the render cost from about 3x to about 1.3x.Against a real surface
The ground truth is a new fixture,
oracle-aquilo-real-surface.seed123456.json. It was captured on 2.1.23 at seed 123456 (surface seed 3111923328), over tiles -128..127, with the three resource levers at size 0 and the terrain-only mod. It has a PROVENANCE entry.More checks, all exact: two uncommitted 1024x1024 captures (1,048,576 tiles each), and the land mask of the existing 640x640
oracle-aquilo-surfacefixture (now a committed test; 172 tiles were wrong raw). The 21% of differing pixels whose preview colour no real neighbour had are explained by correction too, because the walk spreads.allowed_neighborson any Aquilo tile.The render cost
correction.rsgainscorrect_window, a shared entry point (raw-tile closure, layers, origin, size, margin), with two changes that are exact by construction:Areaevaluates a tile only when the pass first reads it, so the outer ring of margin chunks costs only the band the walks reach.allowed_neighborsrule, whose check comes aftern == c.Aquilo also keeps the fields correction already evaluated, so its entity pass reuses them (
KeptFields, capped at 64 chunks). Gleba now usescorrect_windowtoo.all)The Node figures are a median of 7 interleaved runs; the Chrome figures, a median of 9 Generate clicks with dev mode on. Both were taken on a loaded machine.
Output unchanged by the cost work: 52 requests across all four views, both lever sets, six windows and three zooms, plus two Gleba windows, are byte-identical to the first wiring. New unit tests check lazy against eager reads, and that skipping changes nothing, on random grids.
What moved
aquilo:render: 13 of 14 rows moved. Every moved pixel is a tile, and equals the new terrain view.Planted breaks
What users see
The app opens Aquilo at 1 tile per pixel in
all, so correction applies by default: the real coastline and ice edges, with the wells and icebergs drawn by the preview's rule on top. Other zooms draw the raw argmax. Wells and icebergs still test the raw tile, so #553 is unchanged, but our land now equals the land the entity replay reads.Gate
pnpm run verify:lint, the fullpnpm vp test(1,360 passed) andscripts/verify-rust.shpass locally.cargo denyis not installed on hammond; CI runs it.Refs #454.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
Summary by CodeRabbit