Skip to content

test(cliffs): falsify the smoothing, and close fixImpossibleCells (#18) - #79

Merged
wormeyman merged 1 commit into
mainfrom
cliffs-falsify-smoothing-18
Aug 1, 2026
Merged

test(cliffs): falsify the smoothing, and close fixImpossibleCells (#18)#79
wormeyman merged 1 commit into
mainfrom
cliffs-falsify-smoothing-18

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

Chases the Vulcanus cliff_orientation residual (#18). Does not fix it - it falsifies nine more candidates, closes the one the notes left open, and localises what remains precisely enough to say what the next step is.

The harness

cliff_smoothing is a transform on the elevation field, so a candidate smoothing can be pre-applied to the field and the placement then run with smoothing: 0. That exercises the shipping rule over a candidate transform with no edit to cliffPlacement.ts, and one shared field cache makes each arm ~1.5s for all three regions. The control arm reproduces 1400 matched / 175 wrong to the digit, which is what licenses everything below.

What was falsified

candidate result
smoothing knot geometry sharp optimum in 4 dimensions at span 4 / clamp 7 / offset 0 / s=1
clamp 8 ("clean" bilerp) / clamp 6 33.6% / 40.8% vs 12.5%
any anchor shift 51-72%
interpolation curve linear beats smoothstep (29.3%), nearest (61.8%), sqrt (50.5%)
smoothed cliffiness 20.0% - it stays raw
cliff_elevation_0, cliff_elevation_interval bottom out exactly at 70 and 120
crossesCliff structural variants none help; "different band" scores exactly 175 because it is provably identical
fixImpossibleCells clear order ported L,T,R,B is the best of all 24

Two of these are worth more than a row. The clamp-to-7 asymmetry that reads like a misread is 2.7x better than the clean reading, so the disassembly is corroborated by something other than itself for the first time. And fixImpossibleCells is closed by size: across all three regions it finds only 35 illegal cells and clears 59 edges, so it is too small by 5x to explain 175.

The fields were compared as values, not outcomes

Every previous exoneration substituted the game's fields and asserted the placement did not move - weaker than it sounds. Compared directly over all 12,675 corners:

median max
elevation |ours - game| 2.7e-4 4.8e-2
cliffiness |ours - game| 0 6.4e-6

The corrections the failures need are ~3.6 elevation units - four orders of magnitude larger.

The new spec

test/cliffEdgeConsistency.spec.ts uses no field, no rule and no port output: the game's own adjacent cliffs must agree on the edge they share, because the engine stores one value per edge. They do - Nauvis 147h+166v, Vulcanus 805h+834v, zero mismatches - which clears the code packing, the position→cell lattice and the orientation table from the fixture alone. It carries a planted table corruption to prove it discriminates, and asserts the 8 off-lattice crater-cliffs so the lattice check cannot pass vacuously.

What remains

Over the 5891 edges where the cliffiness gate is open, our smoothed elevation predicts the game's crossing 88.7% of the time and the raw one 60.3%. So smoothing is doing real and largely correct work, and the last ~11% is a difference between the game's smoothed cliff elevation and a linear bilerp of the raw field - at corners where the raw field agrees to 0.05.

The next step is the binary, not another behavioural sweep. That space has been searched and it bottoms out here; crossingsForChunk @ 0x10160c9cc wants re-reading for its smoothing loop specifically.

pnpm run verify: 306 files clean, 1288 passed / 3 skipped, preview 12 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GRx1CU29RKLsRuUAErEDRB

The residual left `fixImpossibleCells` as the one surviving candidate. It is
not the cause, and neither is anything else reachable by varying the port.

The harness is the reusable part: smoothing is a transform on the elevation
field, so a candidate can be pre-applied to the field and the placement run
with `smoothing: 0`. That exercises the SHIPPING rule over a candidate
transform with no edit to cliffPlacement.ts, and one shared field cache makes
each arm ~1.5s. The control reproduces 1400 matched / 175 wrong to the digit.

Falsified, with denominators:

- Smoothing knots are a SHARP optimum in four dimensions - span 4, clamp 7,
  offset 0, s=1. clamp 8 (the "clean" reading) is 33.6%, clamp 6 is 40.8%,
  every anchor shift 51-72%. Swept per axis too; the minimum is on the
  diagonal. The clamp-to-7 asymmetry that reads like a misread is 2.7x better
  than the clean reading, so the disasm is finally corroborated by something
  other than itself.
- Linear, not a curve: smoothstep 29.3%, nearest 61.8%, sqrt 50.5%.
- Cliffiness stays raw (smoothing it too: 20.0%).
- e0 and interval bottom out exactly at 70 and 120, with ~10 bands in play.
- No structural crossesCliff variant helps; the "different band" formulation
  scores exactly 175 because it is provably identical.
- All 24 fixImpossibleCells clear orders swept - the ported L,T,R,B wins - but
  the pass finds only 35 illegal cells and clears 59 edges across all three
  regions. Identical fields plus an identical rule give identical pre-fix
  codes, so it is too small by 5x to explain 175. Candidate 1 is closed.
- The fields were compared as VALUES for the first time rather than as a null
  substitution result: elevation agrees to a median 2.7e-4 and a max 4.8e-2,
  cliffiness to 6.4e-6. The corrections the failures need are ~3.6 units.

The new spec adds an oracle that uses no field, no rule and no port output:
the game's own adjacent cliffs must agree on the edge they share, because the
engine stores one value per edge. They do - Nauvis 147h+166v, Vulcanus
805h+834v, zero mismatches - which clears the code packing, the position->cell
lattice and the orientation table from the fixture alone. It carries a planted
table corruption to prove it discriminates, and the 8 off-lattice crater-cliffs
are asserted so the lattice check cannot pass vacuously.

What remains is a contradiction worth stating plainly: over the 5891 edges
where the cliffiness gate is open, our smoothed elevation predicts the game's
crossing 88.7% of the time and the raw 60.3%. The last ~11% is a difference
between the game's smoothed cliff elevation and a linear bilerp of the raw
field, at corners where the raw field agrees to 0.05. The next step is
re-reading crossingsForChunk's smoothing loop in the binary, not another
behavioural sweep - that space has been searched and it bottoms out here.

DOES NOT FIX #18.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GRx1CU29RKLsRuUAErEDRB
@wormeyman
wormeyman merged commit c2dbf6d into main Aug 1, 2026
2 checks passed
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