# A survey of cellular automata like the “game of life”

Post on 14-Jul-2016

212 views

Embed Size (px)

TRANSCRIPT

PHYSlCA ELSEVIER Physica A 240 (1997) 560-570

A survey of cellular automata like the "game of life"

A.C. de la Tor re* , H .O. Mf ir t in

Departamento de Fisica, Universidad Nacional de Mar Del Plata, Funes 3350, 7600 Mar Del Plata, Argentina

Received 2 July 1996; revised 23 September 1996

Abstract

The density and activity (defined as the average between the rate of fertility and the rate of mortality) for all games similar to the "game of life" has been calculated after 1000 time steps in a 100 100 lattice. Mean-field arguments that describe some global features are presented. A morphological description for many games resembling shapes found in nature is given.

PACS: 05.50 + q; 05.70.Ln; 02.70 + d; 89.90. + n Keywords: Game of life; Self-organized structures; Mean field

1. Introduction

The game of life, invented by Conway [1], is the most famous cellular automaton on a two-dimensional lattice with totalistic rules of evolution. After it became popularized [2] extensive studies were done concerning the morphology as well as the statistical properties [1 7]. One-dimensional extensions of the game were made [3,8], stochastic components were introduced [-9] modifying also the rules of evolution [10]. The solitary game is played on a square lattice with sites that can be occupied (live) or empty (dead). Each site has eight neighboring sites (four nearest and four next to nearest). An empty site at time t is fertile if it has exactly 3 neighbors and an occupied site is fatal if it has less than two or more than three neighbors. Otherwise, it is a site of survival. At time t + 1 the lattice is simultaneously changed removing all particles in fatal sites and placing particles in all fertile sites. The game starts with a random distribution of individuals and evolves, according to the rules, to a final state with density close to 0.03 after approximately 1000 time steps. The beauty of the game is to watch the structures and "animals" formed in this evolution. The game of life is therefore characterized by an interval of fertility I I = [3, 3], and a survival interval

* Corresponding author. E-mail: dltorre@uni.mdp.edu.ar.

0378-4371/97/$17.00 Copyright ~, 1997 Elsevier Science B.V. All rights reserved PII S0378-43 7 1 (97)00046-0

A.C. de la Torre, H.O. Mitrtin /Physica A 240 (1997) 560- 570 561

1~ == [2,3]. A natural question is, how do other "games" look like for arbitrary intervals of fertility I I = [ f t , f2 ] and of survival Is = I-s1, s2]. This work is devoted to such a question. Each set of parameters (fl ,J), sl, s2) defines a game. Considering that the parameters can take integer values from 1 to 8, there are 1296 games. Many games were observed on the computer screen. Some of them are boring and others, that will be reported later, are interesting.

2. Survey of all games

In this study, all 1296 games were run for 1000 time steps on a 100 x 100 lattice with periodic boundary conditions, and with different initial densities of 0.001, 0.1, 0.3, and 0.5. The computer requirements are reasonable for 486-based or similar PC. In these runs, the final density of occupied sites 6 and the activity ~ of the final state were calculated. The density is defined as the ratio between the number of occupied sites and the total number of sites. The activity of a state is defined as the average between the mortality and the fertility rate. That is, the mean value between the number of particles in fatal sites and the number of fertile empty sites, divided by the number of particles (not sites). In the runs with 1000 time steps a histogram of the di~'erence between the fertility and mortality rate was produced. It turns out that the rate of mortality and fertility are equal within 2% indicating that the number of individuals is not changing significantly and a stationary (but possibly with nonzero activityt state was reached. "Stationary" is meant here in a statistical sense for all games. There are some games that have not reached a stationary state but the data show that their number is small. In other words, the statistical results will not change if we increase the number of steps. Furthermore, a comparison of the histograms for the density as well as for the activity shows no significant dependence on the initial density except for the cases with very low initial density (0.001) where more games decay to the vacuum. This is indicative that there are games with a critical density. These two facts are well known for "life" (3,3,2,3) [-4].

In Figs. 1 3, histograms for the final density of occupied sites and activity, as well as a scatter plot of density of occupied sites versus activity are shown for all games, five runs each, during 1000 time steps, with an initial density of 0.5.15 % of the games end in the absorbing state 6 = 0 after a short time, typically 10 steps. From the density histogram, we can recognize three regimes: one of very low density, up to 0.15, an intermediate regime with a strong peak at 6 = 0.5 and a high-density regime above 0.85. This third regime is characterized by a very low activity as seen in Fig. 3. The activity has two strong peaks near zero and one and an enhancement at ~ = 0.5. The scatter plot of density versus activity shows clustering, forbidden regions and strips presumably caused by the discrete nature of the fertility and survival intervals. Some of these features can be understood by simple arguments.

We can easily derive an absolute bound in the scatter plot. For an L x L lattice, L 2 must be equal to the sum of the occupied plus the empty sites. The empty sites can be

562 A.C. de la Torre, H.O. Mfirtin / Physica A 240 (1997) 560-570

350 -

300 -

250 -

200 -

150 -

100 -

50 -

0 !~1t

0,0 0,2 0,4 0,6 0,8 1,0 Density

Fig. I. Density of occupied sites distribution for five runs of the 1296 games not including the games that decay to the vacuum. The runs started with 0.5 initial random density and stopped at 1000 steps. The first bin contains games with very small but not zero density. There is a total of 5495 entries.

400 1968 entries

300

200

100

0

0,0 0,2 0,4 0,6 0,8 1,0 Activity c~

Fig. 2. Activity distribution for the same conditions as in Fig. 1. The first bin has been scaled down by a factor of four.

A.C. de la Torre, H.O. M~rtin /Physica A 240 (1997) 560--570 563

1,0

0,8 C

E3

0,6

0,4

0,2

0,0

6= 1/( 1 +c~)

~ ean Field Bound

564 A.C de la Torre, H.O. Mhrtin/Physica A 240 (1997) 560-570

number of fertile and occupied sites) is then (1 - 3)/3 F(3, II), where F(6, I) is some function close or equal to 1 if 83 ~ I and to zero if 861. In a similar way, we estimate the mortality rate to be (1 -F (b , I=)). For the stationary state we get the set of equations

0 -- ~F(3 , I+) - (1 - V(6, Is)),

!(1-6 ) ~=2\ 6 F(a ' I I )+ l -F (6 , I=) . (2)

These equations can be written as

6 F(6, I f ) = ~ 1 -- 6'

F(6, I=) = 1 -- ~. (3)

Here we see that, from F(6, I i ) ~< 1 it follows that 6 < 1/(1 + ~). This mean-field bound, shown by the corresponding curve in Fig. 3, is violated by the games close to the saturation of the absolute bound mentioned above, but is clearly seen in the scatter plot. The mean field bound is valid regardless of the way in which we define the probability F(6, I). Therefore, it is true for all mean-field models. Other men-field predictions are much weaker because they depend on the shape of F(6, I). Furthermore, the equations above are not complete in the sense that they do not force a "one-to-one" map between the set of games (I I, I=) and the pairs (3, ~). For example, all games (Iy, Is) have an image at (6 = 0, ~ = 1) for all mean-field models with F(0, I) = 0. We should therefore not expect to get a good description of the data with them. It is indeed surprising that in some cases mean-field arguments using these equations are successful.

One should notice that the Eqs. (3) and the bound derived from them, as well as the absolute bound (1), are independent of the coordination number and can therefore be also applied to other totalistic cellular automata. This generality suggests that, besides the density, the activity is a useful relevant parameter for the description of these systems.

If the function F(6, I) were strictly zero or one and discontinuous, the above equations would have four solutions, namely: (~ = 0, 6 = 1); (a = 1, 6 = ); (~ = 0, 6 = arbitrary); (~ = 1, 6 = 0). These solutions contribute to the peaks at a = 0 and

= 1 in the histogram of Fig. 2 and to the peaks at 0, and 1 in the density histogram of Fig. 1. Indeed, 60% of the games fall within these peaks. If the function F(6, I) is taken with a continuous rise from zero to one, more or less steep, the region between these four solutions is populated. However, the numerical solutions of the equations show structures and distributions quite sensitive to the shape of the function. Anyway, for later arguments it is important to emphasize that the games in the region between the four solutions mentioned above, correspond to densities (neighbors) close to the boundaries of Iy or I=, (or both) causing the functions F(6, I) to take values different

A.C. de la Torre, H.O. Mhrtin/Physica A 240 (1997) 560-570 565

from zero or one. Although we can not expect the mean-field model to give an adequate and precise description of the games, some features of the data shown in Figs. 1-3 can be understood with the model. For instance, consider the case where the intervals of fertility and survival are equal. That means that F(6, I I ) = F(6, I~ }. From the mean-field equations it follows that ,5 = 1 - ~. This behavior is also seen in all the games with equal intervals except for a few cases like (3, 3, 3, 3), (4, 5, 4, 5), (4, 6, 4, 61, which have almost vanishing density. The corresponding entries fall within 15% from the line 6 = 1 - c~.

With another mean-field argument, we can try to identify the games falling in the region around (~ = 1, 6 = ). These cases correspond to F(6, Is) = 1 and F(6, Iv) = 0 and are seen in a cluster of the scatter plot (Fig. 3). The number of games in this region correspond to the excess of the peak at ,5 = in the histogram of Fig. 1. Since the mean number of neighbors is 4 we could require that 4 should belong to I s and it should not belong to I,. This requirement produces an overestimate. A better result is obtained if we allow some deviation in the number of neighbors requiring not only 4 but also 3 and 5. (This is equivalent to taking the probabil ity function F(6, I) as a piece-wise linear, continuous function, convoluted with a '~putse" with width corresponding to one neighbor). Therefore, we ask that the integers 3, 4, 5 should belong to I t, and should not belong to Is. There are 12 possible fertility intervals and 9 survival intervals satisfying these conditions, making a total of 108 games. Of these, 92 are found in the cluster at 6 = 0.50 _+ 0.05; :~ = 1.00 _+ 0.05 in Fig. 3. The 16 missing games have density close to 0.5 but lower activity down to 0.75. That is, they are not in the cluster, but also not too far away.

Mean-field arguments are not always successful in predicting the games corresponding to some region of the scatter plot of Fig. 3. For example, a mean-field analysis for the cluster of games at (6 = 2, ~ = ) would lead us to the games with 5 or 6 neighbors as bound for the survival interval and 5 and 6 included in the fertility interval. Some of these games are indeed in the cluster but many others belong to other regions of the scatter plot. A similar situation arises in the attempt to predict the games in the stripe ending at (6 = 0.20, :~ = 1), and starting at (6 = 0.33, ~ = 0.51. An educated guess can predict a fertility interval I s with two neighbors as bound and a survival interval I~ not containing two neighbors, or with two neighbors as bound. This set of games includes the games appearing in the stripe but also contains other games not on the stripe.

3. Morphology of some games

The most amusing feature of the games is their morphology. Many games were inspected but no systematic relation between the structures formed and the set of parameters defining the game could be found. In this search, many interesting cases were observed. The reader is urged to write a simple program and enjoy observing the games presented here and perhaps finding others. Upon request, we will provide

566 A.C. de la Torre, H.O. Mhrtin/Physica A 240 (1997) 560 570

a Fortran code for this. The first observation is for populations that grow from a very low density state, say 60 -- 0.001. Around the seeds, beautiful structures grow with boundaries that in some cases are impenetrable and in others are not, when two boundaries collide. One also finds, inside the boundaries, cases of high and low activity. As examples for these four cases, the reader may try (1, 2, 6, 8), (1, 6, 5, 7), (1, 6, 6, 6), (1, 4, 1, 7). When the boundaries are penetrable, the population grows to a seemingly disordered state because the randomness in the location of the seeds is propagated to all the lattice. As mentioned before, global statistical features for all games are independent from the initial density (provided it is no too low). There are however few individual games whose final state depend on the initial density. Some interesting games show the existence of a critical initial density below which the population evolves to the vacuum. For instance, (4, 5, 4, 8) has a critical density close to 0.2 and (3, 3, 3, 7) close to 0.05. In the game (3, 7, 1, 1), a critical density of 0.1 separates two distinct phases. One with very small density and activity and another with ~ ~ 0.5 and e ~ 1. Something similar happens with the game (3, 6, 4, 8) where a low density-high activity phase is separated from a high density and low activity phase by a critical initial density close to 0.15. Starting with higher densities, say 0.3, interesting structures are formed. Some of the most interesting finding are: (4, 4, 1, 4), (1, 7, 5, 6) and (1, 3, 1, 4) showing something like ferromagnetic domains, where some regions of the lattice are organized with a preferred direction and others with an orthogonal "magnetization". The first of these is shown in Fig. 4. The second case has

" t l i t i t t t t t t t t l '~ ' ; t ! i t t l t t t . . . . ~__~'u . t t t t t t t F I i l i l i l l i l I I I l i l I i l t i l I I I I I I - - - - ' - - . l i l i l ' . l l t l i i l t l ! "I t_i. !ttt 1tt t-. t" i t i i i l i i i i l l l I . l . =t i t l l l l~] lTm- ' l t i , l l v i , ! l I I I I r . ~ i l I ~ .~. i l i l i~ I l i l l l l 1 8"1 l i l i i . I i l l l l l J i l l " " " ' " " " " "

-- - W ,rtllllilllil!llllli . . , - - , .......... _,, I I, ,,i II

UJI J Tn '-=- ' I Ir,,= ,.-,=E::_- = .,,i ! IF'~--------. ,==~-ll l l l l l l trr = . i ~ .~: :1 : i ! l.q i i i i t i.

Game (4,4,1,4)

Fig. 4. The game (4, 4, 1, 4) with init...

Recommended