How it works
A genome is bytes. A body is machinery. Everything else follows.
These are the mechanisms — what the simulator actually does each tick. Why any of it is arranged this way is on the idea page; the language a genome is written in has its own.
The body
A genome does not express behaviour. It builds machinery, and the machinery does the work. A cell has sixteen organelle slots; slot zero is always the membrane and is also how a cell senses itself. Everything else is built with BUILD, costs structural matter and energy, takes several ticks to construct, and carries upkeep for as long as it exists.
The catalogue it builds from is thirty-two types, which is a different number from the slots — they were one number until they were split, and measured occupancy is about a third, so what ran out was the catalogue and not the room. The upper half is not sixteen new organs. Type n + 16 is the same job done a different way, so that bit 4 of a type operand means something: a copy error is a single bit flip, and a cilium is therefore one mutation from a flagellum. Laid out any other way, flipping that bit would turn a working organelle into a no-op — one flip in eight, on every type byte in every genome.
So a reserved slot in the upper half is a real reservation rather than filler: it means this organ has no second way of being done yet. Seven of the sixteen are filled.
| # | Organelle | What it is for |
|---|---|---|
| 0 | MEMBRANE | The self-sensor. Slot 0 is always the membrane and cannot be torn down or retyped — a cell reads its own mass, energy, age and chemistry through it. |
| 1 | NUCLEUS | Where the genome physically lives. Total nucleus capacity bounds genome length and costs upkeep, so genome bloat is selected against by physics rather than by a rule. |
| 2 | MITOCHONDRION | Burns substrate with an oxidant to release energy, leaving waste. |
| 3 | CHLOROPLAST | Runs the reaction backwards using light. The only thing in the world that keeps matter from settling into an all-waste equilibrium. |
| 4 | VACUOLE | Storage. Being able to hold more than you need right now is a strategy. |
| 5 | PUMP | Moves a named chemical across the membrane at a signed rate — in or out, against a gradient if you can pay for it. Declared in the spec, given a number and a name, and read by nothing: it stays that way until EAT is a passive uptake it can beat. Listed because a catalogue that quietly omits its own debts is not a catalogue. |
| 6 | CILIUM | Thrust. Pushes the cell and shoves an impulse into the fluid, which is what makes a swimming colony stir its own water. |
| 7 | CHEMOSENSOR | Reads a chemical's concentration and its gradient. Wire it to a cilium and you have chemotaxis — but nothing wires it for you. |
| 8 | PHOTOSENSOR | Light intensity and the direction it comes from. |
| 9 | TOUCHSENSOR | What is next to you, how big it is, and a handle you can try to join to. |
| 10 | JUNCTION_PORT | The socket a junction occupies. Cheap, which is what makes a nervous system affordable. |
| 11 | LYSOSOME | Digests carrion into something a body can be built from. Scavenging is a separate trade from killing, and this is why. |
| 12 | SPIKE | Damages what it touches. It does not feed you — it makes a corpse, and something still has to digest that. |
| 13 | OSCILLATOR | A clock. Periodic behaviour — swimming gaits, peristalsis, dormancy cycles — needs one and evolving one from scratch is expensive. |
| 14 | HOLDFAST | Grips a barrier, so a cell can hold station in moving water — the first thing in the engine that can refuse to be carried by the fluid rather than ride it. Load rises with the cell's own radius, and a cell that cannot grip hard enough slips in proportion rather than letting go. |
| 15 | SHELL | A test of glass, and the catalogue's first defence. Before it a spike met either bare membrane or nothing, so predation was free or worthless with nothing in between and no arms race was possible from either end. It costs twice over, which is what keeps it a strategy rather than an upgrade everything grows: matter to build, and shade — a shell is opaque, so the light reaching the chloroplasts under it falls by exactly the fraction of the body it covers. Armour and photosynthesis are rival, on one control word, with no threshold anywhere in it. |
| 16 | RESERVED_16 | The membrane has no variant. Up here that is what a reserved slot means — not a spare number, but an organ nobody has found a second way to do yet. |
| 17 | RESERVED_17 | No second way to hold a genome, yet. |
| 18 | DIAZOSOME↔ 2 | The engine oxygen drives, and the engine oxygen stops. It cracks the inert dinitrogen pool into the bioavailable kind at a steep energy price, and local oxidant inhibits it — which is what makes an anoxic corner worth living in, and gives the shell's impermeability a second job. |
| 19 | CHEMOSYNTH↔ 3 | A producer that needs no light: the chloroplast's reaction driven by a reduced mineral instead of the light field. The only entry in the catalogue that can make a living in the dark, and the reason the vent and the black smoker are worth opening. |
| 20 | LIPID_DROPLET↔ 4 | A store, and a denser store. Holds energy above the ceiling a cell's membrane otherwise sets, so a lineage can carry a surplus through a night or a famine instead of spending it or losing it. |
| 21 | RESERVED_21 | No variant on the pump — which, given that the pump itself is unimplemented, is a reservation on a debt. |
| 22 | FLAGELLUM↔ 6 | A cilium stirs; a flagellum propels. The honest difference is where the thrust goes — more into the body and less into the water. A ciliate anchored on a holdfast pumps its own square and filter-feeds on it; a flagellate goes somewhere. |
| 23 | PH_SENSOR↔ 7 | Taste a chemical, or taste the water itself. It reads pH — the ratio of carbonate to dissolved carbon dioxide — and its two gradients, on the same reading indices its sibling uses, so a genome that knows how to follow a chemical already knows how to follow acidity. Without it the carbonate swing would select on lineages that cannot act on it, which is a pressure with no strategy behind it. |
| 24 | RESERVED_24 | No second way to see light, yet. |
| 25 | RESERVED_25 | No second way to feel contact, yet. |
| 26 | RESERVED_26 | No second kind of junction socket, yet. |
| 27 | RESERVED_27 | No second way to digest, yet. |
| 28 | EXOENZYME↔ 12 | Stab it, or dissolve it. It digests a neighbour from the outside, into the square rather than into the digester — a leaky public good, and the answer to prey too large to swallow. |
| 29 | RESERVED_29 | No second kind of clock, yet. |
| 30 | RESERVED_30 | No second way to grip, yet. |
| 31 | CALCITE_SHELL↔ 15 | A test of glass, or a test of limestone: the same armour made of the other mineral and on opposite terms. Silica is dear, slow and indifferent to acidity; calcite is cheap, quick, and dissolves in acid — so a calcite-shelled cell in a crowded respiring mat is paying for its neighbours' breath, and the same cell in bright open water is armoured for almost nothing. Neither dominates, which is the test of whether a sibling was worth a slot at all. |
A genome lives physically inside the nucleus organelles, which have a capacity and an upkeep cost — so a genome that grows without paying for itself is selected against by the energy budget rather than by a rule about genome length.
Differentiation happens because gene expression can be gated on internal chemical state, and internal chemical state varies across a cluster because neighbours pump chemicals into each other. That is a morphogen gradient, and it gives evolutionary development for free — as long as nobody shortcuts it with a type field.
Chemistry, matter and light
The substrate is a grid. Every square holds nineteen chemical quantities, a light value, a velocity, and a flag for whether you have drawn a barrier there. Chemicals diffuse and are carried by currents; both are computed as fluxes, so the amount subtracted from one square is exactly the amount added to its neighbour.
The nineteen are a table a scenario can rewrite, but the shipped one divides into five jobs:
- Signals signal_a to signal_d
- Carry no energy and build nothing. They exist to be emitted and sensed, which is what makes a morphogen gradient across a cluster possible.
- Monomers carbon, nitrogen, phosphorus, silicon
- What a body is physically made of. Structural, finite, and returned to the water when a cell dies. Nothing in the engine produces any of the three minerals — seeding is the only way in — so what a world has is what it was given, and every recipe in the catalogue is costed against them on the Redfield ratio.
- Fuel sugar, lipid, sulphide
- Oxidised for energy, at different yields — lipid is worth half again what sugar is, sulphide rather less. Which one an organelle burns is a choice its genome makes, on one control word.
- Products and remains carbon dioxide, oxygen, peroxide, detritus, carrion
- What the metabolism leaves behind. Peroxide damages a membrane above a threshold and decays back into food; detritus travels with the current at a third of its speed; carrion stays where it fell. Both of the solids decay now, which they did not — detritus never broke down at all, and a corpse rotted straight into breath.
- The two cycles that are not carbon dinitrogen, calcium, carbonate
- Inert dinitrogen is the atmosphere, and it is on the slide rather than off it — a reservoir behind a tap would make this a flow reactor, and only energy is allowed across the wall. Calcium and carbonate are the third cycle, and the pH that nothing stores is derived from the ratio of carbonate to dissolved carbon dioxide.
A mitochondrion burns substrate for energy and leaves waste; a chloroplast uses light to turn waste back into substrate. Light is the only thing entering the system and heat is the only thing leaving it, which is the whole reason the simulator exists.
Acidity is the one quantity in the water that is not stored anywhere. pH is derived, every time it is read, from the ratio of carbonate to dissolved carbon dioxide — because pH is not matter, and a plane holding it would be a hole in the one invariant this project will not trade. The buffering is not implemented either. It falls out of pH being a ratio.
What that buys is a feedback nobody wrote. Calcite precipitates and dissolves on a product and a pH, so a lit mat lays down reef and a respiring crowd takes it back up — and the carbonate returning to the water raises the buffer and resists the next acid. A cell can be armoured in it, cheaply, and pay for its neighbours’ breath in a crowd.
A barrier holding mineral is rock. It dissolves into water that is short of that mineral — faster beside cells stripping it, which is biological weathering for no extra mechanism — and opens once it is worn past a threshold. A barrier holding none is bedrock, and is permanent. Nothing declares which a square is; the difference is only what it holds.
The shape of the light is the main thing a scenario chooses: uniform, a day-night cycle, a directional gradient, a hydrothermal vent with no daylight at all, a slow decline over millions of ticks, or seasons — a day cycle whose noon itself rises and falls over a much longer year, so that the strategy which pays in summer is not the one that pays in winter and nothing can settle.
Replication and mutation
Division is not a built-in operation on cells. It is something a genome does: allocate a daughter buffer, copy your own bytes into it one at a time, and split. Ten instructions is enough.
GENE #replicate
GLEN
SETLN ; LN = own genome length
GLEN
BUD ; allocate the daughter buffer, and PB = 0
DROP ; a failed BUD wastes a tick, not a cell
ZERO
SETPA
ZERO
SETPB
loop: ; the label is four template letters, emitted here
COPYB ; daughter[PB] = genome[PA]; PA++, PB++, LN--
LOOPLN loop ; base-pairs back to the letters above while LN != 0
SPLIT
COPYB plus LOOPLN makes the inner copy loop two instructions long. Four complete genomes are read line by line here.Because copying is explicit, copy errors have somewhere to come from. Each byte copied has a chance of going wrong that depends on the nucleus’s copy-fidelity setting and the energy spent on that byte — and high fidelity costs more energy. The mutation rate is therefore genetically encoded and physically expensive, which means mutator lineages can evolve, and the observed fidelity of a lineage is a trait you can plot.
On top of that, structural mutations happen at division:
Point
Substitute one byte.
Usually silent: four byte values map to each opcode, so most point mutations are synonymous.
Insertion
Insert a random byte.
Inside a template, this is a small numeric change to a literal rather than a broken instruction.
Deletion
Remove a byte.
Duplication
Copy a segment, biased toward gene-block boundaries.
The engine of novelty: a spare copy is free to drift while the original keeps doing its job.
Inversion
Reverse a segment.
Translocation
Move a segment.
Duplication is not optional. Duplication-and-divergence is the principal engine of novelty in biology, and it works here for the reason set out on the language page. Horizontal transfer is the second such engine, and it needs no special support either: a cell that forms a soft junction and writes bytes into its neighbour’s nucleus has done it.
Junctions, colonies and parasites
Cells can join each other two ways. A soft junction is a channel: it moves chemicals, energy and genome bytes, and has no positional constraint. A hard junction is structural: it holds a distance, and that is multicellularity.
Whether a join is cheap comes down to a seven-bit receptor key. Match the target’s key and the junction is nearly free; miss it and you pay a penalty scaled by how much the target has invested in its membrane. The junction still forms if you can afford it — consent here is economic, not absolute.
Clones cooperate by default
Your offspring inherit your key, so a colony of clones assembles for almost nothing. The bootstrap problem for multicellularity — needing two genomes to cooperate before either has a reason to — simply dissolves. Kin recognition falls out of the same mechanism, with no relatedness calculation anywhere.
And so does the Red Queen
A parasite must either brute-force 128 keys, each attempt costing energy, or specialise on a common one. A host can escape a specialist by mutating its key — but that also disconnects it from its own colony and its own offspring. Both sides pay, which is what makes it a real arms race.
Hard junctions are solved as distance constraints and never couple to the fluid — no torque, no lever arms, no backpressure. That was decided deliberately for performance, and it still buys the thing that matters: cilia on one cell push that cell, the constraints drag the rest, and colony locomotion is emergent with no rigid-body solver anywhere. Modulating a junction’s rest length gives contraction, peristalsis and shape change, which is muscle.
Species, names and the record
Real biologists infer phylogeny from the sequences of things that are still alive, because they have no record of who descended from whom. Here there is a perfect record: every cell stores its parent and its birth tick. The tree needs no inference at all.
Genetic distance is needed only for naming — deciding when a lineage has drifted far enough to be called something else. Each genome carries a 64-bit fingerprint, and a newborn whose fingerprint has drifted past a threshold from its species founder founds a new species parented to the old one. Above a deeper threshold, species group into genera, and genera into families.
Names are generated from Latinate syllable tables seeded by lineage, with the specific epithet biased by whatever the lineage is actually doing — rapidus for heavy cilium investment, vorax for predation, lucens for chloroplast dominance. Every species gets a page, and the page survives its extinction.
Running alongside it is a log of first occurrences: the first time anything replicates without help, the first chemotaxis, the first predation, the first successful write into another cell’s genome, the first cluster of four, of sixteen, of sixty-four, the first differentiated cluster, the first signal relayed down a chain of three. This is the newspaper, and it is the single largest reason a run feels like a history rather than a screensaver.

Why any of it is reproducible
A run is a pure function of its scenario and its seed. Two runs produce bit-identical state at every tick, on any platform, at any thread count. That is not a nice-to-have — half the value of an evolution simulator is being able to show someone the thing you saw.
It requires giving some things up. There is no random number stream: every random value is derived by hashing the seed, the tick, the cell’s identity and what the number is for, so no cell’s luck depends on when it was scheduled relative to any other. No simulation outcome may depend on hash-map iteration order. There is no floating point in the simulation core at all, because the same expression does not have to give the same answer on two machines. There is no wall clock.
Rendering cannot touch it either. The world runs on its own thread and hands the renderer a frame; the state hash after a hundred thousand ticks is identical whether it ran under the microscope at 60fps, at 5fps, or headless with no window at all. That is a test rather than an intention.
And if you change a parameter halfway through a run, that change is recorded with its tick and replayed on load, so the run still reproduces exactly. Your interference becomes part of the record and shows up on the timeline next to whatever happened after it.
Why this is worth the constraint
That is the engine. What you do with it — nineteen worlds and the language cells are written in — is the rest of this site.