Commit Graph
16 Commits
Author SHA1 Message Date
dingoandClaude Opus 5 5497f4d74c Propose mutations without proposing a best build
M3.4 adds the candidate-generation experiment GENOME_MODEL describes: a
static catalog of four effects over the seven capabilities, drawn from a
recorded context with an explicit stream.

The named risk is a hidden best build or offerings biased toward what
would help, so the defence is structural rather than asserted. Nothing is
ranked: candidates are drawn without replacement by rejection sampling,
making every eligible operator exactly as likely as any other, and the
result is returned sorted by operator ID. No score exists in the record,
position carries no meaning, and nothing about an organism's situation
makes a helpful mutation more likely to be offered.

Eligibility is not a second rulebook. An operator is eligible when the
genome it would produce passes the M3.1 validation unchanged, so
prerequisites, required capabilities, ranges and the acyclic development
graph are enforced once, where they were defined. Shedding a capability
another declares as a prerequisite fails that check with no rule written
here to catch it. Range boundaries are refused rather than clamped, since
a clamp would make two operators agree and offer a no-op as a choice.

The draw reads the parent digest and the context and nothing else, so the
same context always returns the same candidates and a retry cannot
reroll; a new event index is what earns a new draw. select_mutation
regenerates the offer and refuses unless it still matches, so a changed
context is rejected rather than answered with a different mutation.

Cost is not invented: a candidate reports the successor's own maintenance
and mass under ADR-0032, and reserves nothing.

The eligible set is pinned by hand from the schema rather than observed,
and the uniformity check is confirmed to fail against a draw that takes
the first eligible operators. The rejection sampling that removes modulo
bias is correct by construction, not test-verified: at this scale the
bias is one part in 10^18. That is recorded rather than claimed.

No organism mutates and no fixture calls any of this. Candidate count,
mutation cost as a game rule, inherited versus acquired expression, NPC
mutation and recombination all remain open, as GENOME_MODEL requires.

Native Release, clang-tidy analysis, ASan and format checks pass 20/20.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 15:27:21 -04:00
dingoandClaude Opus 5 36ee71cfe9 Decide affordability where composition is known
A construction transition could require more of an element than was
available, because the check compared net mass. A step growing a body
from 13 to 14 femtograms nets one femtogram but acquires a carbon and a
nitrogen while freeing one of other, and released other pays for neither.
Matching totals let one element silently fund another.

Net mass was never the right question, and the layer asking it could not
ask a better one: plan_development has no composition. A single scalar
pool could not carry the answer either, since it cannot say that carbon
is plentiful while nitrogen is not. The environment now states what is
available per ledger channel.

plan_development keeps a total-mass bound, which is sound because net
never exceeds gross, but it is a proposal rather than an authority.
metabolic_budget narrows it to the largest step whose own intake fits
channel by channel, and reports the growth that step actually funds. That
revises ADR-0031 on this point, recorded in both ADRs.

The tests place a single femtogram in each channel in turn and require
that no step needing a different element is funded, that nothing is
acquired beyond what is present, and that the mass-only plan would have
admitted the step; a carbon and a nitrogen together then fund it exactly.
Across six target sizes by seven growth fractions by four stock levels,
every reported intake fits the availability channel by channel and never
exceeds the proposed step. Confirmed to fail with the check removed.

The releasing case moved to a target of 20 femtograms, where the step
occurs at the full rule step rather than depending on a scarce supply
that the corrected plan no longer bounds the same way.

Native Release, clang-tidy analysis, ASan and format checks pass 19/19.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 13:02:44 -04:00
dingoandClaude Opus 5 e0fd4680f6 Make construction reproduce the body it claims to build
Construction composed the mass difference instead of differencing the two
composed bodies. Those are not the same: composing the difference throws
away the rounding the existing body already carries, so the budget summed
to the right total while funding individual channels short or over. At
target mass 1001 growing from 10 to 60 it funded C25 N7 P2 other16,
leaving nitrogen and phosphorus one short each and other two over, so
spending it could not produce the body the same rules derive.

Construction is now the per-channel difference between the composed
bodies, which funds C25 N8 P3 other14 for that case.

That difference can be negative on a channel, because the remainder rule
is not monotone: a body growing from 13 to 14 femtograms sees other fall
from 6 to 5. Construction is therefore a transition with an intake and a
release rather than a single requirement, and the release is a rounding
artifact bounded by a few femtograms, not excretion.

The invariant held + intake - release == reached is asserted per channel
for the reported case, for the releasing case, across six target sizes by
seven growth fractions by four material budgets, and across a forty-step
walk from nothing to full growth where accumulated intake and release are
checked against the whole history. The net of every transition is also
asserted to equal what a plan charges material for. These tests were
confirmed to fail against the previous implementation.

Native Release, clang-tidy analysis, ASan and format checks pass 19/19.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 12:26:40 -04:00
dingoandClaude Opus 5 be71d4f441 Give capability a cost without giving it a multiplier
M3.3 turns a phenotype into the budgets a ledger can hold: body
composition, maintenance, movement, the next construction step, the
per-tick intake limit and the reproduction investment. metabolism is the
single place the genome's description of capability becomes accounting
quantities, so the record itself stays free of those types and M3.1's
boundary is crossed once, explicitly.

The named risk is reintroducing RPG modifiers, where a capability
parameter becomes a flat percentage over every budget. Each budget is
therefore derived from a different phenotype quantity: maintenance from
mass plus membrane upkeep, movement from mass and speed, intake from
surface, construction from the mass a growth step adds, investment from
the body a parent already has. One parameter moves some budgets and not
others, by different amounts. Doubling membrane thickness costs more
matter to build, more energy to hold and more to haul, while leaving
uptake, speed, assimilation and structural mass identical, and the mass
and maintenance ratios differ, so no single multiplier could produce it.
The test asserts that non-uniformity rather than describing it.

Composition is declared per compartment, and membrane is the carbon-rich
one, so a thicker membrane changes what a body is made of and not only
how much. A split assigns the first three channels by share and gives the
remainder to the last, so parts always sum back to the whole and a
derived body can be spent through the ledger without a rounding leak.
That is checked at four awkward masses where every share floors.

processes::consumer_for is the first path from a genome into the M2
fixtures. Opening inventory stays the caller's: a genome says what an
organism can do, never what it holds, and a derived config that invented
an opening balance would create matter. A derived consumer is shown
driving a real feeding tick with the ledger conserving exactly, and a
bite one femtogram past the derived cap refused by the M2.3 contract.

Every budget is asserted as a hand-calculated literal. The constants are
chosen so budgets are of comparable magnitude, which is legibility for
tests and not tuning. No existing fixture reads genomes, and no organism
spends any budget: there is still no starvation, death or repair rule.

Native Release, clang-tidy analysis, ASan and format checks pass 19/19;
every existing golden and fingerprint is unchanged. Linux CI has not run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 11:31:01 -04:00
dingoandClaude Opus 5 3f86dada0e Derive a phenotype from the genome without touching it
M3.2 adds derive_phenotype and plan_development as pure integer
functions of a genome, a growth state and an environment. Nothing is
stored: a phenotype is recomputed from retained inputs rather than
cached, so a cached copy can always be checked against a recomputation.

The risk this increment was scoped against is confusing the genome with
runtime damage. Growth and damage live in a separate state that no
function may write back, and no entry point takes a mutable genome.
Damage changes the phenotype and leaves the encoded bytes and content
digest identical, so heredity cannot carry acquired condition.

The genome's development version selects a rule set, which is what makes
that field worth carrying; an unknown version fails closed rather than
deriving under the wrong rules. Version 1 declares every constant. The
shape model is explicit rather than implied: the body is a cube of
uniform declared density, so extent is an exact integer cube root and
surface is six extents squared. Membrane mass follows surface and the
genome's thickness, maintenance follows total mass plus a membrane
upkeep term, and uptake scales with surface, so size trades uptake
against maintenance. A capability the genome does not carry yields zero.

A plan advances growth by at most the rule step, reduced to the largest
step the available material funds exactly, never a partial one and never
a grant. It reserves nothing and pays for nothing: the matching transfer
does not exist until M3.3, and an apply that moved no inventory would
look like a committed operation while conserving nothing.

The fixture genome is an exact 20 micrometre cube, so every derived value
is asserted as a hand-calculated literal, as are the half-built, damaged,
maximum and cube-root-boundary cases. Determinism is checked over 45
growth and temperature combinations. The declared flooring is pinned
rather than hidden: a body whose mass floors to zero advances its counter
for no material, granting no structure because none exists either way.

Omitted physics is a documented model limitation, not a modifier. Nothing
here is balance, and no organism yet develops. Native Release, clang-tidy
analysis, ASan and format checks pass 18/18; every existing golden and
fingerprint is unchanged. Linux CI has not run yet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 21:48:24 -04:00
dingoandClaude Opus 5 64a12c4dfc Make genome validity survive moves and freeze the v1 encoding
Two defects from review of 8584eb1.

Genome had implicit move operations, so moving one emptied the source's
capabilities while leaving its identity, origin and digest intact. The
result still reported its ID but no longer encoded to decodable bytes,
which contradicts the documented invariant that an invalid genome cannot
exist. Declaring the copy operations suppresses the implicit moves, so a
move decays to a copy and the invariant holds for every operation. The
record is at most seven capabilities and one parent, so the copy is cheap.

The move tests were confirmed to fail without the fix: Debug and ASan
exit 1 at runtime, and Release does not compile, because MSVC proves the
moved-from comparison always throws and rejects the unreachable code.
clang-tidy then flagged the deliberate decaying moves; those lines carry
a NOLINT explaining that the decay is the contract under test.

The encoding tests compared the current encoder against the current
decoder, so a coordinated change to layout or digest would have passed
while breaking existing v1 records. A frozen 83-byte fixture now holds
one schema 1 founder record, asserted in both directions: the encoder
must still produce those bytes and the decoder must still read them. Every
structural byte was verified by hand against schemas/genome-v1.md before
freezing. It is a golden, not a value to update when a test fails.

Native Release, clang-tidy analysis, ASan and format checks pass 17/17.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 21:23:33 -04:00
dingoandClaude Opus 5 8584eb1f6f Add the immutable genome v1 record and its canonical encoding
Open M3 with the record that development and mutation will read, in a new
evo::biology library that nothing else links yet. A genome is validated
once at construction and exposes no mutator, so an invalid one cannot
exist at runtime and callers never revalidate. A draft carries
unvalidated input; create and decode apply identical semantic checks, so
a decoded record is never less validated than a constructed one.

Schema 1 fixes the seven v0.1 capability kinds. Each has a unit, an
inclusive range, whether every genome must carry it, and the capabilities
it mandates, all held as schema facts rather than record data, so no
record can contradict its own units. A capability adds one parameter and
a bitmask of declared developmental edges; the union of declared and
mandated edges must be acyclic, which seven nodes make exact and bounded.

Identity is a nonzero world-scoped genome ID distinct from every runtime
identity, a nonzero origin event, and zero or one parent. Zero parents
identifies a documented founder. The format reserves room for a second so
recombination needs a schema version rather than a layout change.

The encoding follows ADR-0008: explicit little endian, bounded before any
allocation, an exact length match so trailing bytes are rejected, records
strictly ascending by kind so the bytes are canonical and duplicates fall
out of the same comparison, a stored digest recomputed on decode, and a
trailing checksum. The digest covers identity and ancestry, so identical
capabilities from different origins never share one. Neither value is an
authenticity claim. Unknown schema versions fail closed.

Tests cover ancestry rules, every declared range boundary from both
sides, self, mutual and three-node cycles, a cycle closed by a mandated
edge, truncation at every length, trailing and oversized buffers, every
single-byte corruption, and three resealed edits that reach the digest,
version and ordering checks rather than stopping at the checksum. One
branch is recorded as uncovered rather than given a test that cannot
fail: in schema 1 every mandated capability is also required.

No genome affects any simulation. Native Release, clang-tidy analysis,
ASan and format checks pass 17/17; golden d61ad5bf0c928c76 and ecosystem
fingerprint 2cd4a15f9fbe9949 are unchanged. Linux CI has not run yet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 20:53:23 -04:00
dingoandClaude Opus 5 eaf58f2b85 Drive the energy cycle with measured ecosystem episodes
Close M2 with a deterministic driver that owns one community and one
seeded stream, holds no inventory and emits only the terminal, feeding
and reproduction intents the earlier increments already accept. No
simulation contract changed to make the cycle run unattended.

Two limits shaped the design. Identities are never reused and slots are
capped, so one community supports a bounded number of consumer lifetimes
and is not a population. No maintenance cost exists, so a consumer that
is never eaten never dies, and inventing a starvation rule here would
settle a question ENERGY_MODEL leaves open inside a measurement harness.
The harness therefore measures many bounded episodes, taking mortality
from predation and from a configured lifespan delivered as an ADR-0027
host terminal fact. Lifespan bounds an episode; it is not senescence.

The driver must never submit a batch the community rejects, so it probes
a discarded copy each tick to size bites against the state feeding will
actually see, claims each target for one feeder, and excludes a bitten
consumer from acting. A rejected tick is reported as a driver defect
rather than absorbed as ecology.

Across 64 seeds the suite steps tick by tick, requiring exact conserved
totals at every tick and an identical report on replay, and covers both
mortality paths, slot exhaustion, tick-limit termination, lineage
attribution, episode independence and configuration rejection.
evo-sim --ecosystem reports seeded ensembles: 3,000 episodes advanced
1,093,007 ticks, all reaching extinction, with deaths reconciling exactly
against founders plus births. That demonstrates arithmetic and turnover,
not ecological plausibility; strategy constants are chosen inputs.

Native Release, clang-tidy analysis, ASan and format checks pass 11/11;
golden d61ad5bf0c928c76 is unchanged. Linux CI has not run yet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 17:38:34 -04:00
dingoandClaude Opus 5 c84a701edf Add funded reproduction with retained lineage identity
Close the M2.5 fixture cycle. A bounded list of trusted reproduction
intents runs after feeding and before decomposition, so a consumer can
fund offspring from what it ingested and a process terminated in that
tick cannot reproduce. The intent names a withdrawal from the parent
reservoir; a fixed construction fraction endows the child and the
remainder becomes real heat and waste. Nothing is credited from outside
the community, so conserved totals are unchanged by a birth.

Reserved slots are pre-allocated at creation, so a birth never grows the
ledger and a full community rejects rather than funding a smaller child.
Slots never return to the unborn state, so process identities are never
reused, and a parent reference plus origin tick outlive both organisms
and survive decomposition. A child duplicates the configuration of its
parent because no genome exists yet; this is duplication, not heredity.

Default zero capacity leaves the M2.4 reservoir layout and every existing
result unchanged, including golden d61ad5bf0c928c76. Native Release,
clang-tidy analysis, ASan and format checks pass; Linux CI has not run
for this increment yet. This defines no reproductive strategy, fecundity
rule, mutation model, gestation, spatial placement or account ownership.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 20:36:49 -04:00
dingo e17a9a7279 Preserve terminal inventories and add bounded decomposition 2026-09-20 15:26:58 -04:00
dingo b7dd466f57 Add shared feeding community with atomic resource transfers 2026-09-20 10:28:54 -04:00
dingo af293b8b50 Add finite producer capture and resource-limited growth process 2026-09-20 08:56:46 -04:00
dingo 8fd3591b0e Add atomic conserved energy and elemental inventory ledger 2026-09-19 19:42:29 -04:00
dingo 9b19509673 Add exact periodic neighborhood queries and measured scan baseline 2026-09-19 19:21:45 -04:00
dingo b620edfd6f Add deterministic transactional lifecycle command scheduler 2026-09-19 16:35:46 -04:00
dingoandClaude Opus 5 d5b4bd068e Initial commit: architecture docs and headless engineering proof
Aeternalis Evolution, a custom-engine persistent evolutionary MMO.

This first commit establishes the project skeleton:

- Architecture and design docs: project vision, system overview,
  engineering constitution, roadmap, 19 ADRs, and the simulation,
  world, network, persistence and infrastructure architectures.
- Headless engineering proof: deterministic synthetic particles,
  component lifecycle, explicit PRNG streams, canonical snapshots
  and restored execution.
- Build and tooling: CMake 3.28+ / Ninja presets, C++23 feature
  check, clang-format and clang-tidy config, format check script,
  Windows check script, and a Docker build context.
- Tests: unit tests, benchmarks, a snapshot fuzz target and CLI
  integration wiring.

No gameplay, renderer, network service or running deployment yet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 15:44:41 -04:00