
Figure 1: Random Patterns in Life and Flip Life 
1.0 Introduction
I have
occasionally
posted
about
automata.
A discussion with a colleague about Stephen Wolfram's
A New Kind of Science
reminded me that I had started this post some time last year.
This post has nothing to do with economics, albeit it does illustrate emergent behavior. And I have
figures that are an eye test. I am subjectively original. But I assume somebody else has done this 
that I am not objectively original.
This post is an exercise in combinatorics. There are 131,328 lifelike Celluar Automata (CA), up to
symmetry.
2.0 Conway's Game of Life
John Conway
will probably ever be most famous for the Game of Life (GoL).
I wish I understood
monstrous moonshine.
The GoL is "played", if you can call it that, on an infinite plane divided into equally sized
squares. The plane looks something like a chess board, extended forever. See the left side of
Figure 1, above. Every square, at any moment in time, is in one of two states: alive or dead.
Time is discrete. The rules of the game specify the state of each square at any moment in time,
given the configuration at the previous instant.
The state of a square does not depend solely on its previous state. It also depends on the states
of its neighbors. Two types of neighborhoods have been defined for a CA with a grid of square cells.
The Von Neumann neighbors of a cell are the four cells above it, below it, and to the left and
right. The Moore neighborhood (Figure 2) consists of the Von Neumann neighbors and the four
cells diagonally adjacent to a given cell.

Figure 2: Moore Neighborhood of a Dead Cell 
The GoL is defined for Moore neighborhoods. State transition rules can be defined in
terms of two cases:
 Dead cells: By default, a dead cell stays dead. If a cell was dead at
the previous moment, it becomes (re)born at the next instant if the number of live
cells in its Moore neighborhood at the previous moment was
x_{1} or x_{2} or ... or x_{n}.
 Alive Cells: By default, a live cell becomes dead. If a cell was
alive at the previous moment, it remains alive if the number of live cells in
its Moore neighborhood at the previous moment was
y_{1} or y_{2} or ... or y_{m}.
The state transition rules for the GoL can be specified by the notation
Bx/Sy. Let x be the concatenation of
the numbers x_{1}, x_{2}, ..., x_{n}.
Let y be the concatenation of
y_{1}, y_{2}, ..., y_{m}.
The GoL is B3/S23. In other words, if exactly three of the neighbors of a dead
cell are alive, it becomes alive for the next time step. If exactly two or
or three of the neighbors of a live cell are alive, it remains alive at the next
time step. Otherwise a dead cell remains dead, and a live cell becomes dead.
The GoL is an example of
recreational mathematics.
Starting with random patterns, one can predict, roughly, the distributions of certain
patterns when the CA settles down, in some sense. On the other hand, the specific
patterns that emerge can only be found by iterating through the GoL, step
by step. And one can engineer certain patterns.
3.0 LifeLike Celluar Automata
For the purposes of this post, a lifelike CA is a CA defined with:
 A two dimensional grid with square cells and discrete time
 Two states for each cell
 State transition rules specified for Moore neighborhoods
 State transition rules that can be specified by the Bx/Sy notation.
How many lifelike CA are there? This is the question that this post attempts
to answer.
The Moore neighborhood of cell contains eight cells. Thus, for each of the
digits 0, 1, 2, 3, 4, 5, 6, 7, and 8, they can appear in Bx.
For each digit, one has two choices. Either it appears in the birth
rule or it does not. Thus, there are 2^{9} birth rules.
The same logic applies to survival rules. There are
2^{9} survival rules.
Each birth rule can be combined with any survival rule.
So there are:
2^{9} 2^{9} = 2^{18}
lifelike CA. But this number is too large. I am double counting, in
some sense.
4.0 Reversing Figure and Ground
Figure 1 shows, side by side, grids from the GoL and from a CA called
Flip Life. Flip Life is specified as B0123478/S01234678. Figure 3
shows a window from a computer program. In the window on the
left, the rules for the GoL are specified. The window on the
right is used to specify Flip Life.

Figure 3: Rules for Life and Flip Life 
Flip Life basically renames the states in the GoL. Cells that are called
dead in the GoL are said to be alive in Flip Life. And cells that are alive
in the GoL are dead in Flip Life. In counting the number of lifelike CA,
one should not count Flip Life separately from the GoL. In some sense,
they are the same CA.
More generally,
suppose Bx/Sy specifies a lifelike CA, and let Bu/Sv be the
lifelike CA in which figure and ground are reversed.
 For each digit x_{i} in x, 8  x_{i}
is not in v, and vice versa.
 For each digit y_{j} in y, 8  y_{j}
is not in u, and vice versa.
So for any lifelike CA, one can find another symmetrical CA in which dead cells become
alive and vice versa.
5.0 Self Symmetrical CAs
One cannot just divide 2^{18} by two to find the number of lifelike CA, up
to symmetry. Some rules define CA that are the same CA, when one reverses figure
and ground. As an example, Figure 4 presents a screen snapshot for the CA called
Day and Night, specified by the rule B1/S7.

Figure 4: Day and Night: An Example of a SelfSymmetrical Cellular Automaton 
Given rules for births, one can figure out what the rules must be for survival for the CA to
be selfsymmetrical. Thus, there are as many selfsymmetrical lifelike CAs as there are rules
for births.
6.0 Combinatorics
I bring all of the above together in this section. Table 1 shows a tabulation of the
number of lifelike CAs, up to symmetry.
Table 1: Counting LifeLike Celluar Automata
 Number 
Birth Rules  2^{9} 
Survival Rules  2^{9} 
LifeLike Rules  2^{9} 2^{9} = 262,144 
SelfSymmetric Rules  2^{9} 
NonSelfSymmetric Rules  2^{9}(2^{9}  1) 
Without Symmetric Rules  2^{8}(2^{9}  1) 
With SelfSymmetric Rules Added Back  2^{8}(2^{9} + 1) = 131,328 
7.0 Conclusion
How many of these 131,328 lifelike CA are interesting? Answering this question requires some definition of what makes
a CA interesting. It also requires some means of determining if some CA is in the set so defined. Some CAs are clearly
not interesting. For example, consider a CA in which all cells eventually die off, leaving an empty grid. Or consider
a CA in which, starting with a random grid, the grid remains random for all time, with no defined patterns ever
forming. Somewhat more interesting would be a CA in which patterns grow like a crystal, repeating and duplicating.
But perhaps an interesting definition of an interesting CA would be one that can simulate a Turing machine and
thus may compute any computable function. The GoT happens to be Turing complete.
Acknowledgements: I started with version 1.5 of Edwin Martin's implementation, in Java, of John Conway's Game of Life. I have modified this implementation in several ways.
References