diff --git a/CLAUDE.md b/CLAUDE.md index e3b152c..2400818 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -163,10 +163,16 @@ Known gaps, roughly in order of how visible they are: outside the rule tree, for eroded badlands spires and frozen-ocean icebergs. Parity baseline (fixture seed 12345): biomes and heightmaps exact everywhere; blocks 95.378% through -the single-chunk path, 98.028% through the production region replay. The remaining block gap is -entirely underground and is driven by ~966 base-terrain cells (0.246%) where vanilla carved a cave -segment we kept solid or an aquifer edge we sealed — those flips turn air-exposure discard rolls -inside later veins, which is why ore drift looks symmetric (extra ≈ missing). +the single-chunk path, 98.028% through the production region replay. A featureless vanilla capture +(`cmd/vanillacapture -featureless -blocks-only`, biomes stripped to their carvers) proves the +undecorated pipeline bit-exact against it — density, surface rules, carvers, aquifers, and +noise-router veins match every one of the fixture's cells — so the residual block gap is entirely +inside feature replay. Plain-state mismatches that once looked like base-terrain defects are +air-writing features the replay does not cover yet: monster rooms (stage 3) open cave_air pockets, +geodes leave voids, lava lakes fill stage-1 cavities. Vanilla runs those stages before the ores, so +ore ellipsoids crossing that pre-existing air roll air-exposure discards our run never sees, which +is why high-attempt ore drift looks symmetric (extra ≈ missing). The next step toward exact parity +is replaying the remaining pre-ore stages, monster rooms first. ## Testing worldgen @@ -198,8 +204,12 @@ The older optional Beyond the always-on tests, `internal/world` carries env-gated diagnostics for hunting the residual parity gap (all skip unless the variable is set): `REGIONIO_REGION_ORE_DIAGNOSTIC=1` compares the legacy / center-only / region-replay ore paths per state, and -`REGIONIO_BASE_TERRAIN_DIAGNOSTIC=1` classifies fixture mismatches into base-vs-base defects (with -sample coordinates), feature flips per family, and an ambiguous bucket for disk-shaped outputs. -The base-vs-base count is the number to drive toward zero: each such cell can flip air-exposure -discard rolls inside overlapping ore ellipsoids, so one sealed cave edge shows up as dozens of -missing and extra ore blocks. +`REGIONIO_BASE_TERRAIN_DIAGNOSTIC=1` classifies fixture mismatches by what could have written each +side. `TestVanillaBaseTerrainParity` compares against `testdata/vanilla_base_12345.bin`, a capture +of vanilla running with features and structure sets stripped out; regenerate it after any change to +the derived-datapack logic: + +``` +go run ./cmd/vanillacapture -server server.jar -featureless -blocks-only \ + -port 25585 -output internal/world/testdata/vanilla_base_12345.bin +``` diff --git a/README.md b/README.md index 3c50356..098defc 100644 --- a/README.md +++ b/README.md @@ -115,17 +115,17 @@ a complete decorated 3x3 neighborhood, while persisted neighbors still take precedence. This closes the chunk-lifecycle integration boundary without exposing undecorated chunks. -The remaining block-parity gap is entirely underground: no surface or waterline -cells mismatch. Parity diagnostics confirm the stage-6 feature schedule, the -feature-index seeds, and the climate biome ordering are aligned with vanilla, -and rare ores such as gold and redstone already match exactly. High-attempt -features instead drift because a few hundred residual base-terrain differences -(aquifer fluid edges and carver air boundaries) flip air-exposure discard rolls -inside later veins; the base-terrain diagnostic measures them at 966 fixture -cells (0.246%), concentrated in whole cave segments rather than isolated -positions. The next worldgen milestone is to close those base-terrain -differences and raise the 98.028% block parity toward exact equality while -keeping cold batch generation within an acceptable latency budget. +The remaining block-parity gap is entirely inside feature replay: a vanilla +capture with every feature and structure set stripped out matches our +undecorated pipeline on all 393,216 cells, so density, surface rules, carvers, +aquifers, and noise-router veins are already bit-exact. What drifts is the +interaction between stages — vanilla opens air pockets (monster rooms, geode +voids, lava lakes) before the ores run, and ore ellipsoids crossing that +pre-existing air roll air-exposure discard rounds our replay never sees, which +is why high-attempt ore drift looks symmetric. The next worldgen milestone is +to replay the remaining pre-ore stages, monster rooms first, and raise the +98.028% block parity toward exact equality while keeping cold batch generation +within an acceptable latency budget. ## Project layout