Cellular Automaton

A HTML 5 Javascript cellular automata model.

For each frame every cell in the grid is tested. If it is currently active it is checked if the cell survives into the next frame by counting the active cells next to it, if the number matches one of the numbers in the survival set it remains active in the next frame; otherwise it dies and becomes inactive. All inactive cells can become active in a similar fashion, it's neighbouring cells are counted and if the number is in the birth set it becomes active.

You can select different rulesets in the dropdown below. Different rulesets generate wildly different behaviour, some slowly spread out, others generate complex seemingly intelligent patterns. The numbers in the brackets are the birth set and survival set respectively. To start the sequence I'm just activating a random distribution of cells in the grid and running a couple of frames of the rule set.