Skip to content

Commit 5ca9734

Browse files
wormeymanclaude
andauthored
test(cliffs): capture the cliff fields at [0,0] - not the fields either (#76)
PR #75 exposed that "substituting the game's own fields moves nothing" had only ever been measured on the corner-fields fixture's regions - [1500,1500], [1100,2600], [-1700,1900] - which were chosen for issue #24 and are all calcite-dominated. Only one of them is a region the cliff port is scored on, and it is the one the port already handles best (8.1% orientation error). [0,0], at 29.8%, had never had its fields checked. This captures both fields at every corner of all three cliff-entity regions (12,675 corners) and scores the substitution on ORIENTATION - four bits per cell against the game's own cliff_orientation, where PR #57 scored placement at one bit. [1500,1500] is deliberately in both fixtures. The overlap is the check on this capture's corner indexing, since an off-by-one there would look exactly like a field error at [0,0]; the two agree bit-for-bit on all 4225 shared corners. Result: the game's own values reproduce ours to the unit in every region, including [0,0] - same cells placed, same matched, same wrong (335/228/68, 1065/830/67, 375/342/40). The +3 bias arm moves both placement and orientation in all three, so the substitution is live everywhere it is claimed to be. So the entire residual is in the rule as ported, with no input left to suspect: crossingsForChunk's sampling geometry, the cliff_smoothing knot model, or crossesCliff. crossingsForChunk (0x10160c9cc, 2244 bytes) is the one never decompiled whole. Also corrects the older fixture's comment, which claimed vulcanus_elevation was sampled only at the smoothing knots. It never was: the corner set is a full nested loop over each region and both samples take all of it, which 3 x 65 x 65 = 12675 confirms. Claude-Session: https://claude.ai/code/session_013eczw9uoWDfN6Wc6kA7UBY Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 8e2599f commit 5ca9734

5 files changed

Lines changed: 38356 additions & 8 deletions

File tree

docs/noise/cliffs-NOTES.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,37 @@ Three candidate causes were tested **against this metric** and all three fail:
296296
concentration, despite the ring being exactly where `fixImpossibleCells`
297297
cannot clear an edge.
298298

299-
**The gap that is now obvious: no field capture covers `[0,0]`.** The
300-
corner-fields fixture's three regions are `[1500,1500]`, `[1100,2600]` and
299+
#### That gap is now CLOSED - the fields are exact at `[0,0]` too
300+
301+
The corner-fields fixture's three regions are `[1500,1500]`, `[1100,2600]` and
301302
`[-1700,1900]` - all calcite regions, chosen for issue #24. So "the fields are
302-
exact" has been measured where the port is already good (8.1%) and never where
303-
it is worst (29.8%). That is the next capture.
303+
exact" had been measured where the port is already good (8.1%) and never where it
304+
is worst (29.8%). `oracle-vulcanus-cliff-corner-fields-entity-regions` fixes that:
305+
both fields at every corner of all three **cliff-entity** regions, 12,675 corners,
306+
captured 2026-07-30.
307+
308+
`[1500,1500]` is deliberately in **both** fixtures. That overlap is the check on
309+
this capture's corner indexing - an off-by-one there would look exactly like a
310+
field error at `[0,0]` - and the two agree bit-for-bit on all 4225 shared
311+
corners.
312+
313+
**Result: the game's own values reproduce ours to the unit, in every region,
314+
including `[0,0]`.** Same cells placed, same matched, same wrong:
315+
316+
| region | placed | matched | wrong orientation | +3 bias control |
317+
| --- | --- | --- | --- | --- |
318+
| `[0,0]` | 335 | 228 | 68 = 29.8% | 78 = 36.4%, 347 placed |
319+
| `[1500,1500]` | 1065 | 830 | 67 = 8.1% | 122 = 15.4%, 1070 placed |
320+
| `[-1200,800]` | 375 | 342 | 40 = 11.7% | 60 = 18.9%, 358 placed |
321+
322+
The bias arm moves placement AND orientation in all three, so the substitution is
323+
live everywhere it is claimed to be. `test/vulcanusCliffCornerFields.spec.ts`
324+
pins all of it.
325+
326+
**So the entire residual is in the RULE as ported**, and there is no longer any
327+
input left to suspect: `crossingsForChunk`'s sampling geometry, the
328+
`cliff_smoothing` knot model, or `crossesCliff` itself. `crossingsForChunk`
329+
(`0x10160c9cc`, 2244 bytes) is the one that has never been decompiled whole.
304330

305331
### `EntityMapGenerationTask::generateCliffs` - full body read 2026-07-30
306332

test/fixtures/PROVENANCE.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@
263263
"tree-expressions.2.1.11.json": {
264264
"factorioVersion": "2.1.11",
265265
"evidence": "the version is in the filename, and in the commit that added it"
266+
},
267+
"oracle-vulcanus-cliff-corner-fields-entity-regions.seed123456.json": {
268+
"factorioVersion": "2.1.12",
269+
"evidence": "captured 2026-07-30 by test/oracle/capture.ts vulcanus-cliff-corner-fields-entity-regions against the installed binary, which pnpm refs:sync --check reported in sync at 2.1.12 at capture time. Companion to oracle-vulcanus-cliff-corner-fields.seed123456.json at the three regions oracle-vulcanus-cliff-entities covers; the two share region [1500,1500] and agree bit-for-bit on all 4225 of its corners, which test/vulcanusCliffCornerFields.spec.ts asserts as a check on this capture's corner indexing."
266270
}
267271
}
268272
}

0 commit comments

Comments
 (0)