M4.3 advances a cohort over one declared interval and deliberately does not model one. ECOLOGY_MODEL keeps population maths an experiment and asks for several candidates to be compared, so choosing one here would turn a recommendation into a locked rule. A model proposes fluxes; this checks the declared result is exactly what they imply, for counts and for every inventory channel. Nothing is clamped. A loss larger than what is there refuses the interval and says whether it was the population or the biomass, so a caller can subdivide; subtraction is checked against what is present rather than performed and repaired, so a negative population is never constructed. That is the answer to the named risk: a clamp is how an interval a model could not integrate becomes a plausible result, and how a false extinction arrives. Both clamp mutations are detected by the tests. Counts carry whole members and owed fractions as one quantity, so a population below one member is a number rather than a rounding decision. Biomass has no birth term at all, so a birth cannot bring inventory in and newborns are necessarily funded from what the cohort holds. Immigration draws from a reservoir that already held it, so a late transfer is not new production. Conservation runs through the ledger as one atomic transaction; an interval where nothing moves submits none. Two amendments to M4.1 were forced, not chosen. A cohort records the reservoir backing it, because an advance cannot otherwise know where the inventory is and passing it alongside would let a caller advance one cohort against another's store, which comparing balances cannot detect between equal reserves; the registry now refuses two cohorts sharing one. And a cohort may be vacant, through a separate factory so vacancy stays deliberate, because a decline to exactly zero was otherwise unrepresentable and the only way through would have been the clamp this milestone exists to refuse. A vacant cohort is not an extinction: the record, its genome, its habitat and its provenance remain and it stays installed. Fourteen guards confirmed load-bearing by removing each and rerunning. Two of my own expectations were wrong rather than the code: escrow arithmetic in the migration test, and a dwindling case that shed all but one femtogram while declaring a result holding none. The second surfaced a real tension now recorded in ADR-0038 rather than worked around: a class reduced to a fraction of a member may hold no reserve, because reserve belongs to members and a fraction is not one yet, so that biomass has to go somewhere the same interval. Closure is checked and stability is not, so an interval whose arithmetic balances and whose ecology is nonsense is accepted. The declared age structure is not verified to be what ageing would produce, because that needs the within-class distribution the record discards. Release 36/36, analysis, ASan 36/36 and clang-format all ran and passed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Aeternalis Evolution
A custom-engine persistent evolutionary MMO. The world retains its biological history; each player life begins as a primitive cell and ends permanently.
This repository starts with architecture and a headless engineering proof: deterministic synthetic particles, component lifecycle, explicit PRNG streams, canonical snapshots and restored execution. It contains no gameplay, renderer, network service. Dev verification manifests are separate from the simulation.
Start here
- Project vision and locked requirements
- System overview and module boundaries
- Engineering constitution
- Architecture decisions and proposals
- Actionable milestones 0–4 and later gates
- Open design questions
- Actual validation results
- Current delivery status and next steps
- Opt-in ECS evaluation and measurements
- Sequential command scheduling and recovery
- Local periodic spatial queries
- Energy/matter model and implemented ledger boundary
- Genome model and implemented v1 record
Read AGENTS.md before changing code. Architecture and contracts are authoritative over implementation. No external runtime library is needed for the initial proof. C++23 support is checked during configuration.
Build and run
Requires CMake 3.28+, Ninja and a C++23 compiler/standard library supporting
std::expected. GCC 14 is the initial Linux CI target; MSVC 19.44 or newer is
the Windows target. Detailed verified tool versions are in the validation report.
cmake --preset debug
cmake --build --preset debug
ctest --preset debug
./build/debug/evo-sim --seed 123456 --entities 8 --ticks 1000 --verify-replay
On Windows use a Visual Studio x64 developer shell, or the repository's
tools/windows-check.ps1 helper. Executables have .exe suffix on Windows.
./build/debug/evo-sim --seed 123456 --entities 8 --ticks 500 --save state.evo
./build/debug/evo-sim --load state.evo --ticks 500 --output results.json
./build/release/evo-sim --ecosystem --seed 0 --episodes 3000
Ecosystem mode measures seeded bounded episodes of the synthetic feeding community and reports ticks, births, both mortality paths, extinctions and a fingerprint. It shares no state, snapshot or particle metric with the proof run, and its strategy constants are measurement inputs rather than simulation rules. See ADR-0029 for scope.
./build/release/evo-sim --ensemble --seed 0 --seeds-per-cell 4 --strategies 3 --tick-limit 400
Ensemble mode derives strategies from genomes instead of writing them, then runs
them on that same driver over a resource and temperature gradient. Each cell's
seeds are split in half and both halves are reported separately and never merged,
so a difference that appears in one half only is visible as the seed artifact it
is. Options belong to exactly one mode: --episodes counts episodes and is
rejected here, --seeds-per-cell counts seeds and is rejected in ecosystem mode.
A cell's numbers are not fitness, adaptation or balance, and the resource axis is
deliberately not monotonic. Lifetimes are censored: an organism still alive when
an episode stops is reported as a survivor with the time it was watched, never as
a death, so lived_ticks and observed_ticks answer different questions. See
ADR-0035 for scope and for why.
The second command continues saved PRNG/component state. --verify-replay
compares an uninterrupted run to a midpoint serialization/restore run. JSON
reports the seed, ticks, active entities and canonical state hash. Snapshots
are bounded local test files; they are not crash-consistent production storage.
Checks and measurements
cmake --build --preset debug --target format-check
cmake --preset analysis
cmake --build --preset analysis
cmake --preset asan
cmake --build --preset asan
ctest --preset asan
cmake --preset release
cmake --build --preset release
ctest --preset release
./build/release/evo-benchmark
./build/release/evo-spatial-benchmark
ASan uses UBSan too on supported Linux compilers. TSan has a separate tsan
preset and is never combined with ASan. clang-format/tidy major 19 is the initial
analysis baseline. The optional Clang libFuzzer target exercises snapshot
restore. See testing strategy and
deployment scaffold for scope and commands.
Repository boundaries
include/evo exposes core values and the headless simulation API.
src/simulation implements component state, tick ordering and local snapshot
codec. src/accounting provides the independent finite-inventory ledger;
it is not yet part of particle snapshots. src/processes holds the synthetic
producer, feeding, reproduction and episode fixtures built on that ledger; they
are bounded experiments, not organism biology. src/biology holds the immutable
genome record, the deterministic development that derives a phenotype from it and
the metabolic budgets that give capability a cost, and the seeded mutation
catalog that proposes successors and the archive that keeps them. No fixture reads
a genome yet.
apps/evo-sim owns CLI/file I/O
and reporting. tests holds contract,
fuzz and measurement programs. Future biology, world, networking and persistence
modules are documented boundaries; they are added when they have real behavior.
World0 is persistent state. No normal configure, build, test or CI job may create, reset, deploy to or delete it. Gitea builds the proof image for Harbor; a bounded dev verification Job and manual Argo templates are in deploy/. Persistent-world deployment still requires storage, ownership and backup gates.
The project license has not been selected. Do not infer an open-source license from a public dependency's license.