Justine Seastres Cellular Automata and the Game of Life
Total Page:16
File Type:pdf, Size:1020Kb
Justine Seastres Saint Mary's College of California Department of Mathematics May 16, 2016 Cellular Automata and the Game of Life Supervisors: Professor Porter Professor Sauerberg 2 Contents 1 Introduction 1 2 A Closer Look at Cellular Automata 3 2.1 Key Characteristics . .3 2.2 State . .3 2.3 Dimension . .3 2.4 Neighborhoods . .3 2.5 Local Update Function . .3 2.6 Conclusion . .4 3 One-Dimensional Cellular Automata 5 3.1 Definition . .5 3.2 Local Transition Function . .5 4 Two Dimensional Cellular Automata 6 5 Example: Conway's Game of Life 7 5.1 History . .7 5.2 Description . .7 5.3 Rules . .7 5.4 Mathematics of the Game of Life . .9 5.5 Drawing out a Life Board . 10 5.6 Pattern Emergence . 11 5.6.1 Still Life . 11 5.6.2 Oscillators/Life Forms . 11 5.6.3 Spaceship . 12 5.7 Garden of Eden . 12 5.7.1 Definitions . 13 5.7.2 Moore-Myhill Theorem . 13 5.8 Applications in the Real World . 15 5.8.1 Physical Reality of the Universe . 15 5.8.2 Biology . 15 5.8.3 Computers and Cryptography . 16 5.9 Bibliography . 18 1 Introduction \Cellular automata may be viewed as computers, in which data represented by initial configura- tions is processed by time evolution" -Stephen Wolfram Cellular Automata is an idea formulated in the 1940s by John von Neumann, a Hungarian- American mathematician. He had previously attended the University of Budapest to study chemical engineering, later earning his doctorate in mathematics. Through his interest in both fields of study, Von Neumann began to develop this idea of self-reproduction. He first explored this topic using three dimensional models. His first failed attempt at this concept involved imple- menting replication through robotics. Afterward, studying liquid motion allowed him to further 1 observe how different patterns could emerge over certain amounts of time, which influenced Von Neumann even more when studying discrete models. Later on, he was especially interested in biological phenomenon, and how they could be manipulated and demonstrated through a ma- chine. Over the course of 30 years, he and his partner Stanislaw Ulam researched and developed this discrete model and new dynamical system. Their research was primarily focused on the basic ideas of self-reproduction and adaptation, with his work being analogous to the idea of DNA being the instructions for copying preced- ing cells. A main component of Von Neumann's study was the adaptation of self-reproducing machines, which have the ability to replicate themselves. When applied to these machines, this action can lead to solving self-generated complex and abstract problems. In particular, there are certain machines which function under conditions set by its neigh- boring environment. We can think of this machine in graphical terms, by considering a model consisting of an infinite array of cells in a Euclidean plane, similar to the layout of a checker- board. Each square, or cell, is surrounded by other cells and each has its own previously defined active or inactive \state". After some time, this lattice of cells reproduces itself through each time step, with the cells either evolving into a new state or maintaining their active status, based on its surrounding cells. Based off of the size and capability of this computing machine, these changes could lead to evolution or self-reproduction. We note that specific cellular automaton is obtained from a cellular space by admitting only a finite, connected set of cells on the checker- board. Therefore, the discrete time steps and evolution of this distinct portion of the grid as a whole is considered local to only those specific cells. More information on the general rules and properties of neighboring cells will appear later on in this paper. Therefore, with this knowledge, we can now define a cellular automaton as the collection of \colored" cells on a grid that evolves through a number of discrete time steps according to a set of rules based on the state of neighboring cells. In other words, it is the coupling of cells based on a particular rule set. We refer to the plural of this as cellular automata. With John von Neumann's revolutionary work towards the automata theory, we are able to gain insight into various fields of study, from computational universality, computer processing, cryptography, and even other sciences related to biology! Von Neumann even created the first virus using cellular automata, and is now known as the \Father of Computer Virology." But for now, we will focus on the logistics of cellular automata, and its importance and adaptation towards creating the idea of the Game of Life. 2 2 A Closer Look at Cellular Automata 2.1 Key Characteristics When studying these dynamical systems, we must observe that cellular automata are defined by uniformity, sychronity, and locality. Definition 2.4.1. For a group of cells to be defined under uniformity, all of the states of the cells are updated by the same rules. Definition 2.4.2. The synchronity of a cellular automaton is defined as the state of all cells being updated at the same time. Definition 2.4.3. The locality refers to the set of rules being applied to the specified cells in the specific, or "local", finite lattice of cells. We can now study the specific properties of cellular automata. 2.2 State We write S for the finite set of states.A state, denoted as s, where s 2 S is one of the the one or more finite numbers that determines the cell's condition. It was mentioned earlier that a cellular automaton is a collection of colored cells, which can indicate the state of the cell. The simplest, most common case is when there are two different states. There are various ways to define these states: active/quiescent, alive/dead, on/off, 0/1, black/white. 2.3 Dimension We can denote a d−dimensional cellular space as Zd, where the cells it consists of are the elements of this space. We observe a d-dimensional figure; we restrict our observation regarding this area of study to d ≥ 2 dimensions. A one-dimensional figure is presented as a row, whereas a two-dimensional figure gives us a wider range of rows resulting in various shapes, the most common of which is a square. 2.4 Neighborhoods A neighborhood consists of all the cells surrounding the observed, central cell in Zd. The neighborhood vector with size k is N = (n1; n2; :::; nk) d for all nk 2 Z . In other words, each element nk identifies the relative locations of the d neighboring cells, where n 2 Z has k neighbors n + np for p = 1; 2; :::k. 2.5 Local Update Function The state of a cell is affected at some discrete time step, t. A cellular automaton evolves through this transition function. This local update function governs how each cell changes its state from the present state to the next. It can be denoted as f : Sm ! S 3 The change of each cell's state is based on a set of rules that utilizes the present state of the cell and its neighbors. At the end of each time step, we see a resulting pattern arise, known as the configuration, c. These instantaneous patterns are functions written out as d c : Z ! S Thus, the state of each cell n 2 Zd is c(n). 2.6 Conclusion In the end, to be able to fully define a cellular automaton, one must be able to identify these properties: 1. Dimension of d 2 Z+ 2. Finite state set S 3. Neighborhood vector N = (n1; n2; :::; nm) 4. Local Update Function c : Zd ! S Under these properties are we able to contain and observe the behavior of these self-replicating machines. 4 3 One-Dimensional Cellular Automata 3.1 Definition A one-dimensional cellular automaton refers to a configuration having d = 1 dimension.[5] Therefore, the cells are displayed side-by-side in a row, with two neighboring cells, and are indexed by Z: ci−2 ci−1 ci ci+1 ci+2 3.2 Local Transition Function We now consider a neighborhood surrounding the cell c with a range r that represents the cells to the left and right of c. Thus, the cell has a neighborhood with 2r + 1 cells. Let the ith cell's state at time t be ci(t), so the subsequent time step is denoted as ci(t + 1). Then, we can define ρ, the local transition function, as a function where the next state depends on the current state and the state of the two neighbors. It can be denoted as ρ[ci−1(t); ci(t); ci+1(t)] ≡ ci(t + 1) mod 2 In other words, we see the mathematical representation of the cells' state at each time step. It is in mod 2 since there are two different states. Example 3.1. Let us consider the set of rules in which ci(t + 1) = ci−1(t) + ci(t) + ci+1(t). Thus, by modular arithmetic, we are given as the states of each cell at each time step, using the local transition function. 5 4 Two Dimensional Cellular Automata Two-dimensional cellular automata have most of the same properties as the one-dimensional cellular automata. However, instead of being displayed in a row of cells, the cells forming this cellular automata are indexed by Z2. This is presented to be a larger shape consisting of multiple rows of cells. Many are displayed, however not limited, in a square formation.