Cellular Automata

Object-oriented Python implementations of cellular automata from scratch.

  View Code on GitHub

Cellular automata are discrete mathematical models in which each cell in a grid evolves according to a simple set of local rules. Despite their simplicity, these rules can generate surprisingly complex behaviour. The Wikipedia page is a fun read with interesting examples.

This project is a collection of some cellular automata simulations I implemented from scratch in Python using an object-oriented approach. While there are some genuine applications of cellular automata, this was just a fun exercise to make some cool patterns. Refresh the page to reload the gifs, or see them directly on GitHub.

Conway’s Game of Life

Implementation of the classic Conway’s Game of Life. Cells live, die, and reproduce based on the state of their neighbours and produces endless fascinating patterns.

Waves

A simulation where each cell distributes its intensity stochastically to neighbouring cells with wrap-around boundaries, producing ripple like patterns.

Falling Sand

A simple particle simulation where local rules approximate gravity, allowing sand to fall and pile up.