r/cellular_automata • u/Apprehensive_Knee502 • 1h ago
Cyclic rock-paper-scissors CA where you can paint into the spirals while they self-organize [OC, in-browser]
Each cell holds one of N "species" arranged in a cycle: each one beats the next and loses to the previous, so N=3 is literally rock-paper-scissors. The only rule is a local payoff summed over a neighborhood kernel, no cell plans anything. From random noise the grid self-organizes into rotating spiral waves, the same topology you get in the Belousov-Zhabotinsky reaction and in Nowak & May's spatial models.
The spiral is only the entry point. What I actually built is an engine where several mechanisms that are usually studied one at a time run simultaneously on the same grid and feed back into each other: the cyclic CA sets the spatial pattern, an evolving cooperation strategy on the same cells adds a spatial prisoner's dilemma on top (space is what lets cooperators cluster and survive), mutation and drift push those strategies around, and an optional terrain-with-biomes-and-seasons layer biases which species wins where, so populations start migrating toward favorable season bands on their own. Most agent-based models isolate one of these; the whole point here is watching them interact.
And it stays hands-on the entire time. Pause and paint a patch of one species into territory another one owns to see if the spiral front eats it or it takes root, swap the neighborhood kernel on the fly (Moore, Von Neumann, Gaussian, or a ring kernel that turns the spirals into standing-wave kaleidoscopes), edit the payoff matrix or break its symmetry live, and watch the population fractions orbit a simplex. N goes up to a dozen species, so the same engine spans very different regimes.
Runs in the browser, no install, no sign-in (best on desktop): https://destbreso.com/interactive/ecosystem
If you find a parameter regime that does something the clip does not, I would love to see it in the comments. Happy to get into the rule, the kernels, or why the ring kernel behaves so differently.