You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cliffs): multisample offsets are in GRID UNITS - #18 ROOT CAUSE (#18) (#83)
vulcanus-multisample-NOTES proved multisample(e,dx,dy) == e(x+dx, y+dy) at
150/150 comparisons with residual exactly zero. That is correct - for
LuaSurface.calculate_tile_properties, whose noise program has a 1-TILE grid.
It was never checked in any other channel, and the primitive's own docs say it
evaluates "in a separate noise program with a larger grid" whose "sub-grids are
copied to the main program". That phrase is load-bearing.
Asked through the CLIFF GENERATOR, whose grid is the 4-tile corner lattice, by
routing a probe onto cliff_elevation with the rule collapsed so cliffs mark
exactly where the field crosses 71:
x column 70 baseline
multisample(x, 0, 0) column 70 identity
multisample(x, 4, 0) column 54 shifted 16 TILES, not 4
multisample(x, 0, 4) column 70 null control
dx = 4 moves the field by 4 x the 4-tile grid step. So the true rule is
e(x + dx*G, y + dy*G) for the CALLING program's grid G.
Consequence: vulcanus_basalt_lakes_multisample's min over {0,1}x{0,1} spans 4
tiles for cliffs and 1 tile for every per-tile consumer. min is erosion, so the
cliff channel's elevation is much smoother. The port used the 1-tile field for
both, making the cliff elevation too rough and over-placing by ~40%.
before after
wrong orientation 175 = 12.5% 37 = 2.4%
recall 0.806/0.938/0.853 1.000/0.973/0.965
[0,0] worst region 29.8% wrong 2.5%, recall 1.000
level sweep ratio 1.20-1.49 below 120 1.00-1.09 at EVERY level
VulcanusElevation now exposes cliffElevation beside elevation. Both hang off one
stack and share every sub-expression below the multisample, so the cost is a
second memo table - a private DAG for cliffs was tried first and is much dearer.
Do not collapse them back together: they are different fields, not a cache miss.
Nothing here refutes the multisample port or the per-tile consumers.
calculate_tile_properties and the tile renderer both live in the 1-tile channel
where e(x+dx, y+dy) is exactly right.
Specs that pinned the defect are inverted rather than deleted, because the
inversions are the evidence: the s=0 smoothing arm is now exact, all four
collapsed arms are exact, the level sweep matches at every level, and the
corner-fields substitutions now MOVE cells - those fixtures are the tile
channel, so they are the right numbers for the wrong consumer, and their
agreeing for months is how the wrong channel stayed invisible. cliffResidual's
Vulcanus block is retired: its mismatched population is now too small to
compare.
The lesson is the third form of the same trap. Not a fixture captured at the
wrong SITE (#70's grid_offset), not a wrong value - a fixture captured through
the wrong CHANNEL, agreeing with a port that made the same mistake. Ask which
code path CONSUMES a value, not only which coordinates it is sampled at. And
note that no sweep inside the port could have found this: the smoothing,
band and rule sweeps all searched a family that shared the defect.
Claude-Session: https://claude.ai/code/session_01GRx1CU29RKLsRuUAErEDRB
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
"evidence": "captured 2026-08-01 by test/oracle/capture.ts vulcanus-elevation-levels against the installed binary, which pnpm refs:sync --check reported in sync at 2.1.12 at capture time. The Vulcanus region [0,0] at 19 values of cliff_elevation_0 (20..200 step 10) with the rule collapsed (cliff_smoothing=0, cliff_elevation_interval=1e6, richness=4), so a cell carries a cliff exactly when its corner elevations straddle the level - inverting the elevation field the generator itself reads. Each case records the cliff_settings the SURFACE reported back."
282
+
},
283
+
"oracle-multisample-grid.seed123456.json": {
284
+
"factorioVersion": "2.1.12",
285
+
"evidence": "captured 2026-08-01 by test/oracle/capture.ts multisample-grid against the installed binary, in sync at 2.1.12 per pnpm refs:sync --check. Probe expressions routed onto property_expression_names.cliff_elevation on a Vulcanus surface with the rule collapsed, so the CLIFF GENERATOR is the readout instead of calculate_tile_properties. Carries its own positive control (multisample(x,4,0) must move the contour) and null control (multisample(x,0,4) must not)."
0 commit comments