Genome, inheritance and mutation

Separately from its brain, every organism carries a physical genome of 48 slots, of which 19 are active. Each is a single number between 0 and 1 that maps to a stated physical quantity. This page lists all 19, the range each maps to, what each one costs, and exactly how they mutate.

Implementation Ruleset pre-genesis-candidate-v2 Source: src/el/genome.py, src/el/phenotype.py

One number per gene, all on the same scale

Every active gene is a single float in the range 0 to 1. Not a range per gene, not a unit per gene: the same interval for all 19. That is a deliberate simplification with two consequences. Mutation clamping is identical everywhere, so no gene needs its own special case. And genetic distance between two organisms is automatically normalised, with no per-gene weighting table that someone would have had to choose.

The founding ancestor's genome is every active gene at exactly 0.5. Not a random draw: a fixed constant. Every founder in the world starts identical, and all variation between organisms enters through mutation at birth, generation by generation.

Emergent Life implementation

Every mapping range below is centred so that a gene value of exactly 0.5 reproduces the pre-genetics calibrated constant that the ecology was originally balanced around. Genetic variation therefore moves the population around a previously validated baseline rather than away from it by construction. This was measured and corrected once during implementation, after an initial uncentred mapping was found to raise baseline costs by 20 to 30% and collapse a run that should have persisted.

All 19 genes

Ranges from el.phenotype's own mapping constants. Gene 0 maps to the first value, gene 1 to the second.
#GeneWhat it scalesRangeWhat it costs
0 body_size Move cost and basal cost multiplier, with a small durability payoff 0.65 to 1.35 times, health 0.85 to 1.15 times Bigger costs more to move and to maintain
1 speed Step probability and movement cost multiplier 0.6 to 1.4 times Faster costs more per attempt
2 metabolic_efficiency Basal cost multiplier 1.3 down to 0.7 times Feeds the shared upgrade surcharge
3 max_health Health ceiling multiplier 0.7 to 1.3 times Feeds the shared upgrade surcharge
4 longevity Health lost per tick to senescence 0.012 down to 0.0015 per tick Feeds the shared upgrade surcharge
5 repro_energy_threshold Minimum energy to attempt reproduction 8 to 16 energy units Paid directly by the reproduction economics
6 repro_investment Energy transferred to the offspring 3 to 7 energy units Paid directly, per birth
7 repro_cooldown Ticks before it can reproduce again 120 to 280 ticks Paid directly, in opportunity
8 sense_radius Radius of the four directional sensing sectors 2 to 6 cells Sensing cost scales with the square of the radius
9 light_tolerance Reduces the low-light metabolic penalty 0 to 1 Feeds the shared upgrade surcharge
10 thermal_tolerance Width of the comfortable temperature band 0.15 to 0.45 Feeds the shared upgrade surcharge
11 moisture_tolerance Width of the comfortable moisture band 0.15 to 0.45 Feeds the shared upgrade surcharge
12 resistance_sensitivity How much terrain resistance raises movement cost 0 to 1 Insensitivity feeds the shared upgrade surcharge
13 digestion_efficiency Fraction of gut contents that reaches the body 0.35 to 0.65 Feeds the shared upgrade surcharge
14 gut_processing_rate Digestion rate multiplier 0.7 to 1.3 times Trades against gut capacity
15 energy_storage Gut capacity multiplier 0.7 to 1.3 times Trades against processing rate
16 hue Sprite hue cosmetic None. No physical effect at all
17 saturation Sprite saturation and value bias cosmetic None. No physical effect at all
18 marking Sprite marking pattern cosmetic None. No physical effect at all

Slots 19 to 47 are reserved. They are always exactly zero and nothing reads them. They exist for the same reason the reserved action channels did: so a future phase can give one a meaning without changing the shape of anything already evolved.

No gene is free

Nine of the genes are upgrades in the obvious sense: bigger body, more health, longer sensing range, bigger gut, better digestion, wider thermal and moisture tolerance, more light tolerance, and insensitivity to rough terrain. All nine feed a single shared surcharge on basal metabolic cost, computed as their unweighted mean.

The rule that produces is simply "every upgrade costs something at rest". That is one mechanism rather than nine hand-tuned pairwise trade-offs, which matters because nine hand-tuned trade-offs would be nine places for a designer's intuition about what should be expensive to leak into the results.

A few genes carry a direct mechanistic cost on top. Speed raises both step probability and movement cost. Terrain sensitivity raises movement cost specifically on rough ground. The reproduction genes need no extra term at all: spending more energy per offspring literally costs more energy per offspring.

Observed result

This design was not right first time. A contrast trait deliberately included in an early selection experiment, body size, drifted consistently downward across 6 of 8 seeds. The reason turned out to be that body size cost energy and bought nothing in the mapping at the time. That defect was found by the experiment and fixed, and body size now carries a small durability payoff. The original numbers are still published as they were measured, before the fix. See RN-003.

How mutation works

At every birth, each active gene is considered independently. There are three outcomes, evaluated in this order:

Read from el.config.GenomeParams. Both change magnitudes are symmetric normal draws, and the result is clamped back into 0 to 1.
OutcomeProbability per geneChange
Unchanged85%Copied exactly from the parent
Large0.75%Add a normal draw with standard deviation 0.15
Small14.25%Add a normal draw with standard deviation 0.03

Three discrete outcomes rather than a continuous distribution with a fat tail is a stated simplification, chosen because it is easy to reason about and easy to test. Every draw is keyed on the parent's identifier, the offspring's identifier and the gene's index, never on array position, so the same birth in the same world always produces the same offspring however the population happens to be laid out in memory.

The brain mutates separately, under a four-outcome model with different probabilities. See the controller page for that table.

When a lineage becomes its own

A lineage is not a species and there is no speciation event. It is a bookkeeping rule with one threshold, and it works like this: when an offspring is born, its genome is compared against the founding genome of its parent's lineage. If the root-mean-square difference exceeds 0.1, the offspring founds a new lineage of its own.

Emergent Life implementation

The comparison is against the lineage's founder, not against the immediate parent. That is the whole point. Comparing against the parent would only ever catch a single unusually large mutation, and cumulative drift across hundreds of generations would never register. Comparing against a fixed founding reference is what lets slow, ordinary drift eventually cross the line.

Each lineage records its founder's identifier, its founder's genome, the tick it was founded, the lineage it split from, and, if it ends, the tick it went extinct. That is real, authoritative state, not telemetry: it is checkpointed with the world. It is what the world history page reads.

What is not genetic

Worth stating explicitly, because a list of genes invites the assumption that everything is one:

Three genes that do nothing at all

Hue, saturation and marking determine how an organism is drawn and have exactly zero physical effect. They are inherited and mutated like any other gene, so offspring resemble their parents and a lineage acquires a look, but nothing about the simulation reads them.

They are worth mentioning because they are the one place where the visible appearance of this world is genuinely decorative, and it would be easy to mistake a lineage's distinctive colour for evidence of something. It is evidence of descent, and of nothing else.