🧪 We're running a cheminformatics notebook competition!

Enter by October 4
2 / 103
Cellular Automaton

Cellular Automaton

by marimo team

Art from a cellular automaton using matplotlib; inspired by Simone Conradi.

About this notebook

This notebook simulates a voter model, a cellular automaton in which every cell copies the state of a random neighbor at each step. Over many steps, the random copying merges the states into large connected regions, and the notebook renders the final grid as art with matplotlib.

A form with sliders controls the simulation: the random seed, the number of states, the grid size, the number of steps, and the starting block size. Press "Make art!" to run the simulation and watch its progress bar.

A second set of controls changes only the rendering, not the simulated grid. You can smooth the regions with a mode filter, soften them with a Gaussian blur, blend the two layers, and choose a color palette. The notebook was inspired by an art piece by Simone Conradi.

Related notebooks