126 lines
7.2 KiB
Markdown
126 lines
7.2 KiB
Markdown
[Reviewed]
|
|
# ADR-0029: Deterministic ecosystem driver and bounded episodes
|
|
|
|
## Status
|
|
|
|
Adopted for the M2.6 headless measurement harness, and amended in M3.6 so a
|
|
strategy that does not reproduce is run rather than refused (see the founder
|
|
strategy paragraph below). No other part of the driver changed. No gameplay AI, perception,
|
|
behavior model, senescence biology, metabolic rate or population abstraction is
|
|
selected. The simulation contracts of ADR-0024 through ADR-0028 are unchanged.
|
|
|
|
## Context
|
|
|
|
M2.2 through M2.5 close the transfer cycle, but every intent is supplied by the
|
|
caller. Nothing decides what happens, so a long run needs a decision source before
|
|
extinction or diversity can be measured at all.
|
|
|
|
Two structural limits surfaced while scoping this increment. First, ADR-0028
|
|
retains identities permanently and caps slots at `max_consumers`, so one community
|
|
supports a bounded number of consumer lifetimes and is not a population: a single
|
|
million-tick community would spend almost all of those ticks after slot exhaustion
|
|
in a static state. Second, no maintenance cost exists, so a consumer that is never
|
|
eaten never dies and a run has no endogenous end. ENERGY_MODEL leaves baseline
|
|
metabolism and starvation rules open, so inventing them here would settle an open
|
|
biological question inside a measurement harness.
|
|
|
|
## Decision
|
|
|
|
Add `EcosystemEpisode`, which privately owns one `FeedingCommunity` and one seeded
|
|
`Random` stream. It holds no inventory, performs no transfers and calls no public
|
|
mutator other than `advance`. It reads committed public state and emits intents.
|
|
|
|
Measure many bounded episodes rather than one long community. Each episode ends at
|
|
extinction, defined here as no living consumer, or at a configured tick limit.
|
|
Because births consume permanent slots and every consumer has a finite lifespan,
|
|
extinction is reachable in every episode. The long-run figure is the total ticks
|
|
advanced across seeded episodes, and each episode reports its own outcome.
|
|
|
|
Mortality has exactly two sources, both already contracted. Predation: the driver
|
|
bites a target's entire remaining balance when that fits the intake cap, which
|
|
ADR-0026 already turns into terminal depletion. Lifespan: the driver emits an
|
|
ADR-0027 terminal fact once a consumer's age reaches its configured lifespan.
|
|
Lifespan is a host scheduling rule that bounds the episode, not senescence, aging
|
|
biology or a death cause. No maintenance, starvation or metabolic cost is added.
|
|
|
|
A founder strategy fixes opening inventory, intake cap, assimilation, an investment
|
|
bundle, a reproduction threshold and a lifespan. A strategy with nothing to invest
|
|
does not reproduce, and the driver runs it rather than refusing it: the empty
|
|
bundle would otherwise clear both reproduction bounds trivially and request a birth
|
|
transferring nothing, so the driver proposes no birth for it at all. Amended for
|
|
M3.6, which derives strategies from genomes: a mutation may legitimately drop the
|
|
reproduction capability, and refusing such a strategy here would have made the
|
|
strategies a run can measure a subset chosen by this guard rather than by the draw.
|
|
Only configurations this ADR previously rejected outright behave differently, so
|
|
the M2.6 fingerprint `2cd4a15f9fbe9949` is unchanged. ADR-0028 makes a child duplicate
|
|
its parent, so a founder strategy identifies one lineage for the whole episode and
|
|
competing strategies are the only source of variation. Lineage membership is
|
|
recovered by walking retained parent references to a founder.
|
|
|
|
Per tick the driver emits, in this order: terminal facts for every active consumer
|
|
that has reached its lifespan; then feed intents; then reproduce intents. It must
|
|
never submit a batch the community rejects, so it applies three self-restrictions.
|
|
A consumer terminated this tick neither feeds nor is fed upon nor reproduces. Each
|
|
target is claimed by at most one feeder per tick, assigned in ascending consumer
|
|
ID, which removes contention rejection. A consumer that is a feeding target this
|
|
tick does not reproduce this tick, which removes the interaction between a reduced
|
|
balance and the later reproduction check. Reproduce intents are truncated to the
|
|
number of free slots in ascending parent ID. Bites are per-channel
|
|
`min(intake cap, target balance)` and targets with no inventory are skipped.
|
|
|
|
A rejected `advance` is therefore a driver defect, not an ecological outcome, and
|
|
is reported as `community_failure` rather than being retried or absorbed. Target
|
|
selection draws from the seeded stream; nothing else consults it.
|
|
|
|
Each episode reports seed, ticks advanced, births, predation and lifespan deaths,
|
|
extinction tick, founder and surviving lineage counts, cumulative decomposition,
|
|
conserved totals and a state fingerprint. Conserved totals must be identical at
|
|
every tick. The report is data for review, not a pass threshold.
|
|
|
|
## Alternatives Considered
|
|
|
|
A maintenance cost with a starvation rule would give endogenous mortality, but
|
|
ENERGY_MODEL leaves metabolism and starvation explicitly open and a measurement
|
|
harness is the wrong place to settle them. Reusing retired slots would destroy the
|
|
ancestry ADR-0028 just established. Raising `max_consumers` delays exhaustion
|
|
without removing it and would widen per-tick intent bounds with no evidence. One
|
|
continuous million-tick community measures a static post-exhaustion state. Letting
|
|
the driver retry a rejected batch would hide driver defects as ecology.
|
|
|
|
## Benefits
|
|
|
|
The full cycle runs unattended and deterministically: nutrients fund growth, growth
|
|
funds feeding, feeding funds offspring, lifespan and predation produce corpses, and
|
|
decomposition returns matter. Extinction and lineage survival become measurable
|
|
across seeds, conservation is checked every tick over long horizons, and the driver
|
|
is separable from the contracts it exercises.
|
|
|
|
## Costs
|
|
|
|
Episode length is bounded by slots times lifespan, so this measures many short
|
|
histories rather than one long one. Strategy constants, lifespans and the targeting
|
|
rule are chosen, not derived. One-feeder-per-target and the reproduction exclusion
|
|
are scheduling conveniences that bias contention away from the ordering ADR-0026
|
|
deliberately exposes. Whole-community copies per tick remain the baseline.
|
|
|
|
## Risks
|
|
|
|
Do not read episode statistics as population dynamics, life-history theory or
|
|
balance. Lifespan is not senescence, targeting is not perception, and a surviving
|
|
lineage count is not speciation or fitness. Conservation holding across a million
|
|
ticks demonstrates arithmetic, not ecological plausibility, and the explicit risk
|
|
of this increment is passing every invariant while modelling nothing interesting.
|
|
Strategy constants must not become gameplay by having been measured.
|
|
|
|
## Consequences
|
|
|
|
Test per-tick conservation and nonnegative balances across many seeds, identical
|
|
reports for one seed on repeated runs, independence of episodes, extinction
|
|
reached and recorded, lineage attribution through retained ancestry, both mortality
|
|
paths, slot exhaustion, tick-limit termination, a single-founder episode, an
|
|
episode whose founders cannot reproduce, and that the driver never provokes a
|
|
rejected batch. Cross-platform fingerprints must agree. No snapshot format,
|
|
database, renderer, deployment or simulation contract changes. Serialized recovery
|
|
of episode state is not provided; M4 aggregation remains the path to real
|
|
populations.
|