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>
This commit is contained in:
dingo
2026-09-22 17:38:34 -04:00
co-authored by Claude Opus 5
parent 67637ac14c
commit eaf58f2b85
13 changed files with 1009 additions and 11 deletions
+40
View File
@@ -236,3 +236,43 @@ A child duplicates the configuration of its parent because no genome exists yet.
This is duplication, not heredity, and no trait varies between generations.
Reproductive strategy, fecundity, juvenile viability, gestation, spatial placement
and account ownership are not defined here. No inventory is created on birth.
## Implemented M2.6 measured episodes
[ADR-0029](../adr/0029-ecosystem-driver-and-episodes.md) adds `EcosystemEpisode`,
a deterministic driver that owns one community and one seeded stream, holds no
inventory and performs no transfers. It reads committed state and emits the
terminal, feeding and reproduction intents the earlier increments already accept.
No simulation contract changed to make the cycle run unattended.
Two limits shape the harness. 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. The harness therefore measures many bounded episodes rather than one long
community, and mortality comes only from predation, where a bite takes a target's
whole remaining balance, and from a configured lifespan delivered as a host
terminal fact. Lifespan bounds the episode; it is not senescence or a death cause.
```mermaid
flowchart LR
N[Nutrients] --> P[Producer structure]
P -->|bite| C[Consumer reserve]
C -->|funded endowment| O[Offspring]
C -->|lifespan or predation| D[Corpse]
O --> C
D -->|bounded decay| N
C -->|assimilation loss| W[Waste and heat]
W --> N
```
The driver must never submit a batch the community rejects, so it probes a
discarded copy to size bites against the state feeding will actually see, claims
each target for one feeder, and excludes a bitten consumer from acting that tick.
A rejected tick is reported as a driver defect rather than absorbed as ecology.
Conservation is checked at every tick across seeded ensembles, and each episode
reports births, both mortality paths, extinction tick, surviving lineages and a
fingerprint. Conservation holding over a million ticks demonstrates arithmetic,
not ecological plausibility. Strategy constants, lifespans and the targeting rule
are chosen inputs, not derived biology, and must not become gameplay by having
been measured. Real populations still require M4 aggregation.