Project 3: Deterministic Cellular Automata 1. One Dimensional Cellular Automata (warm up) Extensive empirical study has shown that the pattern evolving from an initial state of a cellular automata takes on four qualitative different forms: (a) disappears with time, (b) evolves to fixed finite size, (c) grows indefinitely at a fixed speed, (d) grows and contracts irregularly. Different initial states with a particular cellular automaton rule can lead to patterns that are similar in form, though different in detail, or to qualitatively different patterns. Although mathematical theory concerning the long time behavior of cellular automata is not as well developed as for ODE systems and iterated maps, empirical evidence nevertheless suggests that four distinct classes can be identified showing four characteristic types of dynamical behaviors: (1) spatially homogeneous state; (2) sequence of simple stable or periodic structures; (3) chaotic aperiodic behavior; (4) complicated localized structures, some propagating. The first three classes are similar to dynamical systems behavior. The fourth class is due to the inherent spatiotemporal structure of cellular automata. This type of behavior can also be found in systems of partial differential equations. Both classes (3) and (4) typically show sensitive dependence on initial conditions. (a) To illustrate the different kinds of behavior, perform simulations and display the results for the one dimensional cellular automata with p = 2, neighborhood size k (center in the middle) and the following rule numbers n: general rules n = 128, 4, 126 for k = 3; totatlistic rule n = 52 for k = 5. A good size of the automaton is M = 256 sites. Time may range from 0 to 255 or 400. Choose initial conditions as follows: select a range of, say 8 sites, and distribute ones in that range (simple “seeds”), the other states are zero. To check sensitivity against initial conditions, run simulations for this and slightly perturbed initial conditions. (b) Another aspect of cellular automata is selforganization. This means that disordered (random) states evolve into ordered structures. To illustrate this, choose a random initial condition and run simulations for the four automata investigated in (a). Do the same for the following cellular automata with p = 5, k = 3 (center in the middle), and totalistic rule n, where n = 10175, 566780, 570090, 580020,583330, 5694390, 59123000. 1 2. Game of Life The most famous cellular automaton has been created by the British mathematician J. Conway and is called the “game of life”. The game is played on a two dimensional square lattice with periodic (or absorbing) boundary conditions. Lattice sites have values 0 or 1. A site with value 1 is said to be alive and a site with value 0 is said to be dead. The system evolves by updating all the states based on their Moore neighborhoods (all eight nearest neighbors) as follows: • A living cell with two or three living nearest neighbors remains alive. With no or only one living nearest neighbor (“cell feels lonely”), or more than three living nearest neighbors (“cell feels overcrowded”), the cell dies. • A dead cell becomes alive if and only if the cell has exactly three nearest neighbors (“two parents and a nurse”) that are alive. Note that this update rule is totalistic of type 2. Concerning lattice size and time span, a lattice diameter of 40–50 cells with time evolving up to t = 200 is just adequate when using ca2d.m (about 10 min). For larger lattices it is better to use a code designed specifically for this (or any other 2d CA) rule. (a) Start with a relatively large lattice size and choose a random initial condition. Create a movie and observe the evolution of the pattern. You should find the typical behavior of a complex CA. In your report describe your observations and document them through a selected set of, say 4 − 6 frames. (b) Much effort has been devoted to identifying stable patterns occuring in the game of life CA. Figure 1 shows a set of initial conditions which are stable or lead to stable states provided they don’t interact with other patterns. Choose these configurations as initial conditions and describe the resulting stable patterns (stationary, periodic with which period etc). Lattice sizes as in Figure 1 are sufficient for these simulations. (c) While the patterns of (b) are spatially localized, persistent propagating patterns have been identified as well. The most prominent propagating patterns are gliders and beehives. A glider is an L–shaped assembly of living cells with arcs of equal lengths that extend over three sites. Example: if the corner is at (i, j), the glider coordinates are (i + 2, j), (i + 1, j), (i, j), (i, j + 1), (i, j + 2). Beehives are horizontal or vertical “stripes” of living cells of thickness 1 and length 7, e.g. (i, j), (i, j + 1), . . . , (i, j + 7). Choose one of these patterns as initial condition (all other cells dead) and observe its motion. Then prepare an initial condition consisting of several (3 or 4 say) such objects at different locations. Describe what happens when they collide. In these simulations the lattice size should be sufficiently large. 3. Excitable Media Slime mold growth, star formation in spiral disk galaxies, cardiac tissue contraction, chemical reaction–diffusion systems and infectious disease epidemics seem to be quite different systems. Yet, in each of these cases, various spatially distributed patterns such as concentric and spiral waves are spontaneously formed. The cause of the formation of 2 these structures is that all of these systems are excitable media, consisting of spatially distributed elements, subsequently returning to a quiescent state in which they are again receptive to being excited. The cycle between excited, refractory and receptive states that characterizes these systems can be modeled with multi–state cellular automata. We consider two such models. (i) Greenberg–Hastings model of neuron excitation This CA has been used to model neuron excitation and recovery in a network of neurons. It takes place on a two–dimensional square lattice with periodic boundary conditions. Lattice site states range from 0 to p − 1 as usual. In neurophysiological terminology we say a neuron (site) in state 0 is excited, a neuron in state p − 1 is said to be rested, and a neuron in an intermediate state is said to be recovery. The CA evolves by updating lattice sites based on von Neumann neighborhoods (four nearest neighbors) according to the following rules: • A rested neuron (state p − 1) with at least one excited neighbor (state 0) becomes excited (state changes from p − 1 to 0). • A rested neuron with no excited nearest neighbor remains rested (remains in state p − 1). • A neuron that is not in the recovery state (i.e. it is in a state between 0 and p − 2) goes to the next recovery state (state value increases by 1). (ii) Cyclic space CA This model is a variant of model (i) allowing the recovery process to proceed only if a neighboring neuron is in the next higher recovery state. Thus the first two rules are as in model (i), whereas the third rule is replaced by the following: • A neuron in state j with 0 ≤ j ≤ p − 2 changes its value to j + 1 if at least one neighbor is in state j+1. If no neighbor is in state j+1, the neuron remains in state j. (a) Start from random initial conditions and a simple ”seed” (one cell in the excited state, the other cells in the rested state), and observe the evolution of the two models. It is worth to choose a relatively large lattice size (100 × 100 say) and a large value of p, say p = 15. You should observe that both systems eventually evolve to expanding and merging “target waves” of diamond shape, however, while this state is reached relatively fast for model (i), model (ii) shows a long transient phase in which the pattern appears disordered. The transient phase is due to the delay in the recovery process. To make this quantitative, give a rough estimate of the probability that a neuron in state j < p − 1 reaches state j + 1 at the next time step. (b) For model (ii) choose also special initial conditions in the form of loops. A loop is defined as a closed chain consisting of cells having two nearest neighbor cells whose states differ from the cell state by 1, 0 or −1, all other cells are in the rested state. When the sum of the state differences along the loop is nonzero, the loop is called a defect. 3 (a) (b) (c) (d) (e) (f) (g) (h) (i) Figure 1: Initial conditions leading to stable patterns for the game of life CA. 4