Energy, metabolism and death

Every unit of energy in this world is accounted for. Not approximately, and not on average: the books are balanced every tick against a tolerance, and if they do not balance the simulation stops itself rather than continue producing data that looks fine and is not.

Implementation Ruleset pre-genesis-candidate-v2 Source: src/el/energy.py, src/el/tick.py

Where energy can be

There are five places energy can sit, plus two running totals for what has entered and left the system. Everything else in the simulation moves energy between them.

The reservoirs, from el.energy.Reservoirs. Summed in double precision for the audit.
ReservoirWhat it holds
resourceAbiotic energy standing in the world's cells, regrowing under light and moisture
detritusDead organic matter in cells, partly recycling back to resource over time
gutWhat organisms have ingested but not yet digested
somaThe usable energy of living organisms, the number the inspector shows as energy
objectsThe nutritional content of physical matter lying on the ground, including remains
influxCumulative energy that has entered the system from outside, through photosynthesis-like growth
dissipatedCumulative energy that has left, through metabolism, inefficiency and decay

The invariant

S(t) = resource + detritus + gut + soma + objects residual = S(t) - ( S(t-1) + influx(t) - dissipated(t) ) # checked every tick, tolerance 1e-6 relative plus 1e-3 absolute. # a violation raises and halts the run. it does not warn and continue.

This is not a debug assertion someone left in. It runs in production, on the live world, on every tick, and it is the reason a run that completes is worth something. A simulation quietly leaking energy would still produce populations, lineages, births and deaths, all of which would look entirely normal and none of which would be running the physics the site describes.

Emergent Life implementation

Halting is a real, reachable outcome, not a theoretical one. If it happens, the world reports itself as halted rather than pretending to still be running, and the reason is recorded. There is also a separate soft halt for when the population reaches its capacity, which is a legitimate ecological outcome rather than an error.

What a tick costs

Every term below is itemised separately in the tick's own statistics, so any organism's bill can be reconciled exactly rather than inferred from a total.

Read from el.config. Multipliers named "the organism's own" come from its genome, through el.phenotype.
CostAmountNotes
Basal upkeep0.028 times the organism's basal cost multiplierPaid every tick by every living organism, whatever it does
Movement0.05 times speed squared, times body size, times terrain resistanceCharged on the attempt, not on arrival
Sensing0.005 times (sense radius / 4) squaredA wider sensory field is genuinely more expensive to run
Ingest attempt0.002 times the ingest output valueCharged whether or not there was anything to eat
Thermal stress0.006 times thermal stress squaredZero inside the organism's own tolerance band
Moisture stress0.006 times moisture stress squaredSame shape as thermal
Light penalty0.006 times the light shortfall squaredReduced by the light tolerance gene
Running a brain0.002 flatCharged only when the neural controller is in use
Running plasticity0.001 flat plus 0.5 times the size of the last weight changeThe size term is charged one tick late, to avoid a same-tick circular dependency
Grasp or release attempt0.002 flatCharged on the attempt, success or failure
Contact attempt0.01 times the output valueCharged even when the attempt hits empty air
Signalling0.004 times the absolute signal valueOne cost covers both the broadcast and the persistent deposit

The pattern to notice: attempts cost, whether or not they work. An organism that spends every tick trying to push an object that will not move pays for every one of those attempts. That is what made the finding in RN-001 serious rather than merely untidy: a population was paying continuously for an affordance that succeeded roughly once in ten thousand tries.

Eating and digestion

Ingesting moves energy from a cell into the organism's gut, at a rate scaled by the ingest output value and limited by the room left in the gut. Digestion then moves energy from gut to body, at a rate its own gene scales, and at an efficiency between 0.35 and 0.65 that another gene sets.

The fraction lost to digestive inefficiency is genuinely dissipated. It does not go anywhere. It is counted in the running dissipated total, which is exactly why the invariant still balances.

Death, and what a body becomes

An organism dies when its energy reaches zero, or when its health does. Both are checked once, at the same point in the tick. Starvation and injury are distinguished in telemetry for reporting, but they are not separate mechanisms: there is no cause-of-death state machine, only the same two numbers reaching zero.

What is left splits three ways. A fraction dissipates. A fraction returns to the cell as detritus, which decays and partly recycles back into standing resource. And if there is enough left above a floor, a fraction becomes a discrete remains object: a real physical thing lying on the ground with mass and nutritional content, which other organisms can sense, push, carry and eat.

Emergent Life implementation

That third path is why the objects reservoir exists at all. Once a physical object could carry nutritional energy, the five-reservoir model was no longer complete, and adding remains without adding the reservoir would have broken the invariant on the first death. The reservoir is deliberately general rather than remains-specific: seeded plant matter and wood carry nutritional content too, and have counted from the very first tick.

Ageing

Health drains slowly with age, at a per-tick rate set by the longevity gene, between 0.012 and 0.0015 per tick. Nothing else about ageing is modelled: an old organism is not slower, weaker, or less fertile except through the health it has lost. Slower ageing is one of the nine genes that feed the shared metabolic surcharge, so a long-lived organism pays for it every tick of that longer life.

Reproduction as an energy transaction

Reproduction is a spend. The parent transfers between 3 and 7 energy units to the offspring, set by its own gene, and a further fraction of that transfer is dissipated as overhead. It can only attempt this if it is at least 100 ticks old, has at least its own threshold of energy, has served its own cooldown, and has a free neighbouring cell to put the offspring in.

No mate is involved. Reproduction is asexual: an offspring is a mutated copy of one parent. Where two parents' offspring want the same free cell, the conflict is resolved by a deterministic keyed contest rather than by processing order.