Evolution, bit for bit.
A real-time artificial-life laboratory in memory-safe Rust. Every organism carries its own heritable neural network and chemistry, and they feed, signal, move, split and die through one shared energy field. Watch, pause, inspect, branch and replay them: the same world, to the last bit, every time.
- Tick
- 1,600
- Sim time
- +0.0 s
- Alive
- 150,103
- View
- whole
9,988
parameters per brain
The default network, 104 → 64 → 32 → 36. No two organisms share one.
104 → 36
senses to decisions
Field energy, 32 chemical channels and their gradients in; reproduction, emission and spending out.
Bit for bit
CPU = Metal
Controllers, field, sensing and uptake on the Mac's GPU reach the CPU reference's world exactly.
≈10/s
ticks, 100k organisms
The Desktop ecology world on 16 workers of an M5 Ultra. Measured, not a passed gate.
What you are watching.
flife render drew each frame from the committed world at its tick. The world is deterministic: the same commands reach the same digests, below, on any machine.- Preset
- presets/tissue-world.toml
- Seed
- 42
- Founders
- 10,954 on a 128 × 128 field
- Tick length
- 1/32 s of simulated time
- Evolved first
- 1,600 ticks (50 simulated seconds)
- Alive in the film
- 82,167 – 171,721
- Ticks
- 1,600 → 4,800, a frame every 8
- Frames
- 401 at 30 fps, 1080 × 1080
- Colour
- chemical affinity: a fixed projection of the 32 affinity terms; grey is none, like colours like chemistry, opposite directions opposite hues
- Field
- not drawn, raw look
- Camera
- 10 keys, chosen from the run
- First digest
- a93e9dd2714bc62f761900335b0ae581295f22aa631aa96da27c81ffbda37e02
- Last digest
- 556c4973f70509f32fbf485db8bca63cafb219ce85d4f2feaf36d0ec085758d1
This world's parameters were chosen by a search outside the simulation, against the reference screenshots that inspired the project. It measured 14 statistics of those images (how much of the frame is lit, the sizes of its holes and bodies, how far one colour extends), ran 233 small worlds, and scored each that lived by its distance from them. A person chose the closest by eye. The film shows that world itself, from the tick where the search stopped looking.
Nothing the search measured feeds back into a run. The organisms have no aesthetic fitness: they feed, emit, split and die by energy alone. The seed is the Desktop preset's 42, not a pick. Seeds the search never saw grow the same colonies, though they merge into one tissue less than this one does.
What makes the structure is emission, chosen by the neural networks. Organisms return about half of what they eat to the field, in a chemical composition their networks choose, and kin choose alike, so each lineage paints its surroundings with its own chemistry and grows into a single-colour colony; at this density the colonies merge into tissue. With every controller's decisions zeroed, nothing is emitted and the world fills with a featureless haze. With every newborn's genome drawn fresh instead of inherited, the population dies out.
The camera is chosen from the run, not by hand. The same ticks are first rendered small; each shot then eases into the region where the organisms changed most during it, and the film opens and closes on the whole torus. The camera changes no result: the preview and the film end on the same digest.
# flife is `cargo run --release -p flife-cli --` in the repository
flife run presets/tissue-world.toml --ticks 1600 --run-dir RUN
flife render --run-dir RUN --ticks 3200 --every 8 --width 1080 --height 1080 --no-field --look raw --color affinity --camera CAMERA --out frames
# CAMERA: lib/media.json's render.camera keys, as {"keys": [...]}Rendered at revision 179a57cc4e45 with controllers on cpu (frankentorch population_affine_f32_into, 16 lanes); no result depends on the route. The first frame shows 150,103 organisms and the last 111,721; the render's end record names the last digest above. The PNG frames are flife's; this page's video encodes them with flife's own BT.709 colour chain at CRF 24 for the web, and its SHA-256 is d1282efc863c8a8ab975c1aab5dd103410c4d32c000eed2acc8b16d1509e803b.
Every organism, its own brain.
Every organism has its own weights.
Organisms with the same topology share a kernel and a memory layout, never a parameter.
Organisms meet only through the field.
No pairwise attraction tables, collision forces or global reward functions in the baseline.
Signals cannot counterfeit food.
A cell holds spendable energy e and a 32-component chemical signature m with ‖m‖ ≤ e. Opposite signals can cancel each other's chemistry without creating or destroying energy.
Nothing is trained by gradient.
Weights start random and change only through inherited mutation.
The ledger always balances.
Energy in the organisms plus energy in the field changes only by injection, removal, dissipation and a declared numerical residual, every tick.
How the world works.
A two-dimensional periodic torus. Organisms have continuous positions; the field is a regular grid.
Each cell holds energy and a 32-component signed chemical moment. One positive five-point stencil diffuses both, conserving energy before declared decay.
Seeded Gaussian patches drift across the torus on smooth paths, each injecting a fixed power with a fixed chemical direction per simulated second.
Energy, 32 composition values and their gradients at a heritable sensing scale, plus the organism's own energy, age, velocity and recent energy change: 104 inputs.
Dense tanh networks with a linear output layer. Offspring can move between catalog topologies of 1,164 to 29,316 parameters.
36 outputs: a reproduction hazard, a child's energy share, an emission gate, a 32-dimensional emission direction and a spending rate. No motor output.
A two-pass demand and grant step. A contended cell grants in whole quanta, so no cell is overdrawn and thread order never decides who eats.
A heritable affinity decides whether each granted packet feeds or poisons. Toxicity is clipped to the energy the organism actually holds.
Heritable responses to gradients give an acceleration; drag is integrated exactly, and movement costs energy in proportion to speed squared.
An organism can pay energy to deposit chemistry at an efficiency of at most one. Deposits are first sensed on the next tick, so no loop can amplify energy.
A split makes a mutated child. Identity, genome, slot and energy transfer commit together, or nothing happens.
Zero energy after any stage is death, checked after every stage. Part of the residue returns to the field.
𝓔ₙ₊₁ − 𝓔ₙ = injection − removal − dissipation + numerical residual
𝓔 is the energy in every organism plus the energy in every cell. Emission, absorption and a child's endowment only move it. No correction may add energy to make the equation balance.
One tick.
- 01Admit commands at their recorded tick boundary
- 02Transport the field and inject sources into one immutable observation field
- 03Build the sensing pyramid and spatial bins
- 04Sense and evaluate due controllers, all from the same epoch
- 05Resolve uptake demand into cell grants
- 06Settle useful gain, toxicity and maintenance
- 07Propose affordable motion, then emission, then reproduction
- 08Resolve capacity, construct births and collect deaths, in stable identity order
- 09Reduce deposits and recycling into the next field
- 10Validate the invariants and publish state, events and accounting together
Kept apart.
The simulation obeys its own rules
Invariants INV-01–INV-15 and the energy ledger; the field, ledger and population checks run on every tick before it is published
The code reproduces those rules
Hand-computed fixtures, a separate scalar oracle, and CPU/Metal parity bit for bit
The images have the intended character
Human review against the references, raw diagnostic views beside the aesthetic ones (G5)
Populations show measurable evolutionary phenomena
Ablations, seed ensembles and held-out seeds, failed and extinct runs kept (G9)
Honest status.
- G0 Built and tested
The stack composes
One lockset; every probe matches its oracle on macOS arm64 and Linux x86-64.
- G1 Built and tested
Hand fixtures and arithmetic
Fixtures pinned bit for bit; world digests identical on both hosts.
- G2 Built and tested
A first world lives, renders and pauses
The 4,096-organism preset breeds, mutates and dies, live in a native Metal window.
- G3 Built and tested
Checkpoint replay and crash recovery
A run killed at any step of a checkpoint or command resumes to the uninterrupted world.
- G4 Built and tested
CPU and Metal parity
Controllers, field, sensing and uptake on Metal, each bit for bit the CPU reference's.
- G5 Not yet
Visual review
Needs a human review against the references. Not yet run.
- G6 Partial
30 fps with p95 input latency ≤ 100 ms
Offscreen only: 30.00 fps at 1080p (p95 51.6 ms) and 29.79 at 4K (p95 59.9 ms). Not yet measured in a window.
- G7 Not yet
400,000 organisms at 30 ticks/s
Not reached. The 100,000-organism Desktop world runs at about 10 ticks/s on an M5 Ultra.
- G8 Not yet
Eight-hour endurance
Not run.
- G9 Partial
Research claims
Five declared hypotheses tested with held-out seeds (below); the release's claims are not yet made.
- G10 Not yet
Export alignment
Not run.
What the experiments found.
H1Persistent heterogeneous colonies
Met · a low barEvery run that reached tick 8,192 kept clustered, spatially autocorrelated colonies: 32 of 32 and 16 of 16.
H2Controllers add behaviour beyond chemistry
Not supportedThe chemistry-only ablation also stops emission, and removing emission alone has the same effects. The decisions' own effect is inconsistent.
H3Paid emission supports niche construction
Met narrowlyEmission evens the field (Gini lower on 6 of 8 seeds, held out 7 of 8) but leaves colonies' clustering unchanged: environment modification, not demonstrated niche construction.
H4Visual structures are functional
Rule met · not establishedThe declared rule was met on one measure, but post hoc that effect is mostly an emptied disk refilling. A functional boundary is not established.
H5Architecture variation affects ecology
Not supportedFinal population and births reverse sign between the discovery and held-out seeds.
Built on the Franken stack.
Run it yourself.
# What this machine and build can run, by running it
cargo run --release -p flife-cli -- capabilities# 1,024 ticks of the 4,096-organism reference world, headless
cargo run --release -p flife-cli -- run presets/reference-small-world.toml --ticks 1024 --every 128 --metrics-every 128# The same world as PNG frames and an MP4
cargo run --release -p flife-cli -- render presets/reference-small-world.toml --ticks 2560 --every 4 --width 1080 --height 1080 --out frames --video world.mp4# Live in the native Studio (macOS)
cargo run --release -p flife-studio -- presets/reference-small-world.toml --width 960 --height 540# A kept run, then a step past its newest durable tick
cargo run --release -p flife-cli -- run presets/reference-small-world.toml --ticks 512 --run-dir my-run && cargo run --release -p flife-cli -- step my-run --ticks 64