Open-ended artificial life · running live in this tab
- wrap-around grid
- 34 × 34wrap-around grid
- weights per brain
- 708weights per brain
- values seen per tick
- 153values seen per tick
- training steps
- 0training steps
Controls
Census
Populationslast 240 ticks
Diet spectrum
plantsmeat
Inspector
Click any creature in the world to inspect it, or press Inspect to pick one at random.
Best life so far
No creature has completed a full life cycle yet. When one does, its story is recorded here.
The simulation is actively evolving.
What you are watching
The world has no goals, no score and no training loop. It has a food chain, a cost of living and inheritance. Every pattern on the canvas above falls out of those.
Two ways to make a living
Nutrition depends on diet. A plant is worth 50 health to a pure grazer but almost nothing to a specialist predator; a kill is worth 170 to the predator and almost nothing to the grazer. A diet stuck halfway is the worst of both — so the population splits, and colour tells you which side a lineage picked.
pure grazer · 50pure predator · 170
Reproduction is earned
Breeding needs health above half and costs 50 of it, and a creature burns 10 health every tick just existing. Only creatures that actually feed themselves leave offspring. That single constraint is the entire selection pressure — there is no fitness function anywhere in the loop.
- Metabolism
- −10
- Plant eaten
- +50
- Kill made
- +170
- Poison
- −40
- Giving birth
- −50
Real inheritance
Offspring take their actual parent's network weights, usually recombined with a nearby mate by uniform crossover, then mutated. Diet, aggression, vision and even the mutation rate itself are heritable — so lineages evolve how fast they evolve. Weights decay slightly toward zero and are clipped, which keeps an old lineage competent instead of letting drift swamp it.
- parent
- →mate
- →crossover
- →mutate
A world with a carrying capacity
Plants regrow toward a fixed density, so grazing genuinely depletes a patch and creatures have to keep moving. Predators boom, crash the prey, then crash themselves — the population chart draws that cycle on its own. If a whole way of life is lost to bad luck, founders eventually arrive from elsewhere, and the census counts them.
Inside a creature
Each creature sees three 7×7 wrap-around views around itself — plants, health, kinship — plus six scalars. That is compressed into 26 features and fed to a hand-written survival drive. The evolved network never replaces that drive; it adds a bounded correction on top, which is exactly what the Neural net ↔ Instinct button lets you switch off.
- 153 seen3 × 7×7 + 6
- 26 feats+ last action
- instinct (fixed)chase · flee · bite
- evolved net26 → 20 → 8 · tanh
- softmax → act4 moves + 4 bites
instinct + evolved net are summed, then sampled — not argmax
Why a residual
A network starting from noise would spend thousands of generations rediscovering "walk toward food". Bolting a bounded correction onto a working instinct means every mutation is spent on the part that is actually still open.
Why sampling
Actions are drawn from a softmax rather than taken greedily. Identical twins in identical situations still diverge, so a lineage explores instead of locking into one deterministic groove.
Memory, such as it is
The only thing a creature remembers is its own previous action, fed back as a one-hot input. It is a single tick of short-term memory — enough to keep a direction, not enough to plan.
Run it · embed it · host it
The page you are on is the React build: the whole simulation is JavaScript running in your tab, so every visitor gets their own world. The plain static folder still works with no build step at all, and the original Python server is there when you want one shared, persistent world instead.
ANext.js — this build
The app in web-react/ imports the same sim.js engine the static page runs, so the world you see above is the real thing, not a recording.
BStatic — one world per visitor
Needs a server only because the page loads ES modules; there is no backend and no build step. Champion genomes ship in seed_brains.json, so the world opens already competent instead of starting from noise.
CPython — one shared world
Everyone watches the same simulation and the best genomes it has ever produced are saved back to disk, so a restart picks up where it left off. Set EVO_READONLY=1 for a public embed where visitors watch but cannot reset the world for everyone else.
Embed it in a page
The Python server’s HTTP API
| Route | What it does |
|---|---|
| / | the viewer |
| /stream | Server-Sent Events — a snapshot pushed on every tick |
| /state | the same snapshot as a one-off JSON request, gzipped |
| /control | play · pause · toggle · step · reset · fps · mutation · food · brain |
| /brains | the current champion genomes, as JSON |
| /healthz | liveness probe |