Transcript
Page 1: A survey of cellular automata like the “game of life”

PHYSlCA ELSEVIER Physica A 240 (1997) 560-570

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

A.C. de la T o r r e * , H . O . Mf i r 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 C o n w a y [1], is the mos t famous cellular a u t o m a t o n

on a two-dimens ional lattice with totalistic rules of evolution. After it became popular ized [2] extensive studies were done concerning the m o r p h o l o g y as well as the statistical propert ies [1 7]. One-d imens iona l extensions of the game were made [3,8], s tochastic componen t s were in t roduced [-9] modifying also the rules of evolut ion [10]. The soli tary game is p layed on a square lattice with sites that can be occupied (live) or

emp ty (dead). Each site has eight neighboring sites (four nearest and four next to nearest). An emp ty site at t ime 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 t ime t + 1 the lattice is s imul taneously changed removing all particles in fatal sites and placing particles in all fertile sites. The game starts with a r a n d o m distr ibution of individuals and evolves, according to the rules, to a final state with density close to 0.03 after approx imate ly 1000 t ime steps. The beauty of the game is to watch the structures and "animals" formed in this evolution. The game of life is therefore character ized by an interval of fertility I I = [3, 3], and a survival interval

* Corresponding author. E-mail: [email protected].

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

Page 2: A survey of cellular automata like the “game of life”

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 , f 2 ] 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

Page 3: A survey of cellular automata like the “game of life”

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

350 -

300 -

250 -

200 -

150 -

100 -

5 0 -

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

2 0 0

1 0 0

0 ¸

0,0 0,2 0,4 0,6 0,8 1,0 Act iv i ty 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.

Page 4: A survey of cellular automata like the “game of life”

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

< c ~ c x z~q

5 ' ,

c u

8=1/(2c0 Absolute Bound

I ' I I l I ' I

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

Fig. 3. Scatter plot of the density of occupied sites 6 versus activity c~ for the same conditions as in Fig. 1.

fertile or non fertile, and the occupied ones are fatal or survival sites. Neglecting the survival occupied sites and the nonfertile empty ones, and dividing by the number of occupied sites we readily arrive at the inequality

1 6~<2~. (1)

This inequality is saturated, becomes an equality, for cases, where all occupied sites are fatal and all empty sites are fertile. We can expect that this will happen, as a necessary condition, when the fertility interval is large and the survival interval is the smallest. Indeed, all the games with density and activity saturating the bound, that is, those close to the curve 6 = 1/(2~) in Fig. 3, have fertility intervals determined by fl = 1, 2, 3;f2 = 6, 7, 8 and the survival intervals are such that sl = s2. Some examples of games falling in this class are (1, 6, 7, 7) (1, 7, 2, 2), (2, 8, 5,5), (3, 8, 1, 1).

In Fig. 3, we see that all games with high density, say above 0.85, have very low activity. Furthermore, below and to the left of the absolute bound derived above, there is a region without entries until the region where 6 ~< 1/(1 + ~) is reached. This can be understood with a mean-field model. In this mean-field model, the number of fertile sites is estimated by the number of empty sites times the probability that the number of neighbors fall within the fertility interval. The rate of fertility (ratio between the

Page 5: A survey of cellular automata like the “game of life”

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 86¢1. 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

Page 6: A survey of cellular automata like the “game of life”

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

f rom zero or one. Al though we can not expect the mean-field model to give an

adequa te and precise descript ion of the games, some features of the da ta shown in

Figs. 1-3 can be unders tood with the model. Fo r instance, consider the case where the intervals of fertility and survival are equal. Tha t means that F(6, I I ) = F(6, I~ }. F rom the mean-field equat ions 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 a lmost vanishing density. The cor responding entries fall within 15% from the line 6 = 1 - c~.

With ano ther mean-field argument , we can try to identify the games falling in the

region a round (~ = 1, 6 = ½). These cases cor respond to F(6, I s ) = 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 cor respond to the excess of the peak at ,5 = ½ in the h is togram 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 requi rement produces an overest imate. A better result is obta ined if

we allow some deviat ion in the n u m b e r of neighbors requiring not only 4 but also 3 and 5. (This is equivalent to taking the probabi l i ty function F(6, I) as a piece-wise linear, cont inuous function, convolu ted with a '~putse" with width cor responding 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 condit ions, mak ing 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. Tha t is, they are not in the cluster, but also not too far away.

Mean-field a rguments are not a lways successful in predict ing the games cor responding 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 m a n y others belong to

other regions of the scat ter plot. A similar s i tuat ion arises in the a t tempt to predict the

games in the stripe ending at (6 = 0.20, :~ = 1), and star t ing 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 conta ining two neighbors, or with two neighbors as bound. This set of games includes the games appear ing in the stripe but also contains other games not on the stripe.

3. Morphology of some games

The mos t amus ing feature of the games is their morpho logy . M a n y games were inspected but no systematic relation between the structures formed and the set of pa ramete r s defining the game could be found. In this search, m a n y interesting cases were observed. The reader is urged to write a simple p rog ram and enjoy observing the games presented here and perhaps finding others. U p o n request, we will p rovide

Page 7: A survey of cellular automata like the “game of life”

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. ! t t t 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 ~ ] l T m - ' 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 JTn '-=- '

I Ir,,= ,.-,=E::_- = • .,,i ! IF'~----- - - - . ,==~-l l 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 initial random density 0.3 after reaching the "ferromagnetic" phase.

Page 8: A survey of cellular automata like the “game of life”

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

high activity and the third one has frozen regions mixed with active disordered regions like in a solid-liquid mixture. There are few examples, also with differing activity that develop to "labyrinths" structures. Some of these (3, 3, 1, 4), (3, 8, 5, 6) and (1, 2, 1, 4) are shown in Fig. 5. The games (4, 5, 4, 6) and (4, 8, 5, 8) among others, with an initial density around 0.5 decrease to islands with active borders, whereas (4, 5, 2, 8) with a density above a critical value around 0.25, grows until a complete coverage is reached. The game (3, 3, 4, 8) with 0.3 initial density has regions with active borders that also grow to complete coverage. The game (4, 8, 4, 7) has borders that grow in concave regions. If the initial density is below 0.3, it results in islands with evaporating lakes inside. Some games show strong dependence on the initial density. For instance, (5, 8, 4, 8) with initial density below 0.2 decays to the vacuum. With density close to 0.5, it ends up in a percolating structure, shown in Fig. 6, and with 0.75 initial density it covers all the lattice. Amusing are games like (3, 8, 5, 8), shown in Fig. 7, and (2, 7, 5, 8) or (3, 7, 5, 7), that we call "phases in combat" because a structure is formed initially with a few regions with a different structure, growing until a complete coverage of the lattice is reached. The game (1, 4, 1, 5) also resembles a solid liquid mixture with active disordered regions coexisting with passive crystalline ones. A wining phase is also seen in (3, 3, 4, 8), where the population decays initially to a minimum and then grows. The movement of drops of oil on water surfaces caused by surface tension is similar to the evolution of the games ( 3, 7, 1, 1), (3, 4, 3, 6) and (3, 7, 4, 4), with initial densities around 0.15. Complete coverage is achieved in (2, 8, 3, 8)

- ~ , , s . - . . ~ . o . . S l . - ~ s - - - s z ..s L.... z ~ s . . . z ~ t s , ~ . z t _ ~ o

- - 7 , " ' - " - . . . . . ~ = t , l . t = ~--~t';-:~----~_ ' t l 7:. -,I' ,- i , ," :J 2 1 I [ " ,<

- t ' l s ~. - - ~ . ~ . . - . - . l-.~-.-i - . . i I-

t t '.: - " . - - i i....i.i,..l i - - " r:'. , ' I . " " "

• fi~.J-~'~ l ~ t , : . l - ~i::::: i t'l r j

G a m e ( 3 , 3 , 4 , 4 )

Fig. 5. T h e g a m e (3, 3, 1, 4) rap id ly r e a c h e s a l a b y r i n t h s ta t e w i t h v a n i s h i n g ac t iv i ty .

Page 9: A survey of cellular automata like the “game of life”

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

G a m e (5 ,8 ,4 ,8 )

Fig. 6. The game (5, 8, 4, 8) with initial density around 0.5 reaches a percolating state. Lower values lead to the vacuum and higher ones to complete coverage.

r t . ~ . s U-:J ,

"::: I ~.7:::.... " -2.'!..~'I! ~a i ll.-'.:'lll" ~ E r.U.7.~.l i ~'i

Ff, i l l ~ l " n ' , L , & i "

U

I t ~ i - l - , ' i - i . ~ ; _ . . ~.~ ::

..,7'~ ~I !!.L~--lll~lTi ~.IYJ.iiii:',ii

- : = . n . , , . , - , . , . . - ! "L~-ml~i

.... - - " " - gl ' " ' t r , " - _.--~_ ~ . - - ~

G a m e (3,8,5,8)

Fig. 7. The game (3, 8, 5, 8) with initial random density of 0.3 at an intermediate state of evolution. The compact regions w i l l grow to cover a l l the lattice.

Page 10: A survey of cellular automata like the “game of life”

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

Game (1,6,1,6)

Fig. 8. The game (1, 6, I, 6) with initial random density of 0.3 after reaching the stable (but highly active) state.

and evaporating seas are found in (3, 8, 1, 7) and (2, 8, 4, 7). All the games in the cluster at (~ 2. = ~, ~ = ½) have a form resembling somewhat the cerebral cortex as shown by (1,

6, 1, 6) in Fig. 8 or (1, 7, 2, 6) among others. By the way, all these games have s2 = 6.

It is remarkable that many of the morphological features shown here, labyrinths, coexisting phases and ferromagnets can also be observed in a different cellular au tomata [10] involving a neighborhood of the four nearest sites and with

a stochastic component in the rules of evolution. In this cited case, the reduced neighborhood and the symmetries involved allowed an exhaustive study of all cases since they amount (for negligible small probabilities) to a manageable subset of the

games studied here.

4. Conclusion

Since an ocular inspection of all the 1296 games is impractical, two characteristic quantities were taken as relevant parameters for a global analysis. These are the density and the activity. For these quantities two "mean field" equations can be stated which involve the addition and the difference of the mortality and fertility rates. These two equations allow us to make several predictions that are satisfied beyond the expectations that we may reasonably have for the usefulness of these global arguments that neglect all correlations. With these arguments we could, for instance, establish

Page 11: A survey of cellular automata like the “game of life”

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

which games correspond to some of the regions in the 6, ~ plot. As happens in many self-organized systems, there is a very rich variety of structures resembling shapes found in nature. Several interesting games were found covering a wide assortment of shapes and activity. The rich variety of shapes opens up the possibility of using appropriate games to model the evolution of real systems. However the search is blind because no systematic correlation between the morphology and the parameters of the game has been found. In a search for a game with similar characteristics as "life" (3, 3, 2, 3), all games with 6 < 0.2 and ~ > 0.01 were inspected. They are nearly fifty. Expect for "life" and (4, 6, 1, 4) that take longer, all these games soon reach a stationary state, typically after 15 steps. No game was found with features as fascinating as those of "life".

Acknowledgements

This work has been carried out with partial support from "Consejo Nacional de Investigaciones Cientificas y T6cnicas" (CONICET), Argentina. We would like to thank E. Albano, R. Bucetta, L. Braunstein and M. Hoyuelos for their help and comments.

References

[1] E.R. Berlekamp, J.H. Conway, R.K. Guy, Winning Ways, Academic Press, London, 1982. [2] M. Gardner, Mathematical Games, Sci. Amer. 223 (4), 223 (5), 223 (6), 224 (l), 224 (2), 224 (3), 224 (4),

225 (5), 226 (1), 233 (6). [3] S. Wolfram, Rev. Mod. Phys. 55 (1983) 601. [4] F. Bagnoli, R. Rechtman, S Ruffo, Physica A 171 (1991) 249. [5] P. Bak, K. Chen, M. Creutz, Nature 342 0989) 780. [6] P. Bak, Physica A 191 (1992) 41. [7] C. Bennett, M. Bourzutschky, Nature 350 (1989) 468. [8] T.R.M. Sales, Phys. Rev. E 48 (1993) 2418. [9] R.A. Monetti, E.D. Albano, Phys. Rev. E 52 (1995) 5825.

[10] K. Kaneko, Y. Akutsu, J. Phys. A 19 0986) 69.


Top Related