skillfed

cellpylib

CellPyLib, A library for working with Cellular Automata, for Python.

cellpylib v2.4.0 183.9K downloads/30d#10,056 on PyPI246
Permissive license Apache License 2.0 Abandoned released

What it is and what it does

CellPyLib is a Python library for simulating and visualizing cellular automata constrained to regular grids—elementary 1D automata and 2D variants like Conway's Game of Life. It supports configurable neighbourhood sizes, multiple cell states (colors), and both predefined rules (like Wolfram's NKS rules) and custom rule tables. The library is designed for education and research into complex systems and non-linear dynamics on uniform grids.

The package provides built-in functions to evolve automata over time steps, apply various rule types (binary, totalistic, table-based), and measure complexity through metrics like average cell entropy and mutual information. It generates visualizations matching those from Wolfram's cellular automata atlas. However, the project is no longer maintained—the last release was in February 2023 with no subsequent commits—so it will not receive updates for dependency changes or Python version support beyond what was frozen at that time.

Use it for:

  • Teaching or learning elementary cellular automata and their behaviour under different rule systems.
  • Simulating 2D automata like Conway's Game of Life or the Abelian sandpile for research or visualization.
  • Measuring complexity in CA dynamics using entropy and mutual information metrics.
  • Experimenting with custom rule tables and varying neighbourhood sizes for CA research.
  • Reproducing cellular automata from Wolfram's NKS reference or atlas.wolfram.com for verification.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

CellPyLib simulates 1- and 2-dimensional cellular automata on regular grids with configurable neighbourhoods, colors, and evolution rules, producing visualizations of their behavior over time.

Yes, if you need to simulate 1D or 2D cellular automata on regular grids for education or research and can accept that the package is no longer maintained. The code is stable and marked production-ready, but expect no updates for dependency incompatibilities or Python version changes. Verify compatibility with your NumPy and Matplotlib versions before committing to it in a production workflow.

Install

cellpylib on PyPI

pip

pip install cellpylib

uv

uv add cellpylib

poetry

poetry add cellpylib

Installing cellpylib

Before you install

Installation requires NumPy and Matplotlib alongside Python 3.6+. The package is marked abandoned—last release was 2023-02-15 and no commits since 2023-02-21—so expect no maintenance, bug fixes, or dependency updates going forward.

License in practice

Licensed under Apache License 2.0 (permissive), which allows commercial and private use with minimal restrictions, though you must include a copy of the license and state significant changes.

Quickstart

pip install cellpylib

import cellpylib as cpl

cellular_automaton = cpl.init_simple(200)
cellular_automaton = cpl.evolve(cellular_automaton, timesteps=100, 
                                apply_rule=lambda n, c, t: cpl.nks_rule(n, 30))
cpl.plot(cellular_automaton)

Requires NumPy and Matplotlib; Python >3.6 required.

Verify before relying

  • Whether the package works correctly with modern NumPy/Matplotlib versions despite abandonment.
  • Whether periodic boundary conditions are the only supported edge-handling mode.

Package facts

License Apache License 2.0 (permissive)
Python support supports the current Python release (>3.6)
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 1,276 days since the last release
Last repo commit
First released
Downloads 183,863/month — #10,056 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cellpylib-2.4.0.tar.gz

Keywords: cellular automata, complexity, complex systems, computation, non-linear dynamics

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.6Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

cellular automata simulationelementary CA librarygame of life implementationCA rule evolutiongrid-based cellular automataCA visualizationtotalistic cellular automaton
cellular-automatacomplexity-sciencesimulation

More Artificial Intelligence packages