Wolfram code
Wolfram code is a name often used for the method of enumerating elementary cellular automaton rules used by Stephen Wolfram in his book A New Kind of Science.[1]
The code is based on the observation that a sequence of n cells, each having one of m possible states, may be interpreted as an n-digit m-ary number. The Wolfram code for a particular rule is a number in the range from 0 to mmn−1 (where n is the size of the neighbourhood), usually expressed in decimal notation, which may be calculated as follows:
- List all the possible state configurations of the neighbourhood of a given cell.
- Interpreting each configuration as a number as described above, sort them in descending numerical order.
- For each configuration, list the state which the given cell will have, according to this rule, on the next iteration.
- Interpret the resulting list of states again as a number. This number is the Wolfram code.
The Wolfram code does not specify the size (nor shape) of the neighbourhood, nor the number of states — these are assumed to be known from context. When used on their own without such context, the codes are often assumed to refer to the class of two-state one-dimensional cellular automata with a (contiguous) three-cell neighbourhood, which Wolfram extensively investigates in his book. Notable rules in this class include rule 30 and rule 110.
References
- ^ Wolfram, Stephen, A New Kind of Science. Wolfram Media, Inc., May 14, 2002. ISBN 1579550088