What is this?

So you're asking the eternal question: What the heck is a generic cellular automata simulator?

Great question! Here's the simplest explanation I can figure out.

A cellular automaton consists of a space and a rule.

A cellular automaton starts with a grid, usually (but not always) a two-dimensional grid.

Grid image

Second comes a rule. Every turn, the each cell on the grid gets a new state based on this rule.

The best known rule comes from John Conway. That rule is: any "live" cell lives if it has two or three live neighbors. Any dead cell that has three neighbors comes alive. Any other situation results in a dead cell.

But wait, what does it mean to be "alive" or "dead"? It doesn't mean a lot, that is just an easy way of thinking about it. And in fact, it's possible to have more than two states.

How many different rules are there? Honestly, there's as many as you can imagine. But if you apply certain restrictions, you can count them.

What are the limitations of this simulator?

  1. Cells are squares, which means that each cell has four neighbors. If cells were hexagonal, each cell would have 6 neighbors. Adjacencies matter for cellular automata
  2. Turns take place sequentially. That means that every cell changes at the same time. This is how pretty much all cellular automata function, but there are exceptions.
  3. That's it I think.

One-dimensional automata

It's easier to start by thinking about one-dimensional automata. A one dimensional automata just looks like a strip with alternating squares.