21 days of cellular automata
Over 21 days in May 2025, I used cellular automata as a daily sketchbook: one tool, one new constraint, one visual experiment per day. The result is CellCosmos — a browser-based playground where simple, local update rules on a grid of cells produce layered textures, landscapes, glitches, and strangely organic structures. This article is the index of that series: each entry below links to a focused post exploring one idea, and this introduction explains the underlying engine and the creative logic that connects them all.
What is a cellular automaton?
A cellular automaton (CA) is one of the simplest models of computation that can produce staggering visual complexity. You start with a finite grid of cells. Each cell holds a discrete state — at its most basic, just 0 or 1, but in CellCosmos the states can be small integers that represent different phases or ages. Time advances in discrete steps, and at each step every cell in the grid updates simultaneously according to a rule that only looks at a small local neighborhood around that cell.
In a 1D elementary CA, the canonical model studied by Wolfram, each cell’s next state is determined solely by its own current state and the states of its immediate left and right neighbors — three cells in total, giving 8 possible binary patterns and therefore 256 possible rules (Rule 0 through Rule 255).
In 2D automata the neighborhood is usually the 4 orthogonal neighbors (von Neumann) or the 8 surrounding cells including diagonals (Moore). All the visual richness you will see across these 21 articles comes from repeating that single local lookup, everywhere, over and over.
What is CellCosmos?
CellCosmos is a browser-based elementary cellular automata explorer built as a concrete demonstration of the multilingual programming project. The core automaton logic is written in French-syntax source code using the multilingual programming language, then compiled to WebAssembly (WASM) so it runs directly in the browser at near-native speed with automatic fallback to JavaScript when WASM is unavailable.
- The full source is available under the GPL-3.0 licence at github.com/multilingualprogramming/cellcosmos,
- The live tool runs at multilingualprogramming.github.io/cellcosmos with no server required — it is deployed as a static site on GitHub Pages via an automated GitHub Actions workflow that compiles the French source to WASM, verifies the expected exports, and publishes the public/ directory.
The tool exposes several interacting parameters.
The rule selector lets you navigate all 256 elementary rules by slider, number input, or the arrow buttons, and a set of named presets covers the most studied rules: Rule 30 (chaotic, used in cryptography), Rule 90 (the Sierpinski triangle via XOR), Rule 110 (proven Turing-complete), Rule 150 (XOR on three cells), Rule 184 (a traffic-flow model), and several others.
Below the selector, the eight neighborhood patterns (111 down to 000) and their output bits are displayed visually so you can see exactly which transitions the rule encodes.
The canvas itself is configurable: cell size in pixels, canvas shape (Rectangle, Circle, Ellipse, or Triangle), and initial state (seeded from the Centre or randomly distributed). On the color side, you set a background color and define a multi-stop gradient that maps cell states to hues — adding, removing, or reordering stops to completely change the visual register of the same rule.
Advanced options include a circular boundary condition (wrapping the grid toroidally), a probability parameter that makes transitions stochastic rather than deterministic, and a direction toggle between left-to-right (LTR) and right-to-left (RTL) rule application, which changes how causality flows across the image. Every configuration can be downloaded as a PNG or shared via a copied link.
The creative logic of the 21 articles
The 21 posts are not a tutorial or a formal survey. They are a logbook: each day, one question is posed and answered visually. The progression follows a deliberate arc across several themes.
Color and visual representation (articles 1–3). The series opens with the most fundamental question: what does it mean to make a cellular automaton beautiful rather than merely correct? Articles 1 through 3 move from a single color to gradient palettes and then to expanded multi-color schemes, establishing that the mapping from state to hue is itself a creative parameter, not a presentational afterthought. The same rule can read as “terrain” under one palette and as “heatmap” or “crystal” under another.
Space and the origin (articles 4–8). Articles 4 and 5 ask what happens when the seed point — the single active cell that initiates the evolution — is moved away from the canonical center of the grid. The pattern is the same rule, but its relationship to the canvas boundary changes everything about the composition. Articles 6 and 7 push this further into bidirectional and reflective symmetry: running the rule outward from the center in both directions, or mirroring the origin, produces bilateral and radial structures that feel almost designed. Article 8 synthesises these position experiments by comparing multiple configurations side by side.
Multiple seeds and clustering (articles 9–13). A single starting cell gives a clean, isolated cone of influence; two starting cells interact and interfere. Articles 9 and 10 scale the number of initial active cells from two to many, watching how interference patterns build up and how the density of seeds changes the overall texture from sparse to saturated. Article 11 examines boundary conditions: wrapping the grid toroidally versus letting the pattern hit a hard edge produces qualitatively different landscapes. Article 12 looks at how the canvas shape itself — rectangle, circle, ellipse, triangle — changes the perceived structure even when the rule and palette are fixed. Article 13 focuses on clustered random seeding, placing the initial active cells in spatial groups rather than uniformly at random, which generates local structures that collide at their boundaries.
Layered rules and multi-strata generation (articles 14–18). From article 14 onward the series moves into more complex territory: instead of a single rule applied uniformly, the canvas is divided into horizontal or vertical strata and a different rule governs each band. The resulting images have a geological quality, with distinct visual regimes separated by sharp or gradual transitions. Articles 15 and 16 vary the direction of rule generation within each stratum (LTR vs RTL, upward vs downward), while articles 17 and 18 combine vertical initialization with multi-layer application, producing chromatic chaos where competing rules fight over the same cells.
Probability and natural-looking phenomena (articles 19–20). Articles 19 and 20 introduce stochastic transitions: instead of applying the rule deterministically at every cell and every step, each transition fires only with a certain probability. At probability 1.0 the behavior is fully deterministic; as the probability drops toward 0, the evolution becomes increasingly noisy. Between these extremes lie patterns that closely resemble natural textures — erosion, diffusion, biological growth — because real natural processes are themselves noisy applications of local rules.
Reversing the flow (article 21). The final article reverses the direction of rule application from the conventional left-to-right scan to right-to-left. This changes how causal influence propagates across the grid at each time step and produces mirror-image or structurally distinct patterns from the same rule and initial condition, closing the series on the observation that even the order in which you apply a local rule is itself a degree of freedom.
Trying it yourself
Every configuration shown in the articles can be reproduced directly in the live tool. The presets cover the most-discussed rules, and the “Copy link” button encodes the current parameter state into a shareable URL, so any configuration — rule number, palette, canvas shape, seed position, probability, direction — can be bookmarked or sent to someone else. If you want to go deeper, the full source code is on GitHub: the French-syntax automaton logic, the WASM build pipeline, and the JavaScript front end are all available under GPL-3.0 and written to be readable and forkable. The series that follows is an invitation to treat the tool the same way it was used to write it: as a space for small, disciplined experiments whose results are always surprising.
1. Breathing Life into Cellular Automata with Color
2. Painting Landscapes: Cellular Automata Through Color Gradients
3. Chromatic Evolution: Expanding the Color Palette of Cellular Automata
4. Shifting Origins: Exploring Position Effects in Cellular Automata
5. Mirrored Emergence: Shifting Origin Points in Cellular Automata
6. Symmetry: Bidirectional Rule Generation in Cellular Automata
7. The Wandering Point: Reflective Symmetries in Cellular Automata
8. Pattern Emergence: How Position Transforms Cellular Automata Behavior
9. Binary Genesis: Patterns Emerging from Two Initial Points in Cellular Automata
10. The Multiplicity Effect: Scaling Initial Points in Cellular Automata Systems
11. The Edge Effect: How Boundary Conditions Shape Cellular Automata Landscapes
12. Unveiling the Grid: What Shape Reveals About Cellular Behavior
13. When Points Cluster: Unexpected Emergent Patterns in Cellular Automata
14. Rule Strata: The Aesthetic Potential of Layered Color Generation in Cellular Automata
15. Cellular Strata: Multi-Layered Automata with Spread Initial Points
16. Layered Evolution: Bidirectional Rule Generation in Cellular Automata
17. Vertical Initialization Reimagined: The Surprising Effects of Layered Rule Application
18. Chromatic Chaos: Multi-layered Rule Applications in Cellular Automata
19. Rolling the Dice on Determinism: A Probabilistic Take on Cellular Automata
20. When Three Points Meet Probability: Natural Phenomena in Cellular Automaton Patterns
21. Reversing the Flow: Right-to-Left Rule Application in Cellular Automata
Conclusion: What emerged from 21 days
The 21 articles above were published daily from May 1 to May 31, 2025, one experiment per day. They are not lessons or formal tutorials — each one asks a single focused question about how cellular automata behave under different visual, spatial, or stochastic constraints, then answers that question with images and brief commentary. The progression is deliberate: from color as representation, to space and symmetry, to clustering and boundary effects, to layered multi-rule systems, to probability, and finally to directional scanning as a hidden degree of freedom.
Across these 21 posts, several themes recur. First, color is not decoration — it is a lens. The same rule under different palettes can read as geological strata, organic growth, digital glitch, or abstract painting. Second, space matters. Moving the origin, wrapping the boundary, changing the canvas shape, or seeding from multiple points transforms the compositional structure even when the underlying dynamics are identical. Third, layering rules creates emergent complexity: when different regions of the canvas obey different local laws, the boundaries between those regimes become sites of unexpected structure. Fourth, probability bridges the gap between crisp mathematical automata and the textures we recognize from nature — erosion, diffusion, branching — because nature itself is noisy local computation. Fifth, even the order in which you scan the grid — left-to-right versus right-to-left — is a parameter, not a constant, and changing it can invert or restructure the pattern entirely.
The unifying thread is that cellular automata, despite being among the simplest computational models, are endlessly configurable once you treat them as a medium for visual exploration rather than only as objects of theoretical study. Every parameter — rule, palette, seed, boundary, shape, direction, probability — is a creative control, and the interactions between these parameters produce a combinatorial space far larger than any single article can survey. The 21 posts sample that space systematically, but they also leave vast regions unexplored: multi-state rules beyond binary, 2D neighborhoods beyond 1D scans, asynchronous updates, continuous-valued states, hybrid deterministic-stochastic transitions, and compositional strategies that treat automata as layers or textures in larger visual constructions.
If these articles have a practical message, it is this: simple local rules, iterated at scale, can generate structure that rivals or exceeds what you would design by hand, and the act of tweaking parameters — moving a slider, changing a color stop, toggling a checkbox — is itself a form of design. CellCosmos makes that process immediate: you see the result in real time, you can save or share any configuration, and you can fork the source to extend the tool in directions the original implementation does not cover. The 21 experiments documented here are a starting point, not an endpoint. The tool is open, the code is readable, and the parameter space is infinite.
Links and resources
- Live tool: multilingualprogramming.github.io/cellcosmos
- Source code (GPL-3.0): github.com/multilingualprogramming/cellcosmos
- Multilingual programming project: github.com/multilingualprogramming
Every configuration shown in the articles can be reproduced in the live tool. The rule presets, color gradients, canvas shapes, boundary conditions, probability sliders, and directional toggles are all exposed in the interface. If you want to understand how a particular image was generated, or if you want to create variations on the patterns you see, open the tool, set the parameters, and watch the automaton evolve. If you want to go deeper — to modify the rule encoding, add new neighborhood types, implement asynchronous updates, or integrate the automaton into a larger creative pipeline — the full source is on GitHub, written in French-syntax multilingual source code and compiled to WebAssembly, with all build and deployment steps automated via GitHub Actions.
This series is an invitation to treat cellular automata not as a solved problem in theoretical computer science, but as an open medium for visual experimentation. The 21 days are over, but the exploration continues.
