A Cellular Automata Approach to Population Modeling

A Cellular Automata Approach to
Population Modeling
Alexa M. Silverman
Purpose



To use cellular automata to model
population growth and change
To observe the effects of temperature
and virus spread on the behavior of
populations
To determine whether a cellular-based
model of population is valid and
realistically predicts the behavior of
individuals in a population
Cellular Automata


2D cells with live neighbor
counts
A cellular automaton is
a ‘cell’ on a grid which
determines its state
(‘live’ or ‘dead’) based
on the states of
neighboring cells.
2D cellular automata
consider all eight
neighboring cells.
Agent-Based Modeling
• Uses individual ‘agents’ with simple instructions to
observe emergent behavior
• Based on interactions between agents
• More variable results than mathematical models
Agent-Based Modeling
Some well known models, in NetLogo:
Altruism
Mitteldorf &
Wilson
Rabbits Grass
Weeds
(Predator/Prey)
U. Wilensky
Daisyworld
Lovelock &
Watson
Life

“Life” notation is written s/b, where numbers on the right
side of the slash represent neighbor counts needed to
survive and numbers on the left side of the slash
represent neighbor counts needed for cell birth.
“34 Life”
(34/34)
“Conway’s Game of Life”
(23/3)
CA Modeling
“Rumor Mill”
models spread of a rumor

“Urban Suite – Cells”
models growth of cities
The field of cellular automata modeling is still relatively
new, but several models have been created.
14/3 Population Model


For this model, the rule 14/3
was chosen because it
causes cells to grow and
move in a pattern
resembling the spread of a
species (starts localized and
becomes more widespread).
14/3 automata suggest two
types of individuals:
“antisocial” (survives with 1
neighbor) and “social”
(survives with 4 neighbors).
Code and Testing


This program was created in NetLogo because the
NetLogo graphics window allows for ‘real time’ view of
population growth and change. NetLogo code is objectbased, which is ideal for a model where each cell must
“know” its state, and the states of its eight surrounding
cells.
In test runs, cell population and temperature are
graphed. Cell ‘birth rate’ (likelihood of a ‘dead’ cell to
come to life) varies quadratically with temperature and
temperature varies linearly with changes in population.
A highly variable population, therefore, will cause
frequent changes in temperature.
Code and Testing
Population varies as
100 - .25(temperature 21)^2
Temperature varies as
current temp + (1/20)(pop. last pop.)
made using equationgrapher.com
NetLogo Interface
Results
• With default settings for temperature (21 degrees Celsius) and population
density (55%), population and temperature eventually drop off.
Results
The nature of cellular automata causes each test run to be slightly
different even with the same initial parameters. Here are the
results of five test runs with default settings:
2500
2000
1500
1000
500
0
1
5 13 21 29 37 45 53 61 69 77 85 93 101109117125133141149157165173181189197205213221229237245253261269277285293301309317325333341
9 17 25 33 41 49 57 65 73 81 89 97 105113121129137145153161169177185193201209217225233241249257265273281289297305313321329337345
Java Program




Models the spread of a virus
Utilizes Java's objectoriented nature and Java's
Graphics package
Displays cell movement in a
graphics window and exports
data to a file
23/3 Rule (Conway's Game
of Life) is used because it
models the short-term
movements of a population
Code and Testing




Initial density of cells is set at 50%
Initial infected percentage increases by 1%
each run from 0 to 100%
Infected cells have a 50% chance of
infecting healthy neighbors
At each generation, outputs infected
percentage—also seen as BufferedImage
painting infected cells red
Java Program
class hierarchy
CellDriver
extends
CellPanel
JPanel
BufferedImage
Grid
Timer
ActionListener
Graphics
Cell
Results
Virus Spread
120
Percent Infected
100
80
60
40
20
0
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99
Time
Regardless of initial percent infected, infected cells approach 19-20%
over time
Environment appears to have a carrying capacity
However, virus still propagates even with a low initial number of cases
Discussion




NetLogo program

Limitations: does not account for other factors such
as environmental forcings

Supports theory of global warming
Java program

Limitations: virus is dormant; has no effect

Quarantining necessary regardless of initial cases
Extensions

3D environment

Additional factors on population behavior
Implications for further research
Sources and Background




Individual-Based Artificial Ecosystems for Design and
Optimization by Srinivasa Shivakar Vulli and Sanjeev Agarwal
Using a Genetic Algorithm to Evolve Behavior in MultiDimensional Cellular Automata by R. Brukelaar and Th. Back
A Hybrid Agent-Cellular Space Modeling Approach for Fire
Spread and Suprression Simulation by Xiolin Hu, Alexandre
Muzy, Lewis Ntaimo
Pattern-Oriented Modeling of Agent-Based Complex Systems:
Lessons from Ecology by Grimm, Revilla, et al.

Seeing Around Corners by Jonathan Rauch

A Brief History of Cellular Automata by Palash Sarkar
Image Sources on the Web
http://www.anl.gov
http://www.kevlindev.com
http://ccl.northwestern.edu/netlogo/
http://psoup.math.wisc.edu/mcell/
http://i.cnn.net