---
title: Petri Dish Neural Cellular Automata
url: https://www.emergentmind.com/topics/petri-dish-neural-cellular-automata-pd-nca
type: topic
---

# Petri Dish Neural Cellular Automata

Petri Dish Neural Cellular Automata (PD-NCA) denotes a differentiable, competitive, multi-agent cellular substrate in which multiple learned local rules interact on a shared 2D medium. In the formulation studied most directly, each “world” is a spatial field whose cell state is partitioned into attack, defense, and hidden components, while several NCA agents compete for occupancy under soft local interaction and persistent environmental disturbance. Within the broader NCA lineage, this places PD-NCA inside the family of weight-tied, locally interacting recurrent systems whose global behavior emerges from repeated application of a shared local operator, but with a decisive shift from single-pattern morphogenesis toward coexistence, territorial conflict, and open-ended ecological dynamics [2604.11248] [2501.03573].

## 1. Conceptual lineage and defining characteristics

Standard Neural Cellular Automata are commonly described as cellular automata in which each cell carries an embedding-style latent state and the transition rule is parameterized by a neural network trained end-to-end by backpropagation. The key architectural traits are local update rules, parameter sharing across space, neighborhood interaction, convolution-like structure, and iterative rollout through time [2501.03573]. In related work on spatio-temporal pattern learning, NCA are also treated as learnable local-rule models of spatial media, including reaction-diffusion systems and biological pattern formation, with hidden channels acting as latent internal variables [2310.14809].

PD-NCA retains the local, recurrent, shared-rule logic of NCA, but it is not merely a single-rule morphogenetic model. In the PD-NCA substrate extended by PBT-NCA, multiple learned species coexist in the same world, compete for territory, and interact through explicitly structured attack and defense channels rather than through a single globally shared update rule alone. Relative to prior PD-NCA work, the contribution of PBT-NCA is explicitly algorithmic and objective-based: it extends the PD-NCA substrate of Zhang, Risi, and Darlow (2025) with population-based training over worlds and a composite score based on historical novelty and contemporary diversity [2604.11248].

This distinction is central. A conventional NCA is often trained against a fixed morphology, regeneration objective, or trajectory. PD-NCA instead treats the substrate as an ecology: local rules do not merely build one target, but continuously negotiate coexistence, exclusion, and survival in a shared medium.

## 2. World state, local competition, and cellular dynamics

A PD-NCA world is a shared 2D substrate with state tensor
$$
X^t \in \mathbb{R}^{H \times W \times C},
$$
where each location stores
$$
x_{u,v}^t = [\mathbf{a}_{u,v}^t; \mathbf{d}_{u,v}^t; \mathbf{h}_{u,v}^t].
$$
Here $\mathbf{a}_{u,v}^t \in \mathbb{R}^{C_a}$ are attack channels, $\mathbf{d}_{u,v}^t \in \mathbb{R}^{C_d}$ are defense channels, and $\mathbf{h}_{u,v}^t \in \mathbb{R}^{C_h}$ is hidden state. The world also maintains an aliveness mask
$$
A^t \in \mathbb{R}^{N \times H \times W},
$$
tracking which of the $N$ agents occupy which cells [2604.11248].

Each agent $k$ is a local neural update rule $f_{\theta_k}$. At every step, each living agent observes the local Moore neighborhood $\mathcal{N}_{u,v}(X^t)$ and proposes an update
$$
\Delta x_{u,v}^{t,k} = f_{\theta_k}\!\left(\mathcal{N}_{u,v}(X^t)\right).
$$
The world also contains a background environment, indexed by $k=0$, whose update is
$$
\Delta x_{u,v}^{t,0} = E_{u,v}, \qquad E_{u,v} \sim \mathcal{U}(-1,1),
$$
described as $L_2$-normalized uniform noise [2604.11248].

Competition is differentiable and local. For agents $k$ and $l$, pairwise interaction is defined by
$$
\phi_{kl}(u,v) = \langle \mathbf{a}_{u,v}^{t,k}, \mathbf{d}_{u,v}^{t,l} \rangle - \langle \mathbf{d}_{u,v}^{t,k}, \mathbf{a}_{u,v}^{t,l} \rangle .
$$
The total competitive strength of agent $k$ is
$$
\Psi_k(u,v) = \sum_{l \neq k} \phi_{kl}(u,v) + \phi_{k,\text{env}(u,v)},
$$
followed by soft normalization
$$
w_{u,v}^{t,k} = \operatorname{softmax}(\Psi_k(u,v)).
$$
The next cell state is then
$$
x_{u,v}^{t+1} = \operatorname{clip}\!\left( x_{u,v}^{t} + \sum_{k=0}^{N} w_{u,v}^{t,k}\,\Delta x_{u,v}^{t,k} \right),
$$
and occupancy evolves as
$$
A_{u,v}^{t+1,k} =
\begin{cases}
w_{u,v}^{t,k}, & \text{if } w_{u,v}^{t,k} > \alpha,\\
0, & \text{otherwise,}
\end{cases}
$$
with $\alpha = 0.4$ [2604.11248].

The threshold has a specific ecological effect: at most two agents can coexist in one cell, which keeps boundaries fluid instead of collapsing immediately into single-owner partitions. This differentiates PD-NCA both from winner-take-all occupancy rules and from standard NCA formulations oriented toward a single emergent organism.

## 3. Brittleness of single-world PD-NCA and the PBT-NCA outer loop

The motivating diagnosis behind PBT-NCA is that standard PD-NCA is highly expressive but extremely fragile. With fixed hyperparameters, single-world training often collapses into one of three regimes: frozen equilibrium, monoculture, or noisy disorder. The paper treats this as a central obstacle to open-ended discovery, because neither collapse to stasis nor collapse to noise yields sustained emergence of new forms [2604.11248].

PBT-NCA addresses this by evolving whole adaptive ecosystems rather than single parameter vectors. Each world $\Omega_i$ contains resident NCA weights, optimizer states, mutable world state, rollout counters, and learning hyperparameters such as learning rate, batch size, and steps per update. The outer loop is:

1. Initialize a population $\{\Omega_i\}_{i=1}^P$ and an empty archive $\mathcal{A}$.
2. For each meta-iteration:
   - train or roll out each world for $T_{\text{world}}$ inner steps,
   - compute its score $\mathcal{F}_i$,
   - add the top-$m$ descriptors to the archive.
3. Every $K$ meta-iterations, replace the bottom $\rho$ fraction of worlds with offspring from the top $\rho$ fraction using copy, crossover, mutation, and weight perturbation [2604.11248].

A replacement child is produced in four stages. First, the parent world is deep-copied, including weights, optimizer state, world state, and hyperparameters. Second, each hyperparameter is independently retained from the copied parent with probability $P_{\text{cross}}$. Third, each hyperparameter is perturbed with probability $P_{\text{pert}}$ by multiplying by either $1.2$ or $0.8$, clipping to its allowed range, and rounding if integer-valued. Fourth, independent Gaussian noise is added to all trainable network parameters [2604.11248].

| Setting | Value | Role |
|---|---:|---|
| Population size $P$ | 30 | Number of worlds |
| Meta-iterations $T$ | 500 | Outer-loop horizon |
| Inner rollout $T_{\text{world}}$ | 12 | Per-world rollout length |
| Exploit-explore period $K$ | 5 | Replacement interval |
| Replacement fraction $\rho$ | 0.25 | Bottom/top fraction used |
| Archive insertion $m$ | 2 | Descriptors added each round |
| Novelty neighbors $k$ | 8 | kNN novelty score |
| Default agents per world | 3 | Unless otherwise stated |

Within-world optimization uses Adam. Unless otherwise stated, each world contains 3 NCA agents, though 5-agent and 7-agent settings are also studied. The baseline compute budget matches random search by giving each world a total of $500 \times 12 = 6000$ rollout or training iterations [2604.11248].

## 4. Novelty, diversity, and edge-of-chaos evaluation

The PBT-NCA score is explicitly composite:
$$
\mathcal{F}_i = \mathcal{N}_i + \mathcal{D}_i.
$$
The first term, historical behavioral novelty, is based on a handcrafted trajectory descriptor. For each world, species-level alive-mass fractions over time are summarized by mean occupancy $\mu$, temporal standard deviation $\sigma$, mean frame-to-frame occupancy change $\delta$, winner-map entropy $H$, and mean absolute alive-mass change $\nu$. These are concatenated into
$$
d \in \mathbb{R}^{3(N+1)+2},
$$
then $\ell_2$-normalized. Novelty is the average Euclidean distance to the $k$ nearest archived descriptors:
$$
\mathcal{N}_i = \frac{1}{k}\sum_{j \in \mathrm{kNN}(\mathcal{A},d_i)} \|d_i - d_j\|_2,
$$
with $k=8$ [2604.11248].

The second term, contemporary visual diversity, uses a frozen DINOv2 encoder. For sampled frame $t$ of world $i$, the embedding is
$$
\mathbf{z}_i^t \in \mathbb{R}^{768},
$$
and pairwise distance is
$$
d_{ij}^t = 1 - \langle \mathbf{z}_i^t, \mathbf{z}_j^t \rangle.
$$
The diversity score is the median distance to the rest of the current population, averaged over sampled frames:
$$
\mathcal{D}_i = \frac{1}{T}\sum_{t=1}^{T}\operatorname{median}_{j\neq i}\, d_{ij}^{t}.
$$
The paper notes that monocultures and dead states are selected against primarily through this novelty/diversity design rather than by a separate explicit penalty term [2604.11248].

The same work also introduces two quantitative proxies for the claimed edge-of-chaos regime. Ecological Persistence is
$$
EP = \frac{|\{t : H^t > \varepsilon\}|}{T}, \qquad \varepsilon = 0.1\,\log_2 N,
$$
where $H^t$ is per-pixel entropy of the agent aliveness distribution. Effective Complexity is defined as
$$
\mathcal{C}_{\mathrm{eff}}^{t} = H(\mathrm{grid}_t)\times \bigl(1 - L_{\mathrm{Z77}}(\mathrm{grid}_t)\bigr),
$$
combining normalized spatial entropy with an LZ77 compressibility ratio. The intended interpretation is that pure order and pure noise both yield low complexity, while structured intermediate variability yields larger values [2604.11248].

## 5. Emergent regimes and relation to broader NCA research

Empirically, PBT-NCA produces a continuing sequence of qualitatively distinct regimes over hundreds of meta-iterations. Reported behaviors include highly regular periodic waves, traveling spiral waves, coordinated oscillatory domains, spore-like scattering and colonization, migrating macro-structures with coherent outer boundaries and active interiors, trail-following locomotion, shooters, archipelago-like territorial patterns, and, in larger-agent or extended-hyperparameter settings, glider-like or spaceship-like rigid structures [2604.11248].

Across 3-agent, 5-agent, and 7-agent settings, mean population score and mean novelty show an initial decline followed by a steady increase, interpreted as continual discovery. Larger numbers of NCAs retain higher novelty later in training. Successful runs tend to favor higher learning rates and smaller batch sizes, which the authors interpret as injecting gradient noise and faster updates that help prevent collapse into stagnant equilibria. In 7-agent worlds, the reported edge-of-chaos statistics are $EP \approx 1.0$, mean species entropy $\bar{H} \approx 2.3$ bits, and effective complexity $\mathcal{C}_{\mathrm{eff}} \approx 0.21 \pm 0.05$ [2604.11248].

These ecological dynamics sit within a wider NCA research program. Work on spatio-temporal pattern learning treats NCA as local-rule models of reaction-diffusion and Turing-like systems, with explicit use of identity, Laplacian, and gradient kernels and strong relevance to biological pattern formation [2310.14809]. Work on dynamic texture NCA isolates an architectural heuristic for sustaining visible motion: to preserve emergent dynamics, the hidden width $D$ of the per-cell update MLP should exceed the state-channel count $C$, and in practice $D/C > 2$ is recommended [2404.06406]. Research on physical NCA shows that shared local update rules, persistent hidden state, and iterative consensus can survive transfer into hardware modules with cardinal-neighbor communication, quantized messages, asynchronous timing, and microcontroller memory limits [2203.07548]. A distinct line of work on universal or programmable NCA reframes the substrate as a medium for in-state computation, separating mutable state from immutable local “hardware,” which suggests a close affinity between PD-NCA and programmable spatial computation [2505.13058].

Taken together, these surrounding results suggest that PD-NCA is best understood not as an isolated architecture but as one specialization of a broader class of learned local dynamical systems spanning morphogenesis, PDE surrogates, embodied modules, and spatial computation.

## 6. Interpretive status, limitations, and research directions

PD-NCA is often associated with open-endedness, but the strongest claims remain conditional. In PBT-NCA, the open-endedness argument depends on a specific meta-evolutionary regime, a handcrafted behavioral descriptor, a DINOv2-based visual diversity term, and proxy metrics such as Ecological Persistence and Effective Complexity. The same paper states clear limitations: compute cost is substantial; reproducibility may be challenging because the system is sensitive to initialization, hyperparameters, and stochastic replacement; the novelty metric depends on a hand-designed descriptor; DINOv2 may introduce anthropocentric or natural-image biases; and the edge-of-chaos evidence is suggestive rather than definitive, since the analysis does not use stronger dynamical-systems diagnostics such as Lyapunov spectra [2604.11248].

A second limitation is conceptual. Standard NCA can often be analyzed as a local, convolution-like recurrent operator, and work connecting NCA with Deep Equilibrium Models argues that such systems can be viewed through their limiting states, fixed points, and stability properties. That perspective suggests possible tools for long-horizon PD-NCA training—especially implicit differentiation and stability theory—but these are proposals rather than established PD-NCA methods [2501.03573].

Physical and continuous-space extensions indicate plausible directions but also define current boundaries. Battery-powered modular robotic platforms already realize persistent local state, orientation-aware local communication, and reconfiguration without reset, but they remain discrete, rigid, and UART-mediated rather than biochemical or continuous [2510.07440]. Neural Particle Automata generalize NCA from static lattices to moving particles with dynamic neighborhoods and SPH-based local perception, which is a close abstraction for sparse, mobile cell populations, but that framework keeps particle count fixed during a rollout and cannot merge or split particles [2601.16096].

The most explicit future directions proposed for PBT-NCA are scaling to larger grids and more agents using accelerated frameworks such as CAX and large-scale evolution strategies, and co-evolving not only NCA weights and scalar hyperparameters but also architectures, environments, and update strategies themselves [2604.11248]. A plausible implication is that PD-NCA research is moving toward a view of the “dish” not as a single trained automaton, but as an evolving ecosystem of local rules, mutable worlds, and adaptive search procedures whose interesting behavior depends as much on outer-loop selection as on inner-loop cellular dynamics.

Source: https://www.emergentmind.com/topics/petri-dish-neural-cellular-automata-pd-nca