Manuscript Offprint

arXiv:2609.06102

Programmable Cellular Automata

Ahmed Khalifa, Muhammad Umair Nasir, Matthew Siper, Steve James, Julian Togelius

Abstract

Cellular automata is a local computation paradigm where complex behavior can arise from local interactions between simple functions. This paradigm has been used to explain many systems such as biological processes, traffic simulation, computer networks, etc. In games, cellular automata have been used in games such as SimCity and for the generation of spatial content such as caves or dungeons. However, creating effective local rules is hard and unintuitive. Cellular automata can be effectively evolved, but may still be hard to interpret. In this work, we introduce the concept of programmable cellular automata, where we represent the system as Python code. We also modularize the cellular automata into local functions and a decision function. Local functions take a local neighborhood and return a value, while the decision function takes the output of the local functions and decides the value of the next state. Separating the cellular automata into modules written in Python helps with understanding how these systems are working. We also explore adding global functions where they take the whole state and compute a function from it. We tested generating levels for three different games from the PCG Benchmark. The results showed that global functions decrease the number of iterations that cellular automata need to solve a problem, and that we cannot find solutions for some problems with purely local functions. Looking into the generated functions, we can see common functions that have been used in different experiments, which not only helps us understand the generator but also helps us understand these games better and what is important for them.

Keywords

Cellular Automata, Procedural Content Generation, Genetic Programming, Large Language Models

References (40)

  • Proceedings of the 2010 Workshop on Procedural Content Generation in Games, 2010, pp. 1–4
  • Evaluating Large Language Models Trained on Code
  • Proceedings of the 14th International Conference on the Foundations of Digital Games, 2019, pp. 1–7
  • Chen, P. M. Sathikh, A procedural approach based on cellular automata for the generation of spatial layout designs, International Journal of Architectural Computing 24 (2026) 107–119
  • Chen, P. M. Sathikh, Hexagonal cellular automata and graph theory for procedural spatial layout generation, Journal of Asian Architecture and Building Engineering (2025) 1–19
  • 2017 16th Brazilian Symposium on Computer Games and Digital Entertainment (SBGames), IEEE, 2017, pp. 116–125
  • Proceedings of the 2nd International Symposium on Artificial Intelligence for Medicine Sciences, 2021, pp. 168–172
  • Kocabas, K. Oğuz, Using cellular automata as a basis for procedural generation of organic cities, European Journal of Engineering and Technology Research 5 (2020) 116–120
  • Clay and tombs of tomeria, in: Proceedings of the FDG workshop on Procedural Content Generation, 2016
  • A review of recent work, in: Proceedings of the First international conference on evolutionary computation and its applications (EvCA'96), volume 8, Moscow, 1996, pp. 23–30
  • Mechanisms and impediments, Physica D: Nonlinear Phenomena 75 (1994) 361–391
  • Procedural Content Generation in Games, Springer, 2016, pp. 31–55
  • A taxonomy and survey, IEEE Transactions on Computational Intelligence and AI in Games 3 (2011) 172–186
  • European Conference on the Applications of Evolutionary Computation, Springer, 2012, pp. 224–233
  • Proceedings of the Genetic and Evolutionary Computation Conference Companion, 2017, pp. 85–86
  • Lam, P. Hingston, Game level layout generation using evolved cellular automata, Connection Science 28 (2016) 63–82
  • 2013 IEEE Conference on Computational Intelligence in Games (CIG), IEEE, 2013, pp. 1–8
  • 2017 IEEE Symposium Series on Computational Intelligence (SSCI), IEEE, 2017, pp. 1–8
  • Proceedings of the Genetic and Evolutionary Computation Conference, 2022, pp. 68–76
  • Evolving symbolic neural cellular automata environments to train player agents, in: Proceedings of the Genetic and Evolutionary Computation Conference Companion, 2025, pp. 175–178
  • Artificial Life Conference Proceedings 33, volume 2021, MIT Press One Rogers Street, Cambridge, MA 02142-1209, USA journals-info ..., 2021, p
  • A survey and roadmap, IEEE Transactions on Games
  • Open-ended text2level generation through large language models, Advances in Neural Information Processing Systems 36 (2023) 54213–54227
  • Proceedings of the 18th International Conference on the Foundations of Digital Games, 2023, pp. 1–8
  • Generating 3d game levels through large language models, Master's thesis, New York University Tandon School of Engineering, 2025
  • Procedural content generation via tool-using llms, Available at SSRN 6499021
  • Piette, D. J. Soemers, J. Togelius, Gavel: Generating games via evolution and language models, Advances in Neural Information Processing Systems 37 (2024) 110723–110745
  • 2024 IEEE conference on games (CoG), IEEE, 2024, pp. 1–4
  • Evolving mechanics for automatic game design, in: Proceedings of the Genetic and Evolutionary Computation Conference, 2026, pp. 310–318
  • Generating stories and worlds through large language models, arXiv preprint arXiv:2405.06686 (opens arXiv in a new tab)
  • Handbook of evolutionary machine learning, Springer, 2023, pp. 331–366
  • Perspectives from the oee workshop in york, Artificial life 22 (2016) 408–423
  • AlphaEvolve: A coding agent for scientific and algorithmic discovery
  • Huang, O. Bastani, D. Jayaraman, Y. Zhu, J. Fan, et al., Eureka: Human-level reward design via coding large language models, in: International conference on learning Representations, volume 2024, 2024, pp. 26516–26560
  • M. Siper, A. Khalifa, J. Togelius, Procedural content generator generation via continual abstraction discovery, arXiv preprint arXiv:2608.17947 (2026). (opens arXiv in a new tab)
  • com Morrisville, 2008
  • A paradigm for genetically breeding populations of computer programs to solve problems, volume 34, Stanford University, Department of Computer Science Stanford, CA, 1990
  • 2007 IEEE Symposium on Computational Intelligence and Games, IEEE, 2007, pp. 252–259
  • an open-source testbed for generative challenges in games, in: Proceedings of the 20th International Conference on the Foundations of Digital Games, 2025, pp. 1–12
  • S. Earle, O. Yildiz, J. Togelius, C. Hegde, Pathfinding neural cellular automata, arXiv preprint arXiv:2301.06820 (2023). (opens arXiv in a new tab)