test(cliffs): falsify the smoothing, and close fixImpossibleCells (#18) - #79
Merged
Conversation
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
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.
Chases the Vulcanus
cliff_orientationresidual (#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_smoothingis a transform on the elevation field, so a candidate smoothing can be pre-applied to the field and the placement then run withsmoothing: 0. That exercises the shipping rule over a candidate transform with no edit tocliffPlacement.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
cliff_elevation_0,cliff_elevation_intervalcrossesCliffstructural variantsfixImpossibleCellsclear orderL,T,R,Bis the best of all 24Two 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
fixImpossibleCellsis 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:
The corrections the failures need are ~3.6 elevation units - four orders of magnitude larger.
The new spec
test/cliffEdgeConsistency.spec.tsuses 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-latticecrater-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@0x10160c9ccwants 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