Sam Gentle.com

Automata by Example

Automata by Example

Today I'm happy to release Automata by Example, a new project where you can build your own cellular automata by just clicking around on a grid. Each click creates new cellular automata rules that lead to large scale changes across the entire grid.

I think of this project as being vaguely a successor to The Sound of Life and Scrawl, two previous projects concerning cellular automata and iterative line construction respectively. The difference here is that instead of the system being controlled directly, it's controlled by rules that you generate.

The technique, which I think of as rule generation, is something a little like direct manipulation, but with an additional generalisation step. You click the pixel you want, but instead of just setting the pixel directly, the system figures out a rule that would set that pixel and applies that rule globally. In other words, you determine the rule from the action, then use the rule to apply more actions.

It seems to work really well, provided your system is simple enough to turn rules into actions easily. The 3x3 neighbourhood grid (inspired by Conway's Game of Life) turns out to be great for this. Each click captures the 3x3 neighbourhood at the time of the click and uses that to generate a cellular automata rule that toggles the cell under the mouse and all others with the same neighbourhood.

This representation makes construction rules easy, but it's quite hard to be exhaustive. For example, if you want to match all cells with 4 neighbours you have to explicitly create every permutation as a rule. Still, there are a lot of fascinating patterns and interesting automata you can make with very few rules.

Here are a few of my favourites:

As always, you can see it in action on my demoserver or check out the code (and more technical detail) on Github.