Skip to the simulation
EvolvariumSource

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
tick 0pop 0/140gen 0
herbivorecarnivoreplantpoisonsuperfood

Controls

Census

0herbivores
0carnivores
Population0 / 140
Generation0
Avg fitness0
Avg age0
Births / deaths0 / 0
Arrivals0

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.

01

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

02

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
03

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.

  1. parent
  2. mate
  3. crossover
  4. mutate
04

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.

prey peakpredator peakcrash

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.

  1. 153 seen3 × 7×7 + 6
  2. 26 feats+ last action
  3. instinct (fixed)chase · flee · bite
  4. evolved net26 → 20 → 8 · tanh
  5. softmax → act4 moves + 4 bites

instinct + evolved net are summed, then sampled — not argmax

A

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.

B

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.

C

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

Bash

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

Bash

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

Bash

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

HTML

The Python server’s HTTP API

Routes served by web/server.py
RouteWhat it does
/the viewer
/streamServer-Sent Events — a snapshot pushed on every tick
/statethe same snapshot as a one-off JSON request, gzipped
/controlplay · pause · toggle · step · reset · fps · mutation · food · brain
/brainsthe current champion genomes, as JSON
/healthzliveness probe