Self-Healing Pixels

Every pixel runs the same tiny neural network and sees only its 8 neighbours. Nothing coordinates them, yet together they grow a whole picture from one seed and rebuild it when it's destroyed. Drag across the image to cut it.

Loading…

0 steps · – fps

How does this work?

  1. Each cell holds 16 numbers. Four are its visible colour (RGBA); twelve are hidden, a private memory the network learned to use for signalling.
  2. Each step, a cell looks at its 3×3 neighbourhood through three fixed filters: its own value and the horizontal and vertical gradients.
  3. A tiny network (≈8,000 parameters) decides how to change the cell's state. Every cell uses the same weights, and cells fire at random, so there is no global clock.
  4. Cells are alive only next to a mature cell (alpha > 0.1). Everything else stays empty.

Training starts from a single live pixel, runs 64–96 steps, and compares the result to the target emoji. The trick that makes it heal: training keeps a pool of its own past outputs, continues from them, and punches random holes in some. So the network learns not just to grow the image but to keep it and repair it. It never saw a straight cut or the rotations you can try here.

Based on Growing Neural Cellular Automata (Mordvintsev, Randazzo, Niklasson & Levin, Distill 2020). Trained from scratch on an M3 MacBook in PyTorch; runs in your browser with TensorFlow.js. Emoji from Noto Emoji (Apache 2.0). Source on GitHub.