Population Dynamics in Conway’s Game of Life and its Variants David Hua and Yoni Biel
May 17, 2015
Population Dynamics in Conway’s Game of Life and its Variants
David Hua and Yoni Biel
Background and Motivation
Cellular automata (CA) as computational models Can simulate any algorithm (computation). Useful in computational theory, biology, physics,
mathematics, artificial intelligence. Used to study emergence of complex behavior, self-
organization, self-replication, and other aspects. Conway’s game of life is one of simplest yet powerful CA.
The purpose of this project Study Conway’s game of life and its variants. Focus on population dynamics in terms of the rule set
used and initialization of the simulation. Learned programming in C++.
Outline
1. Cellular automata.
2. Conway’s game of life and its variants.
3. Population dynamics of studied CA variants.
4. Summary, conclusions, and future work.
What are Cellular Automata?
Computational models arranged on a grid of cells.
Each cell is in a state.
Grid changes over a number of discrete time steps.
Change of cell state determined by its current state, states of its neighbors, and the set of rules.
Cellular automaton for simulating diffusion/aggregation
[http://www.hermetic.ch/pca/da.htm]
Differences from Most Other Models
Three interesting features of CA
Parallelism: Every cell is updated at the same time.
Localism: Every cell is updated based upon its neighbors.
Homogeneity: Every cell is updated using the same rules.
Why Cellular Automata?
Cellular automata can simulate any algorithm via implementing universal Turing machine.
Cellular automata can demonstrate and model emergence of complex global behavior from simple local rules, self-organization, self-replication, population dynamics.
Cellular automata useful in computational theory, biology, physics, artificial intelligence…
2D Cellular Automata
Cells arranged in a two-dimensional grid. Each cell has 8 neighbors
• Opposite sides may connect so that the grid wraps around (for top/bottom row and left/right column).
Conway’s Game of Life
Conway’s game of life is 2D cellular automaton.
Two possible states for each cell Alive Dead
States can change Living cell can die (death). Dead cell can become alive (birth).
Simple set of rules specifying Death (overcrowding, underpopulation). Birth (reproduction).
Basic Rules of Conway’s Game of Life
1. Living cells die if they have fewer than 2 neighbors(underpopulation/loneliness)
3. Dead cells that have 3 neighbors become alive (reproduction)
4. Otherwise, there is no change (whether cell is alive or dead)
2. Living cells die if they have more than 3 neighbors
(overpopulation)
Game of Life - Behaviors
Wide range of common structure types: Mobile groups,
spaceships Oscillators Static structures …
Structures and their interaction crucial for simulating computations or processes.
Summarizing Rules; Game of Life Variants
Rules can be summarized in a simple statement defining the rules for survival and birth (also else is just dead).
Examples: B3 / S23 (Conway’s original rules)
Born if 3 neighbors are alive. Survives if 2 or 3 neighbors are alive.
B36 / S23 (high life) Born if 3 or 6 neighbors alive. Survives if 2 or 3 neighbors alive.
B2 / S (seeds) Born if 2 neighbors are alive. Never survives.
Rule Sets Used for 2-State Game of Life
Rule sets: Game of life (B3 / S23) Reversed GOL (B23 / S3) Evens (B02468 / S02468) Day and night (B3678 / S34678) Maze (B3 / S12345) Walled cities (B45678 / S2345)
Our Research
• For each rule set, set a few important inputs as controls for each simulation• World size – 20x20 cells• Number of time steps – 100 steps• Number of runs of each simulation – 100 runs
• Independent variable• Initialization percentages of living cells – 10%-90%
• Analyze behavior of various rule sets.
• For each rule set, analyze influence of controllable variables on1. Percentages of living cell populations.
2. Percentages of changed cell states per time step (rate of change).
Game of Life - Dynamics
Convergence upon common asymptote.
Initial population decline.
Limited range of initializations achieve this.
Restrictive survival rule.
010203040506070
Population Level Over Time
20.00%30.00%40.00%50.00%60.00%
Time Interval
% Living Cells
0
10
20
30
40
50
60
Rate of Change Over Time
20.00%30.00%40.00%50.00%60.00%
Time Interval% Change From Previous Time
Reversed GOL (B23/S3) Example
Begins by expanding very quickly
Seems to change in waves
Not very many cells stay alive from time step to time step
Reversed GOL (B23/S3) Population Dynamics
1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 970
10
20
30
40
50
60
70
80
90% Changed
20% Initialization 40% Initialization
60% Initialization 80% Initialization
Number of Time Steps
Perc
enta
ge o
f C
ells C
hanged
1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 970
10
20
30
40
50
60
70
80
90% Living
20% initialization 40% initialization
60% initialization 80% initialization
Number of Time Steps
Perc
enta
ge o
f Liv
ing C
ells
• Populations very stable• Overcrowding still kills• Maybe many live & dead
cells switch places
Evens (B02468/S02468)Example
No recognizable patterns
All regions seem to change constantly
All movement is chaotic
Evens (B02468/S02468)Population Dynamics
1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 970
10
20
30
40
50
60
70
80
90% Changed
20% Initialization 40% Initialization
60% Initialization 80% Initialization
Number of Time Steps
Perc
enta
ge o
f C
ells C
hanged
1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 970
10
20
30
40
50
60
70
80
90% Living
20% Initialization 40% Initialization
60% Initialization 80% Initialization
Number of Time Steps
Perc
ent
of
Liv
ing C
ells
• Populations very stable• Half changes and half is static• Initial population size doesn’t
matter
Day and Night (S34678/B3678)
ExampleLife and death
are symmetrical – living and dead cells behave the same way
Large regions of living/dead cells
Regions have similar activity, chaotic boundaries
Day and Night (S34678/B3678)
Population Dynamics No convergence
in population level or rate of change.
Relatively stable; no significant initial population decline.
Rule set – living and dead are treated equally, less survival pressures.
0
20
40
60
80
100
120
Population Level Over Time10.00%20.00%30.00%40.00%50.00%60.00%70.00%80.00%90.00%
Time Interval% Living Cells
0510152025303540
Rate of Change Over Time
10.00%20.00%30.00%40.00%50.00%60.00%70.00%80.00%90.00%
Time Interval
% Change From Previous Time
Maze (S12345/B3)Example
Static rule set: stops changing after pattern is complete.
Consistent maze pattern for all initializations.
Maze (S12345/B3)Population Dynamics
Convergence of a range of initializations.
Rate of change quickly drops to zero.
Stable, expanding population – tolerant survival rule.
0
10
20
30
40
50
60
70
80
90
100
Population Level Over Time
10.00%20.00%30.00%40.00%50.00%60.00%70.00%80.00%90.00%
Time Interval
% Living Cells
Walled Cities (S2345/B45678)
ExamplePolygonal cities
filled with chaotic activity.
Activity continues only within cities after they are built.
Walled Cities (S2345/B45678)
Population Dynamics Initial population
drop.
Limited range of initializations converge despite lack of interaction between cities.
Restrictive survival rule similar to game of life.
0
10
20
30
40
50
60
70
80
90
100
Population Level Over Time
10.00%20.00%30.00%40.00%50.00%60.00%70.00%80.00%90.00%
Time Interval
% Living Cells
3-State Game of LifeExample
An additional living cell type represents a second species or group.
Rules used are the game of life with identity of new species determined by dominant neighboring cell type.
Cells coalesce into homogeneous mobile masses.
Each region becomes overtaken by one cell type.
3-State Game of Life Population Dynamics
Initializations are based on difference between initial populations, with total initial population of 20%.
Rates of change are same as game of life.
Little correlation between populations of each species.
Higher initializations had higher rates of decline.
0
5
10
15
20
Population Level Over Time
Initial Difference: 16%
2.00%18.00%
Time Interval
% Living Cells
0
5
10
15
20
Population Level Over Time
Initial Difference: 12%
4.00%16.00%
Time Interval
% Living Cells
0
5
10
15
Population Level Over Time
Initial Difference: 8%
6.00%14.00%
Time Interval
% Living Cells
0
5
10
15
Population Level Over Time
Initial Difference: 4%
8.00%12.00%
Time Interval
% Living Cells
Summary
Presented basics of CA.
Presented basics of Conway’s game of life (simple CA).
Explored population dynamics for several variants of the game of life as well as concrete examples.
Considered both 2-state and 3-state variants.
Conclusions
Simple rule sets for CA can yield complex behavior.
Small change to rule set can yield completely different results.
Changes in the initialization of cell populations can sometimes yield similar dynamics, but sometimes the dynamics are dramatically affected (depends on rules).
Rule sets can be categorized by population dynamics, which appear to be affected by the survival rule Convergence upon optimum population levels/rates of change. Initial behavior and time for stabilization. Limited range of initializations achieving an optimum state.
Additional states introduce new possibilities for simulating competition and species-specific pressures.
Future Work
Simulations of biological and ecological systems Example: Spreading of forest fires
3 colors for live plants, fire, & empty space Rules
Fire consumes all plant neighbors Fire can’t pass over empty spaces Plants survives with any neighbors until fire reaches it Space stays as space
This can simulate a very important phenomenon rather easily.
Simulate ecosystems, evolutionary systems, social systems, …
Acknowledgments
STARS-2012 sponsors Pfizer Inc. LMI Aerospace Inc. / D3Technologies St. Louis Symphony Orchestra Solae University of Missouri in St. Louis Washington University in St. Louis
Martin Pelikan (mentor) supported from NSF under grants ECS-0547013 and IIS-1115352. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.