paper.pdf
Digital Ecosystems: Interactive Multi-Agent Neural Cellular Automata
Luke Darlow
Sakana AI, Tokyo, Japan
luke@sakana.ai
Abstract
Neural cellular automata (NCAs) are well-studied for single-species morphogenesis and texture generation. Multi-agent settings, where several differentiable species compete on a shared grid via online gradient descent, have received far less attention; to our knowledge, only the Petri Dish NCA (PD-NCA) framework (Zhang et al., 2025) trains multiple species this way, and no prior work has made such a system directly interactive. This work centres on interactivity. We present an open-source, browser-based platform that supports a checkpoint-branch-explore workflow: observe a live digital ecosystem, save promising states, adjust parameters, and compare divergent outcomes from the same starting point. Because species are trained online, parameter changes propagate through the learning loop—not just the forward dynamics—so interactive steering is qualitatively richer than in rule-based ALife tools. We introduce algorithmic updates to PD-NCA including a tunable soft growth gate, spatial concentration, local win-rate feedback, and emergency respawn. Five case studies exercise the platform across regime transitions, emergent cooperation, optimiser comparison, and environmental construction. Static figures necessarily omit the live dynamics; the interactive platform is the primary contribution.
Introduction
Neural Cellular Automata have demonstrated single-species morphogenesis (Mordvintsev et al., 2020), texture synthesis (Niklasson et al., 2021), and self-repair. Recent work has extended NCAs to multi-agent competition on shared grids (Plantec et al., 2023; Barbieux and Canaan, 2024; Randazzo et al., 2023; Zhang et al., 2025), but researchers still typically study these dynamics (attractors, transients, path-dependent regime transitions) as offline batch experiments. Such workflows miss transient phenomena and prevent investigation of unexpected behaviour as it appears.
In this paper we present an open-source, browser-based platform inspired by Picbreeder (Secretan et al., 2011), where collaborative branching discovered artefacts that automated search could not find; we apply the same idea to dynamic ALife ecosystems. Our contributions are: (1) an interactive web platform with a real-time timeline dashboard and checkpoint slots; (2) algorithmic improvements to PD-NCA, including a tunable growth gate, spatial concentration, local win-rate feedback, and emergency respawn; and (3) five case studies—spanning regime transitions, emergent cooperation, optimiser comparison, and environmental construction—that exercise the platform’s checkpoint-branch-explore workflow in distinct ways. The platform runs entirely in the browser via TensorFlow.js (Smilkov et al., 2019) and WebGL, with no installation, at https://pub.sakana.ai/digital-ecosystem.
Background
Neural cellular automata.
A neural cellular automaton (NCA) is a 2D grid in which every cell carries a small state vector and a shared neural network repeatedly maps each cell’s local neighbourhood to a state update; iterating produces emergent global structure from local rules. Mordvintsev et al. (2020) showed such networks can be trained end-to-end to grow target patterns and recover from damage, with extensions to texture synthesis (Niklasson et al., 2021), goal-conditioned control (Sudhakaran et al., 2022; Grasso and Bongard, 2022), and high-resolution rendering via implicit decoders (Pajouheshgar et al., 2025).
Multi-agent and ecosystem NCAs.
Lenia (Chan, 2019) extended CAs to a continuous substrate supporting emergent species; Flow-Lenia (Plantec et al., 2023) added parameter localisation so multiple species share a mass-conserving grid. Coralai (Barbieux and Canaan, 2024) evolves ecosystems of embodied NCAs with competition and symbiosis, Biomaker CA (Randazzo et al., 2023) explores multi-agent grid worlds under metabolic constraints, and Aguera y Arcas et al. (2024) show that self-replicating programs emerge spontaneously from simple computational substrates without an explicit fitness landscape. These systems use evolutionary or rule-based dynamics; none trains multiple competing species by gradient descent during simulation. Zhang et al. (2025) introduced Petri Dish NCA (PD-NCA), which does: neural species compete for territory via attack/defence vectors with online backpropagation. Ours is the first work to make such a system directly interactive in real time: because species are trained online, parameter changes propagate through the learning loop, making interactive steering qualitatively richer than in rule-based ALife tools.
Method Updates from PD-NCA
PD-NCA in brief.
In PD-NCA (Zhang et al., 2025), N neural species share a 2D grid alongside a sun background. At each pixel every species emits an attack vector ( a_{att,i} ) and a defence vector ( a_{def,i} ); the dot product ( \langle a_{att,i},a_{def,j}\rangle ) is summed over defenders j to give each attacker a total score, a softmax yields per-species competition weights, and all species are trained online by back-propagating a per-species growth loss through the simulation step.
Presence gating, walls, and sun penalty.
Three spatial constraints share one implementation: a per-cell additive penalty before the softmax. Presence gating—a species only competes inside its dilated territory (a 3×3 max-pool of a); cells where m<0.05 receive -10. Walls take -10 for all species. An optional sun handicap reduces sun scores near species frontiers (default off).
Growth gate.
After the softmax winner is chosen, each species’ new alpha channel becomes ( a = w_i · g_i ) with ( w_i ) the softmax competition weight. The default k_gate=20 gives a sigmoid 10%–90% transition zone of ±2.2/k_gate ≈ ±0.11, effectively a step function producing the bistable territorial regime of the other case studies. In PD-NCA this steepness was hard-coded; exposing it as an interactive knob unlocks a distinct dynamical regime.
Concentration.
PD-NCA distributes attack/defence energy uniformly across a species’ territory, preventing local focus on a hard boundary. We add a sliding-window softmax over local energy ( E_i=||a_i||_2+||d_i||_2 ) in a k×k window focusing competitive force on locally high-energy cells.
Win-rate feedback and stochastic updates.
A per-cell EMA tracks maximum local aliveness, modulating an update probability ( p_{update}=p_0(1 +s(r−0.5)) ) clamped to [0.1,1] with ( p_0=0.56 ). This is a positive-feedback mechanism: cells with high aliveness (r high) update more frequently, reinforcing established territories, while weakly-held cells (r low) update less often, damping oscillatory boundary dynamics and breaking synchronous-update artefacts.
Loss and respawn.
We minimise a soft-min over per-species mean aliveness with an entropy bonus. The soft-min focuses gradient on the weakest species, asinh compresses growth so small-population doublings are rewarded as much as large-population doublings, and the entropy bonus pushes toward uniform populations.
Architecture and optimisation.
We replace PD-NCA’s convolutional blocks with MobileNetV2-style Inverted Residual blocks (Sandler et al., 2018), configurable in depth (0–10), width (8–256), and kernel size ({1,3,5,7}). A shared trunk feeds a per-species grouped 1×1 decoder.
Exploration Case Studies
We exercise the platform through five case studies, each illustrating a different style of interactive exploration. All experiments use five species; grid size is 128×128 except 256×256 for the growth-gate study and 200×200 for biogeography. The studies progress from tuning a single simulator parameter (growth gate) through sweeping and scheduling training hyperparameters (extreme temperature, cooperation), to branching alternative optimiser configurations from a shared checkpoint, to constructing and modifying the spatial environment itself (biogeography).
A learned Langton-λ.
Reducing k softens the gate so that stable intermediate alive values become possible, and the alive-channel field crosses into a regime resembling "Class IV" cellular automata (Wolfram, 1984). k plays the role of Langton’s λ parameter (Langton, 1990; Packard, 1988), but inside a learning system where species adapt to whatever value the user sets, so the sweet spot is reachable interactively rather than by exhaustive sweep.
Internal structure at the edge of chaos.
At k_gate=20 the gate is effectively a step function and the alive field resolves into flat coloured tiles. Dropping k_gate into the edge band (∼4.6–4.9) widens the sigmoid transition zone so many cells carry stable intermediate aliveness.
Protocol and path dependence.
Cold-starting at k_gate≲5 collapses before any species can establish presence. The working protocol is to start at k_gate=17.5 and step the slider down once the ecosystem has settled.
Conclusion
Most directly, showing that a single differentiable parameter can push the alive-channel field from bistable territories into an excitable edge-of-chaos regime that the platform lets researchers observe, checkpoint, and probe as it happens. The remaining case studies illustrate how competition temperature, survival threshold, optimiser choice, and spatial geometry each produce distinct dynamical regimes accessible within the same platform. The platform is available at https://pub.sakana.ai/digital-ecosystem.
Acknowledgements
We acknowledge the Frontier Intelligence Group at Sakana AI for their creative thoughts, ideas, and testing of the Digital Ecosystems demo. Without their excitement and passion, this work would not have made it to submission.
References
- Aguera y Arcas, B., et al. (2024). Computational life: How well-formed, self-replicating programs emerge from simple interaction. arXiv preprint arXiv:2406.19108.
- Barbieux, A. and Canaan, R. (2024). Coralai: Intrinsic evolution of embodied neural cellular automata ecosystems. arXiv preprint arXiv:2406.09654.
- Chan, B. W.-C. (2019). Lenia: Biology of artificial life. Complex Systems, 28(3):251–286.
- Grasso, C. and Bongard, J. (2022). Empowered neural cellular automata. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pages 108–111.
- Heinemann, C. (2024). ALiEn: Artificial life environment. https://github.com/chrxh/alien. Open-source CUDA-based ALife simulator.
- Kumar, A., et al. (2025). Automating the search for artificial life with foundation models. Artificial Life, 31(3):368–395.
- Langton, C. G. (1990). Computation at the edge of chaos: Phase transitions and emergent computation. Physica D: Nonlinear Phenomena, 42(1–3):12–37.
- Mordvintsev, A. (2023). SwissGL: Minimalist WebGL2 wrapper for GLSL shaders. https://github.com/nicoptere/SwissGL. Open-source library.
- Mordvintsev, A., et al. (2020). Growing neural cellular automata. Distill.
- Niklasson, E., et al. (2021). Self-organising textures. Distill.
- Packard, N., et al. (2019). An overview of open-ended evolution: Editorial introduction to the open-ended evolution II special issue. Artificial Life, 25(2):93–103.
- Pajouheshgar, E., et al. (2025). Neural cellular automata: From cells to pixels. arXiv preprint arXiv:2506.22899.
- Plantec, E., et al. (2023). Flow-Lenia: Towards open-ended evolution in cellular automata through mass conservation and parameter localization. In Proceedings of the Artificial Life Conference. MIT Press.
- Randazzo, E., et al. (2023). Biomaker CA: a biome maker project using cellular automata. arXiv preprint arXiv:2307.09320.
- Sandler, M., et al. (2018). MobileNetV2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4510–4520.
- Secretan, J., et al. (2011). Picbreeder: A case study in collaborative evolutionary exploration of design space. In Evolutionary Computation, volume 19, pages 373–403.
- Smilkov, D., et al. (2019). TensorFlow.js: Machine learning for the web and beyond. In Proceedings of Machine Learning and Systems.
- Sudhakaran, S., et al. (2022). Goal-Guided neural cellular automata: Learning to control self-organising systems. In ICLR 2022 Workshop “From Cells to Societies”.
- Takagi, H. (2001). Interactive evolutionary computation: Fusion of the capabilities of EC optimization and human evaluation. Proceedings of the IEEE, 89(9):1275–1296.
- Wilensky, U. (1999). NetLogo. Center for Connected Learning and Computer-Based Modeling, Northwestern University,http://ccl.northwestern.edu/netlogo/.
- Wolfram, S. (1984). Universality and complexity in cellular automata. Physica D: Nonlinear Phenomena, 10(1–2):1–35.
- Zhang, I., et al. (2025). Petri dish neural cellular automata. https://pub.sakana.ai/pdnca. Sakana AI technical report.