Skip to content

test(cliffs): the ore lever OUT OF SAMPLE - precision holds, unknown count is 14 (#84) - #126

Merged
wormeyman merged 1 commit into
mainfrom
test/ore-lever-out-of-sample
Aug 4, 2026
Merged

test(cliffs): the ore lever OUT OF SAMPLE - precision holds, unknown count is 14 (#84)#126
wormeyman merged 1 commit into
mainfrom
test/ore-lever-out-of-sample

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

Everything the last three PRs established about the ore rule was measured on [1500,1500], because that is the only region oracle-vulcanus-cliff-ore-direction re-runs with the resources off. A rule characterised on one region and never tested on another is fitted until proven otherwise, so the lever was captured for the two regions the entities fixture covers and it never did.

region resources present cliffs ON cliffs OFF suppressed
[0,0] 945 tungsten-ore 283 283 0
[-1200,800] 1047 coal 387 387 0

Precision 1.000 survives

Our predicate fires on zero cells in both regions. 1992 resource entities across two fresh regions produce no false positive, so the rule is not merely right on the region it was built from. This is the arm that would have caught a rule fitted to [1500,1500], and it did not fire.

It also re-confirms #110's per-control attribution - 27 calcite, 4 geyser, 0 tungsten and coal - at far larger scale than the arm that produced it.

The unexplained population is 14, not 11

#123 could only record that the lever's region did not cover 106,26.5, 90,38.5 and -1050,1022.5, and parked them as undetermined. The lever covers them now and the ore suppresses nothing there:

of the 25 missed destructions count
ORE, by the lever 11
unknown 14

Anywhere "11 unknown + 3 undetermined" was quoted, the number is 14.

The non-vacuity check is in the fixture, not in an argument

"0 suppressed" is exactly what a lever that never reached the generator prints. The OFF arms read back 0 resources against 945 and 1047, so the autoplace_controls override provably applied - the standing lesson from #111, and the reason the zero is worth anything.

What this does NOT establish

Neither region contains calcite or a geyser, which are the only two controls that suppress anything. So this is a precision test, not a recall test: the rule's positive evidence is still one region, and #125's cascade result is still measured on [1500,1500] alone. A region with calcite in it would be the test that could actually break the rule - the oracle set has none, so getting one means choosing a new region rather than re-running an existing one.

Fixture hygiene

New fixture oracle-vulcanus-cliff-ore-direction-regions.seed123456.json, deliberately separate from the existing one so regenerating it cannot rewrite ground truth that four merged PRs depend on. Same seed, protos and alsoResources, so the two are directly comparable. PROVENANCE.json entry added; the capture takes ~8s.

Verification

pnpm run verify green - 1469 app (up 4) + 13 worker + 3 container tests, 0 warnings, exit 0. Measurement only; nothing shipping changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_015jeznBmWiZywUc7cBw9xFU

…count is 14 (#84)

Everything the last three PRs established about the ore rule was measured on
[1500,1500], because that is the only region
`oracle-vulcanus-cliff-ore-direction` re-runs with the resources off. A rule
characterised on one region and never tested on another is fitted until proven
otherwise, so the lever was captured for the two regions the entities fixture
covers and it never did.

| region        | resources        | ON  | OFF | suppressed |
| ---           | ---              | --- | --- | ---        |
| [0,0]         | 945 tungsten-ore | 283 | 283 | 0          |
| [-1200,800]   | 1047 coal        | 387 | 387 | 0          |

- PRECISION 1.000 SURVIVES. Our predicate fires on zero cells in both regions,
  so 1992 resource entities across two fresh regions produce no false positive.
  This is the arm that would have caught a rule fitted to [1500,1500].
- THE UNEXPLAINED POPULATION IS 14, NOT 11. #123 could only park `106,26.5`,
  `90,38.5` and `-1050,1022.5` as undetermined because the lever's region did
  not cover them. It does now, and the ore suppresses nothing there.
- Re-confirms #110's attribution - 27 calcite, 4 geyser, 0 tungsten and coal -
  at far larger scale than the arm that produced it.

The non-vacuity check is in the fixture rather than argued: "0 suppressed" is
also what a lever that never reached the generator prints, and the OFF arms read
back 0 resources against 945 and 1047.

What this does NOT establish: neither region contains calcite or a geyser, the
only two controls that suppress anything. So this is a PRECISION test, not a
recall test - the rule's positive evidence is still one region, and #125's
cascade result is still measured on [1500,1500] alone. Breaking the rule would
need a region with calcite in it, and the oracle set has none.

New fixture is deliberately separate from `oracle-vulcanus-cliff-ore-direction`
so regenerating it cannot rewrite ground truth four merged PRs depend on.
PROVENANCE entry added.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jeznBmWiZywUc7cBw9xFU
@wormeyman
wormeyman merged commit 567e316 into main Aug 4, 2026
6 checks passed
@wormeyman
wormeyman deleted the test/ore-lever-out-of-sample branch August 4, 2026 01:25
wormeyman added a commit that referenced this pull request Aug 4, 2026
… effect remains (#84) (#129)

* test(cliffs): every route from the ore to a cliff is closed - and the effect remains (#84)

#128 closed the tile half and recorded a three-way contradiction. Two more
routes are now closed, and the honest summary is stronger than "unknown": the
search space is EXHAUSTED, not merely unexplored.

| route                             | evidence                                    |
| ---                               | ---                                         |
| the cliff FIELD reads a resource  | `cliff_elevation = cliff_elevation_from_elevation = elevation = vulcanus_elevation`, whose 47-node expression closure holds no resource region; and our port's raw cell set is BIT-IDENTICAL under every lever arm (2277 cells, same codes) |
| `Surface::wouldCollide` does more | disassembled: per-orientation box, degenerate early-out, `constCollideWithTile`, `collideWithEntity`, both with the cliff's own mask at `proto+0x2b0`. No third input |
| its ENTITY half                   | #124 - disjoint masks at prototype level, ordering |
| its TILE half                     | #128 - 841 tiles move, none crosses lava/lava-hot |
| the lever perturbs STRUCTURALLY   | this PR - richness x2 and x0.5 move ZERO cliffs |

The last row was the only route #128 left open. `control:calcite:richness`
appears in `vulcanus_calcite_richness` ALONE - not in
`vulcanus_calcite_probability` (where the ore lands) nor in
`vulcanus_calcite_region` (which drives the volcanic_jagged_ground_range tile) -
so it hands the generator a different CompiledMapGenSettings describing the same
world. Over [1500,1500]: 861 cliffs and 3933 resources in all three arms,
identical cell for cell and orientation for orientation. The surface reads the
changed richness back, so the override applied.

So the lever is not a structural perturbation: the effect tracks ore PRESENCE -
and nothing that can see ore presence can reach a cliff.

This does NOT say the rule is wrong. Box overlap against real resource positions
reproduces the game at precision 1.000 over 31 cells and survives out of sample
(#126). The rule is right; the mechanism is missing, and the port's model of map
generation is incomplete in a way none of these five rows covers.

Recorded so the next person does not re-walk a closed route. Three genuinely
untouched ideas are listed in the notes: chunk-generation ORDER beyond the mask
argument, whatever happens to the queue between `generateCliffs` and
`applyCliffs`, and `CliffCraterPlacer::tryToPlaceCliffAsCrater` - ruled out for
the residual by position but never as a mechanism.

New fixture + PROVENANCE entry; capture takes ~7s.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jeznBmWiZywUc7cBw9xFU

* test(cliffs): close the cliffiness gap in the field argument (#84)

The field-closure row named `cliff_elevation` only. The cliff generator reads
TWO properties, and a closure argument that covers one of them leaves the gate
unexamined - `planet-map-gen.lua` routes `cliffiness = "cliffiness_basic"` for
Vulcanus, and nothing had traced that one.

It is clean: `cliffiness_basic`'s closure is a single node referencing only `x`,
`y` and `cliff_richness`. So the row stands, but now for both properties rather
than for the one that happened to get traced first.

Found while checking whether crater-cliff's appearance under the lever shared a
cause; `crater_cliff` (47-node closure) and both Vulcanus biomes it reads are
clean too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jeznBmWiZywUc7cBw9xFU

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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