{"id":29338397,"url":"https://github.com/maxencefaldor/cax","last_synced_at":"2026-01-18T04:25:45.076Z","repository":{"id":256441025,"uuid":"845934746","full_name":"maxencefaldor/cax","owner":"maxencefaldor","description":"Cellular Automata Accelerated in JAX (Oral at ICLR 2025)","archived":false,"fork":false,"pushed_at":"2025-11-24T16:54:20.000Z","size":134577,"stargazers_count":238,"open_issues_count":4,"forks_count":21,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-01-04T16:49:54.322Z","etag":null,"topics":["artificial-life","cellular-automata","complex-systems","emergence","neural-cellular-automata","open-endedness","self-organization"],"latest_commit_sha":null,"homepage":"https://maxencefaldor.github.io/cax/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxencefaldor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-22T08:05:16.000Z","updated_at":"2025-12-31T22:46:12.000Z","dependencies_parsed_at":"2024-09-17T14:40:39.070Z","dependency_job_id":"e2af9ee5-63d4-4e25-b3d5-b9ce54b8241a","html_url":"https://github.com/maxencefaldor/cax","commit_stats":null,"previous_names":["maxencefaldor/cax"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/maxencefaldor/cax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxencefaldor%2Fcax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxencefaldor%2Fcax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxencefaldor%2Fcax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxencefaldor%2Fcax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxencefaldor","download_url":"https://codeload.github.com/maxencefaldor/cax/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxencefaldor%2Fcax/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-life","cellular-automata","complex-systems","emergence","neural-cellular-automata","open-endedness","self-organization"],"created_at":"2025-07-08T06:13:26.283Z","updated_at":"2026-01-18T04:25:45.069Z","avatar_url":"https://github.com/maxencefaldor.png","language":"Python","funding_links":[],"categories":["Implementations"],"sub_categories":["Growing Neural Cellular Automata"],"readme":"# CAX: Cellular Automata Accelerated in JAX\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"https://raw.githubusercontent.com/maxencefaldor/cax/main/docs/assets/cax.png\" alt=\"logo\" width=\"448\"\u003e\u003c/img\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\t\u003ca href=\"https://pypi.python.org/pypi/cax\"\u003e\u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/cax.svg?style=flat\"\u003e\u003c/img\u003e\u003c/a\u003e\n\t\u003ca href=\"https://pypi.python.org/pypi/cax\"\u003e\u003cimg alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/cax.svg?style=flat\"\u003e\u003c/img\u003e\u003c/a\u003e\n\t\u003ca href=\"https://arxiv.org/abs/2410.02651\"\u003e\u003cimg alt=\"Paper\" src=\"http://img.shields.io/badge/paper-arxiv.2410.02651-B31B1B.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\n\t\u003ca href=\"https://x.com/maxencefaldor/status/1842211478796918945\"\u003e\u003cimg alt=\"X URL\" src=\"https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2Fmaxencefaldor%2Fstatus%2F1842211478796918945\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nCAX is a high-performance and flexible open-source library designed to **accelerate artificial life research**. 🧬\n\n## Overview 🔎\n\nAre you interested in emergence, self-organization, or open-endedness? Whether you're a researcher or just curious about the fascinating world of artificial life, CAX is your digital lab! 🔬\n\nDesigned for speed and flexibility, CAX allows you to easily experiment with self-organizing behaviors and emergent phenomena. 🧑‍🔬\n\n**Get started here** [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/00_getting_started.ipynb)\n\n## Why CAX? 💡\n\nCAX supports discrete and continuous systems, including neural cellular automata, across any number of dimensions. Beyond traditional cellular automata, it also handles particle systems and more, all unified under a single, intuitive API.\n\n### Rich 🎨\n\nCAX provides a comprehensive collection of 15+ ready-to-use systems. From simulating one-dimensional [elementary cellular automata](examples/10_elementary.ipynb) to training three-dimensional [self-autoencoding neural cellular automata](examples/45_self_autoencoding_mnist.ipynb), or even creating beautiful [Lenia](examples/20_lenia.ipynb) simulations, CAX provides a versatile platform for exploring the rich world of self-organizing systems.\n\n### Flexible 🧩\n\nCAX makes it easy to extend existing systems or build custom ones from scratch for endless experimentation and discovery. Design your own experiments to probe the boundaries of artificial open-ended evolution and emergent complexity.\n\n### Fast 🚀\n\nCAX is built on top of the JAX/Flax ecosystem for speed and scalability. The library benefits from vectorization and parallelization on various hardware accelerators such as CPU, GPU, and TPU. This allows you to scale your experiments from small prototypes to massive simulations with minimal code changes.\n\n### Tested \u0026 Documented 📚\n\nThe library is thoroughly tested and [documented](https://maxencefaldor.github.io/cax/) with numerous examples to get you started! Our comprehensive guides walk you through everything from basic cellular automata to advanced neural implementations.\n\n## Implemented Systems 🦎\n\n| Cellular Automata | Reference | Example |\n| --- | --- | --- |\n| Elementary Cellular Automata | [Wolfram (2002)](https://www.wolframscience.com/nks/) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/10_elementary.ipynb) |\n| Conway's Game of Life | [Gardner (1970)](https://web.stanford.edu/class/sts145/Library/life.pdf) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/11_life.ipynb) |\n| Lenia | [Chan (2020)](https://arxiv.org/abs/2005.03742) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/20_lenia.ipynb) |\n| Flow Lenia | [Plantec et al. (2022)](https://arxiv.org/abs/2212.07906) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/21_flow_lenia.ipynb) |\n| Particle Lenia | [Mordvintsev et al. (2022)](https://google-research.github.io/self-organising-systems/particle-lenia/) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/22_particle_lenia.ipynb) |\n| Particle Life | [Mohr (2018)](https://particle-life.com/) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/30_particle_life.ipynb) |\n| Boids | [Reynolds (1987)](https://www.red3d.com/cwr/boids/) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/31_boids.ipynb) |\n| Growing Neural Cellular Automata | [Mordvintsev et al. (2020)](https://distill.pub/2020/growing-ca/) |[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/40_growing_nca.ipynb) |\n| Growing Conditional Neural Cellular Automata | [Sudhakaran et al. (2022)](http://arxiv.org/abs/2205.06806) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/41_growing_conditional_nca.ipynb) |\n| Growing Unsupervised Neural Cellular Automata | [Palm et al. (2021)](https://arxiv.org/abs/2201.12360) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/42_growing_unsupervised_nca.ipynb) |\n| Diffusing Neural Cellular Automata | [Faldor et al. (2024)](https://arxiv.org/abs/2410.02651) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/43_diffusing_nca.ipynb) |\n| Self-classifying MNIST Digits | [Randazzo et al. (2020)](https://distill.pub/2020/selforg/mnist/) |[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/44_self_classifying_mnist.ipynb) |\n| Self-autoencoding MNIST Digits | [Faldor et al. (2024)](https://arxiv.org/abs/2410.02651) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/45_self_autoencoding_mnist.ipynb) |\n| 1D-ARC Neural Cellular Automata | [Faldor et al. (2024)](https://arxiv.org/abs/2410.02651) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/46_1d_arc_nca.ipynb) |\n| Attention-based Neural Cellular Automata | [Tesfaldet et al. (2022)](https://arxiv.org/abs/2211.01233) | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/47_attention_nca.ipynb) |\n\n## Getting Started 🚦\n\nHere, you can see the basic CAX API usage with Conway's Game of Life:\n\n```python\nimport jax\nimport jax.numpy as jnp\nfrom flax import nnx\n\nfrom cax.cs.life import Life\n\nseed = 0\n\nnum_steps = 128\nspatial_dims = (32, 32)\nchannel_size = 1\nrule_golly = \"B3/S23\"  # Conway's Game of Life\n\nkey = jax.random.key(seed)\nrngs = nnx.Rngs(seed)\n\nbirth, survival = Life.birth_survival_from_string(rule_golly)\ncs = Life(birth=birth, survival=survival, rngs=rngs)\n\nstate_init = jax.random.bernoulli(key, p=0.5, shape=(*spatial_dims, channel_size)).astype(\n\tjnp.float32\n)\nstate_final = cs(state_init, num_steps=num_steps, sow=True)\nstates = nnx.pop(cs, nnx.Intermediate)\n```\n\nFor a more detailed overview, get started with this notebook [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/maxencefaldor/cax/blob/main/examples/00_getting_started.ipynb)\n\n## Installation ⚙️\n\nYou will need Python 3.11 or later, and a working JAX installation installed in a virtual environment.\n\nThen, install CAX from PyPi with `uv`:\n```\nuv pip install cax\n```\n\nor with `pip`:\n```\npip install cax\n```\n\n## Citing CAX 📝\n\nIf you use CAX in your research, please cite the following paper:\n\n```bibtex\n@inproceedings{cax,\n\ttitle = {{CAX}: {Cellular} {Automata} {Accelerated} in {JAX}},\n\tvolume = {2025},\n\turl = {https://proceedings.iclr.cc/paper_files/paper/2025/file/19206a6ed5ed0aaeed440448dfc5cf7e-Paper-Conference.pdf},\n\tbooktitle = {International {Conference} on {Representation} {Learning}},\n\tauthor = {Faldor, Maxence and Cully, Antoine},\n\teditor = {Yue, Y. and Garg, A. and Peng, N. and Sha, F. and Yu, R.},\n\tyear = {2025},\n\tpages = {8947--8960},\n\tkeywords = {artificial life, emergence, self-organization, open-endedness, cellular automata, neural cellular automata},\n}\n```\n\n## Contributing 👷\n\nContributions are welcome! If you find a bug or are missing your favorite self-organizing system, please open an issue or submit a pull request following our [contribution guidelines](https://maxencefaldor.github.io/cax/contributing/) 🤗.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxencefaldor%2Fcax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxencefaldor%2Fcax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxencefaldor%2Fcax/lists"}