Files
aevolution/docs/engineering/M12_RESERVE_STRATA_EXPERIMENT.md
dingo 214991c9a3
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (tsan) (push) Successful in 11m44s
Foundation / checks (client) (push) Successful in 19m23s
Foundation / checks (network) (push) Successful in 19m45s
Foundation / checks (checks) (push) Successful in 45m39s
Foundation / checks (postgres) (push) Successful in 45m56s
Foundation / postgres-tools (push) Successful in 23s
Foundation / server-image (push) Successful in 31s
Foundation / image (push) Successful in 3m35s
M12.2b: test exact reserve-strata population candidate
2026-10-16 06:01:42 -04:00

6.9 KiB

M12.2b: Exact reserve-strata experiment

Result (2026-10-16)

The exact-state candidate removes the synthetic baseline's false-extinction mechanism: all 83 comparisons match every identified living state, census, birth/death count and resource compartment at every tick on MSVC and GCC. This includes 40 development cases, 40 held-out cases and three original scarcity runs. All 83 comparison records are identical across platforms. Conservation is exact. No old model, rejection result, persistent format or golden was replaced.

This completes the isolated M12.2b research segment under ADR-0134. It does not complete M12.2 or authorize automatic tier selection. Exact-state retention can require one row per living individual and is not yet a cellular population model.

Source: experiments/resolution/reserve_strata.hpp and reserve_strata.cpp. Raw results: MSVC 19.44 and GCC 14.2.

Representation and predeclared instrument

Age-class averages lose which members can pay upkeep. The candidate instead holds exact per-member age, energy and matter in run-length encoded contiguous identity ranges. It merges only identical states. Parent priority stays oldest-first then original identity; partially reproducing ranges split before their reserves are debited. Dead working rows retire without renumbering surviving identities.

The original fixture's shared scalar Rule predicates are unchanged. An independent group implementation performs the five phases and checked inventory arithmetic. No sampler, approximate birth count, age-bin midpoint or resource averaging enters the candidate. The original identified implementation remains the reference. A third, compact-individual implementation invokes that reference step and retires dead rows while retaining original identities and tie order. It is checked against the same identified outcomes before being used as a cost control.

ADR-0134 declared zero per-tick error before running the experiment. The instrument checks identified portraits rather than census agreement alone, so charging the wrong parent at a capacity boundary fails. Controls cover partial reproduction, same-age unequal reserves, compressed identical members, starvation of a subset, fragmented identities, empty populations, interval partitioning at unchanged one-tick quantum, unsupported underfunded breeding and checked-product overflow.

The original 100-founder distribution runs at supplies 240/300/360 for 10,000 ticks. The seeded suite uses 100 founders in blocks of five identical members, with heterogeneous seeded ages and reserves. Seeds 0-7 are development and 8-15 held out, each at supplies 180/240/300/360/480 for 1,500 ticks. These regimes stress the research instrument; they do not model M11 spatial competition or diversity.

Costs

Local Ryzen 7 9800X3D workstation, 8 cores/16 logical processors; Windows x64 MSVC 19.44 Release and Ubuntu WSL2 GCC 14.2 Release. No affinity/frequency lock, RSS profiling or controlled production runner. One warmup plus three fresh samples, with strata/reference order alternated. Median milliseconds over 10,000 steps follow; verification and setup are outside the timed loop.

Supply MSVC historical MSVC compact MSVC strata GCC historical GCC compact GCC strata
240 27.898 3.824 5.162 26.315 6.211 2.452
300 30.206 4.202 8.549 27.543 6.425 2.957
360 35.342 4.867 9.112 32.771 7.583 3.153

The candidate beats the historical retained-dead reference on both compilers, but is slower than compact individuals on MSVC and faster on GCC. Therefore the old benchmark's apparent aggregation advantage includes dead-row scanning, and these local observations do not justify a production capacity promise or universal win.

Supply Historical peak rows Compact peak active rows Strata peak rows
240 2471 120 120
300 2625 131 131
360 3156 148 140

Peak state payloads for compact/strata are 4800/4800, 5240/5240 and 5920/5600 bytes respectively. Both carry exact identity, age and reserves; little grouping is possible in these original heterogeneous histories. Peak group count and peak individual count may occur at different ticks. Raw files also report vector capacity; allocator growth differs between MSVC and libstdc++. Payload/capacity exclude object bytes, per-step temporary vectors/sort scratch, allocator metadata and RSS. They are not peak working-memory budgets or persisted-size estimates.

Reproduction and checks

./tools/windows-check.ps1 -Preset release -Action check
./build/release/evo-reserve-strata.exe

The existing Ubuntu WSL build directories use the checked-in presets with explicit binary-directory overrides, keeping native and Linux object files separate:

cmake --preset release -B build/linux-release
cmake --build build/linux-release --target evo-reserve-strata
./build/linux-release/evo-reserve-strata
cmake --preset analysis -B build/linux-analysis
cmake --build build/linux-analysis --target evo-reserve-strata format-check
ctest --test-dir build/linux-analysis -R reserve-strata-qualification --output-on-failure
cmake --preset asan -B build/linux-asan
cmake --build build/linux-asan --target evo-reserve-strata
ctest --test-dir build/linux-asan -R reserve-strata-qualification --output-on-failure

Executed: native Release build and 70/70 CTests; GCC Release experiment and its CTest; clang-format 19 repository check (now includes experiment headers); clang-tidy 19 analysis build and its debug CTest; GCC ASan/UBSan experiment CTest. --verify runs the full controls and comparison matrix without timing. JSONL validation checked 83 comparison and 27 timing rows per platform and exact cross-platform equality of comparison records. Tests throw under NDEBUG.

Remaining qualification

The candidate is not representable by Cohort v1's age-class totals. There is no automatic conversion, persisted representation, spatial support or ancestry codec. Retained synthetic IDs do not supply new individual-parent history. Mixed genomes, M11 contact/predation/controllers, funded bud placement, mutation, offline suspension, viable reproductive reserves and migrations remain unsupported. No runtime adapter silently admits these states.

Next, predeclare paired M11 cellular ensembles and demographic/biomass/diversity bounds, retain a compact active control, and evaluate whether any supported state can safely group or approximate without erasing spatial/viability distinctions. Any new representation needs its own complete public/durable contract. Measure full-region/conversion and active fallback costs on the target Linux host, with explicit backpressure. WSL2 workstation evidence is not the R730xd qualification. M11.9 human product acceptance also remains unrecorded. See the delivery plan for dependent gates.