What happens when you give 150 blobs a neural network and walk away

Amoeba Intelligence · Write-up · Apr 2026

Live demo ↗Medium ↗

150 single-celled organisms, each run by a tiny neural network nobody programmed. They start empty and learn to hunt, dodge poison and follow each other’s trails, live in your browser.

Built in
A week
Method
NEAT neuroevolution
Stack
Vanilla JS, FastAPI
Agents
150 per generation

The smallest version

Researchers rebuilt a fruit fly’s brain, about 140,000 neurons, in software, and it behaved like a fly. I wanted to build something in that neighbourhood, but 140,000 neurons is not a weekend. So I went to the floor: single-celled organisms. No nervous system, yet slime molds solve mazes and amoebas follow chemical gradients.

The fruit fly connectome
The fruit fly connectome. The project starts from the other end.

Show evolution, don’t explain it

Nobody has a mental model for “fitness over generations”. But a blob spinning into poison at generation 3, next to blobs patrolling food at generation 200, needs no explaining. So every metric sits beside the live canvas, and the brain visualiser grows new nodes as you watch.

Brains that grow

Most neural networks have a fixed shape and only the weights change. NEAT evolves the structure itself. Each amoeba starts with 30 sensors, 4 outputs and no hidden neurons, and the brains get more complex generation by generation.

Taking luck out of it

Early on, fitness was about 70% luck: a genius brain spawned next to poison died, a dull one spawned on food won. So I pinned everything down: a fixed spawn grid, a fixed world seed, randomness seeded per brain, and scoring the parent only. Identical brains now get identical scores, and evolution became visible.

The fitness function went the same way. Every clever term I added brought more noise than signal, so it is down to four:

fitness = food_eaten * 10.0
        + survival_ticks * 0.05
        - toxin_damage * 1.0
        + children_spawned * 5.0

What I learned

  • Randomness isn’t neutral. Every source of it hid the signal I was trying to measure.
  • “Best of generation” lies. It is whoever got lucky. The median is the real signal, so the graph shows max, median and average together.
  • Small is the pressure. A 200×200 world forces 150 agents to meet. Every time I made it bigger, evolution slowed down.

Numbers

~600
generations on the live run
~80%
median fitness gain in 30 generations
<50KB
of JavaScript, no framework