A neural cellular automaton (neural CA) replaces the hand-written lookup table of a classical cellular automaton with a small neural network shared by every cell. Each cell repeatedly reads the states of its immediate neighbours, runs them through the same little network, and writes back a new state. From this purely local rule, global structure can grow, persist, and even repair itself. This companion sets out what the playground actually computes, where it sits relative to the published literature, and which of its claims are solid versus suggestive.
A cellular automaton is a grid of cells, a finite set of states, a neighbourhood, and an update rule that maps a cell's neighbourhood to its next state. Conway's Game of Life and Wolfram's elementary rules are the canonical examples: the rule is a fixed table, and all the richness comes from iterating it. The surprising lesson of that tradition, set out at length in Wolfram's A New Kind of Science (2002), is that extremely simple local rules can generate unbounded apparent complexity.
A neural cellular automaton keeps the grid, the neighbourhood, and the iteration, but makes the rule a function with parameters. Instead of a table, each cell applies a small network:
Because the rule now has weights, it can in principle be learned rather than designed. Two broad strategies appear in the literature, and they matter for reading this playground honestly.
Trained, goal-directed CA. The most influential modern example is Mordvintsev, Randazzo, Niklasson, and Levin's Growing Neural Cellular Automata (Distill, 2020). There, each cell holds a continuous state vector; perception is a fixed Sobel-and-identity convolution over the neighbourhood; and a small two-layer network maps the perceived vector to a residual update. Crucially, the whole rule is trained end-to-end by backpropagation through many update steps so that the grid grows a specific target image from a single seed. A stochastic update mask (only some cells fire each step) and an alive-masking step (cells stay dead until a neighbour's alpha channel is high enough) make growth asynchronous and bounded. A striking result of that work is robust regeneration: a CA trained only to grow a shape will also regrow it after damage, without ever being shown damage during training.
Self-organising, local-learning CA. A different lineage keeps the rule local and lets it change by a local plasticity rule, with no global target and no backpropagation. The classic local rule is Hebbian: connections between co-active units strengthen ("cells that fire together wire together," after Hebb's 1949 Organization of Behavior). Here there is no objective function to descend; order, if it appears, is an emergent property of the local rule, not a fitted outcome.
This playground sits in the second lineage. Its cells learn by a local Hebbian update with weight clipping, optionally perturbed by random mutation. It is therefore a model of self-organisation, not a model of training a CA to draw a picture. That distinction is the single most important thing to keep straight when interpreting it.
The per-cell update in the playground is deliberately transparent:
l and neuron n, the pre-activation is bias[n] + sum_i activation[i] * weight[l][n][i], and the activation is one of sigmoid, tanh, ReLU, or leaky ReLU.rate * output * input and clipped to a bounded range, so correlated activity strengthens connections. An optional mutation mask randomly perturbs weights and biases.The only stochastic ingredients are the random initial weights and the random mutation mask. Everything between a fixed neighbourhood and a fixed weight set is deterministic, which is why the calibration suite can pin the forward pass to hand-computed values.
Because the update arithmetic is deterministic, it can be checked exactly. The calibration panel does not try to validate the emergent global behaviour (which is genuinely stochastic and run-dependent). Instead it pins the building blocks:
Each predicted value is produced by the same activate, forwardPass, stateFromOutput, and complexityDensity functions the live grid uses, so the suite is a genuine test of the running code, not a restatement of constants. All five reproduce at zero error.
Running the grid, several qualitative regimes appear depending on the activation function, depth, and learning rate:
These are observations about a single stochastic run, not statistical claims. Re-seeding changes the details.
This is a sandbox, and it is honest about its scope:
The deeper motivation, shared with the Growing-NCA work and with Turing's 1952 account of morphogenesis, is that biological form is built by cells following local rules with access only to their neighbourhood, yet the result is robust, reproducible global structure that can repair damage. Neural CA make that idea concrete and manipulable: a single learned local rule, iterated, can grow and maintain a pattern. The playground lets you feel the mechanism. It does not claim to be a tissue.