Cellular Automata : not quite random

Cellular Automata ( CA ) are simple machines that work on a tape, they see a limited view of their tape and follow a few set rules.

They vary in breadth of vision and complexity but simple CA can create complex patterns.

An interesting subset of CA can see only three objects at a time, each object can have two states 1 or 0 and each state has an associated rule.

The task of the CA at each step along its tape is to assess its environment and make a decision, whether to assign its value 1 or 0.

The CA’s decision is determined by the state of the objects in its view and its rule set, the objects in view each have two possible states so there are 2^3 unique combinations of state that these three object's can be in, giving 8 in total.

The rule set provides a 1 or 0 value for each of these 8 possible states, giving 2^8 possible sets of rules, 256 unique rules in total.

Each ruleset number's binary representation lays out the value to be assigned

Rule 1 matches a 1 value only when all three cells in view have a value of 0, any cell with a 1 value will result in a 0 value being assigned, iterating this over rows viewed three cells at a time produces a pattern.

Each row represents one iteration of the tape, the top most row is the initial condition of the tape and each row below is the result the CA has created by assigning a value according to its rule set.

Some rulesets are more interesting than others, some produce regular patterns, some just look like white noise but others create patterns seemingly on the border between predictable structure and noise.

For example rule 126 produces a mixture of repeating motifs, not predictable but not entirely random either.

Further patterns can be extracted from this ruleset by adjusting the initial conditions on the tape, the top row of the image.

These CA were taken from Stephen Wolfram’s A New Kind of Science and I’ve made a program available on GitHub if you’d like to play around with them.

More recently researchers have applied machine learning techniques to discover more complex CA, the patterns that emerge from simple rules are fascinating and there’s a lot more to explore.

Thanks for reading

Please get in touch by email or by twitter if you have any questions or follow ups

Niall McGinness