🦊 Cellular Automata Lab
A little side project exploring one question: can simple local rules compute? Neural automata that grow from a single seed and heal themselves, a CA computer that evolves its own logic, Conway’s Life in 2D and 3D, Wireworld digital circuits, Langton’s ant — and the classic Maze and Pipes screensavers reborn as automata. Everything below runs entirely in your browser; the neural models were trained from scratch on a CPU.
A tiny neural network is the update rule for every pixel. Starting from a single seed cell, it grows a target image, then keeps it stable. Paint damage onto the canvas and the pattern heals itself — no global controller, just local rules learned by gradient descent.
JavaScript / WebGL · trained in PyTorch
The same idea lifted into a 16³ voxel cube. One seed voxel grows into a colored 3D shape. Use Wound mode and Cut half to carve it apart and watch the organism regenerate the missing tissue in real time.
JavaScript / Three.js · trained in PyTorch
Don't hand-wire logic — search for it. A genetic algorithm breeds 1-D rules to solve the density-classification task: decide the global majority using only local updates. Watch fitness climb toward the famous GKL rule and see the champion classify in real time.
JavaScript · genetic algorithm
Conway's Game of Life and the whole life-like family. Program any Birth/Survive rule by clicking neighbour-counts, or pick HighLife, Day & Night, Seeds, Replicator. Paint by hand or stamp gliders, pulsars, and a Gosper gun.
JavaScript / Canvas
Multi-state automata where cells age through colors before they die: Brian's Brain, Star Wars, Frogs, Lava, Fireworks — or program your own Survive/Born/Color rule with a state slider.
JavaScript / Canvas
Life on the 26-neighbour Moore rule in 3D, rendered with Three.js. Program the Survive/Born counts directly, add Generations color states, switch to sphere or torus surfaces, and sculpt on a slice.
JavaScript / Three.js
The Windows screensaver as a CA lab. The Maze rule carves corridors out of noise; a right-hand-rule walker auto-roams them first-person — brick walls, stucco floor, 🙂 bonuses, and respawns — drawn by a software raycaster. Or take the wheel.
JavaScript · software raycaster
The other classic screensaver. Each pipe is a self-avoiding random walk on a 3-D lattice, growing with rounded elbows and dying when it boxes itself in — then a new color sprouts. Three.js, orbit and zoom, fills then resets just like the original.
JavaScript / Three.js
Sudoku solved as waves of constraint propagation. Each cell is a candidate set; naked and hidden singles ripple across rows, columns and boxes in nine colors until the grid locks in. Easy to evil puzzles, or paste your own.
JavaScript / Canvas
Program a 1-D automaton directly: set any of the 256 elementary rules by number or by flipping its 8-bit table, then watch the space-time diagram. Includes Rule 30 (chaos), Rule 90 (Sierpinski), and Turing-complete Rule 110.
JavaScript / Canvas
A two-state read/write head that builds a periodic highway out of chaos after ~10,000 steps — computation from a trivial rule. Type your own turn-string for multi-color turmites, drop several ants, and fast-forward 10k steps at a click.
JavaScript / Canvas
Stochastic automata driven by a seedable RNG you program: stochastic Life, forest-fire criticality, the contact-process percolation transition, the Domany–Kinzel model, and a noisy voter. Same seed + probabilities reproduces the run exactly.
JavaScript / Canvas
A four-state automaton that does real digital logic. Electrons race down copper wires through diodes, clocks, fan-outs, OR and XOR gates, and 1-bit memory loops — every prebuilt circuit verified by simulation. Proof that simple local rules can compute.
JavaScript / Canvas
How it works
Inspired by Mordvintsev et al., “Growing Neural Cellular Automata” (Distill, 2020). Each cell holds a small state vector; a shared neural network reads a cell’s neighborhood and outputs an incremental update. Trained to reproduce a target from a seed, the network is also shown damaged states during training, so regeneration emerges for free. The result is a fully local, self-organizing system — closer to biology than to a conventional program.
Best viewed on desktop. The 3D demo needs WebGL.