skip to main content

batara-guru: A Python-Based Rule 30 Cellular Automaton Analyzer with Parallel Processing

*Sandy Hardian Susanto Herho orcid scopus  -  Department of Earth and Planetary Sciences, University of California, Riverside, CA, USA 92521, United States
Gandhi Napitupulu orcid scopus  -  Coastal Hazards and Energy System Science (CHESS) Lab, Hiroshima University, Hiroshima, Hiroshima Prefecture, Japan 739-8529, Japan

Citation Format:
Abstract
We present batara-guru, an open-source Python library for efficient Rule 30 cellular automaton simulation and analysis. Using Numba's just-in-time compilation and parallel processing, the implementation achieves sub-second execution for systems up to 2001 cells on standard laptop hardware, overcoming Python's traditional performance limitations. The library integrates rigorous mathematical formulation from discrete dynamical systems theory with practical tools including NetCDF data persistence and diagnostic metrics for compositional/local entropy and interface density. Performance benchmarks demonstrate simulation times of 0.01-1.27 seconds across spatial scales from 251 to 2001 cells. Analysis reveals scale-invariant properties with entropy converging to 0.73 bits and interface density saturating near 0.51, confirming Rule 30's chaotic behavior while indicating subtle deviations from randomness. By requiring only standard Python libraries and modest computational resources, this framework democratizes cellular automaton research, enabling sophisticated dynamical systems analysis without specialized hardware infrastructure.
Fulltext Email colleagues
Keywords: Cellular Automata; Compositional entropy; Interface Density; Parallel Computing; Rule 30

Article Metrics:

Article Info
Section: FUNDAMENTAL MATHEMATICS AND APPLICATIONS
Language : EN
  1. S. Wolfram, "Statistical mechanics of cellular automata," Reviews of Modern Physics, vol. 55, no. 3, pp. 601-644, 1983, https://doi.org/10.1103/RevModPhys.55.601
  2. S. Wolfram, "Universality and complexity in cellular automata," Physica D: Nonlinear Phenomena, vol. 10, no. 1-2, pp. 1-35, 1984, https://doi.org/10.1016/0167-2789(84)90245-8
  3. J. von Neumann and A. W. Burks, Theory of Self-Reproducing Automata. Urbana, IL: University of Illinois Press, 1966, https://archive.org/details/theoryofselfrepr00vonn_0
  4. T. Toffoli, "Cellular automata as an alternative to (rather than an approximation of) differential equations in modeling physics," Physica D: Nonlinear Phenomena, vol. 10, no. 1-2, pp. 117-127, 1984, https://doi.org/10.1016/0167-2789(84)90254-9
  5. F. Seredynski, P. Bouvry, and A. Y. Zomaya, "Cellular automata computations and secret key cryptography," Parallel Computing, vol. 30, no. 5, pp. 753-766, 2004, https://doi.org/10.1016/j.parco.2003.12.014
  6. B. Chopard and M. Droz, Cellular Automata Modeling of Physical Systems. Cambridge, UK: Cambridge University Press, 1998, https://doi.org/10.1017/CBO9780511549755
  7. M. Cook, "Universality in Elementary Cellular Automata," Complex Systems, vol. 15, no. 1, pp. 1-40, 2004, https://doi.org/10.25088/ComplexSystems.15.1.1
  8. S. Wolfram, A New Kind of Science. Champaign, IL: Wolfram Media, 2002, https://www.wolframscience.com/nks/
  9. G. J. Martinez, A. Adamatzky, and R. Alonso-Sanz, "COMPLEX DYNAMICS OF ELEMENTARY CELLULAR AUTOMATA EMERGING FROM CHAOTIC RULES," International Journal of Bifurcation and Chaos, vol. 22, no. 02, p. 1250023, 2012, https://doi.org/10.1142/S021812741250023X
  10. G. J. Martinez, A. Adamatzky, R. Hoffmann, D. Deserable, and I. Zelinka, "On Patterns and Dynamics of Rule 22 Cellular Automaton," Complex Systems, vol. 28, no. 2, pp. 125-174, 2019, https://doi.org/10.25088/ComplexSystems.28.2.125
  11. H. Gutowitz and J. D. Victor, "Local Structure Theory in More Than One Dimension," Complex Systems, vol. 1, no. 1, pp. 57-68, 1987, https://www.complex-systems.com/abstracts/v01_i01_a05/
  12. O. Martin, A. M. Odlyzko, and S. Wolfram, "Algebraic properties of cellular automata," Communications in Mathematical Physics, vol. 93, pp. 219-258, 1984, https://doi.org/10.1007/BF01223745
  13. S. Wolfram, A Project to Find the Fundamental Theory of Physics. Champaign, IL: Wolfram Media, 2020, https://www.wolframphysics.org/technical-introduction/
  14. J. Gorard, "Some Relativistic and Gravitational Properties of the Wolfram Model," Complex Systems, vol. 29, no. 2, pp. 599-654, 2020, https://doi.org/10.25088/ComplexSystems.29.2.599
  15. M. Schule and R. Stoop, "A full computation-relevant topological dynamics classification of elementary cellular automata," Chaos: An Interdisciplinary Journal of Nonlinear Science, vol. 22, no. 4, p. 043143, 2012, https://doi.org/10.1063/1.4771662
  16. S. Gobron and N. Chiba, "3D surface cellular automata and their applications," The Journal of Visualization and Computer Animation, vol. 10, no. 3, pp. 143-158, 1999, https://doi.org/10.1002/(SICI)1099-1778(199907/09)10:3<143::AID-VIS204>3.0.CO;2-W
  17. O. Bandman, Cellular Automata Composition Techniques for Spatial Dynamics Simulation. Berlin, Heidelberg: Springer Berlin Heidelberg, 2010, pp. 81-115, https://doi.org/10.1007/978-3-642-12203-3_5
  18. S. H. S. Herho, S. N. Kaban, and C. Nugraha, "OptionMC: A Python package for Monte Carlo pricing of European options," SSRN, 2025, https://dx.doi.org/10.2139/ssrn.5224853
  19. S. H. S. Herho, I. P. Anwar, F. Khadami, R. Suwarman, and D. E. Irawan, "simple-idealized-1d-nlse: Pseudo-Spectral Solver for the 1D Nonlinear Schrodinger Equation," arXiv preprint, 2025, https://doi.org/10.48550/arXiv.2509.05901
  20. S. H. S. Herho, N. J. Trilaksono, F. R. Fajary, G. Napitupulu, I. P. Anwar, F. Khadami, and D. E. Irawan, "kh2d-solver: A Python Library for Idealized Two-Dimensional Incompressible Kelvin-Helmholtz Instability," arXiv preprint, 2025, https://doi.org/10.48550/arXiv.2509.16080
  21. G. A. Hedlund, "Endomorphisms and automorphisms of the shift dynamical system," Mathematical Systems Theory, vol. 3, pp. 320-375, 1969, https://doi.org/10.1007/BF01691062
  22. E. Akin, The General Topology of Dynamical Systems, ser. Graduate Studies in Mathematics. Providence, RI: American Mathematical Society, 1993, vol. 1
  23. C. E. Shannon, "A mathematical theory of communication," The Bell System Technical Journal, vol. 27, no. 3, pp. 379-423, 1948, https://doi.org/10.1002/j.1538-7305.1948.tb01338.x
  24. P. Grassberger, "Toward a quantitative theory of self-generated complexity," International Journal of Theoretical Physics, vol. 25, pp. 907-938, 1986, https://doi.org/10.1007/BF00668821
  25. C. R. Harris, K. J. Millman, S. J. van der Walt et al., "Array programming with NumPy," Nature, vol. 585, pp. 357-362, 2020, https://doi.org/10.1038/s41586-020-2649-2
  26. J. D. Hunter, "Matplotlib: A 2D graphics environment," Computing in Science & Engineering, vol. 9, no. 3, pp. 90-95, 2007, https://doi.org/10.1109/MCSE.2007.55
  27. S. K. Lam, A. Pitrou, and S. Seibert, "Numba: a LLVM-based Python JIT compiler," in Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, 2015, pp. 1-6, https://doi.org/10.1145/2833157.2833162
  28. S. Herho, S. N. Kaban, D. E. Irawan, and R. Kapid, "Efficient 1D Heat Equation Solver: Leveraging Numba in Python," Eksakia : Berkala Ilmiah Bidang MIPA, vol. 25, no. 2, pp. 126-137, 2024, https://doi.org/10.24036/eksakia/vol25-iss02/487
  29. R. K. Rew and G. P. Davis, "NetCDF: an interface for scientific data access," IEEE Computer Graphics and Applications, vol. 10, no. 4, pp. 76-82, 1990, https://doi.org/10.1109/38.56302
  30. N. Boccara and H. Fuks, "Number-conserving cellular automaton rules," Fundamenta Informaticae, vol. 52, no. 1-3, p. 1-13, 2002, https://dl.acm.org/doi/10.5555/639405.639407

Last update:

No citation recorded.

Last update:

No citation recorded.