Anda di halaman 1dari 22

CELLULAR AUTOMATA

Carelia Gaxiola
2015-1

OUTLINE

Defining features

Standard examples

Social science examples

Extensions to the basic model

Cellular automata and game theory

AAgrid
ofCELLS
cells
GRID OF

DEFINING FEATURES (1)

A grid or lattice of a large number of identical cells in


a regular array

Each cell can be in one of a (small) set of states

e.g. a square

e.g. dead or alive

Changes in a cells state are controlled by rules

Defining features (ii)


DEFINING FEATURES (2)

The cells rules depend only on the state


The cells rules depend only on the state of the cell
theand
cell
andneighbors
its local neighbours
its local
e.g.the
the immediately
immediately surrounding
cells
e.g.
surrounding
cells

Consequently cells can only influence their


immediate neighbors

Consequently cells can only influence their


immediate neighbours

DEFINING FEATURES (3)

Simulated time proceeds in discrete steps

often called steps, cycles or generations

At each step, the state of every cell (at time t+1) is


calculated using the states of neighboring cells at
time t.

FAMOUS EXAMPLES

The Game of Life

rules:

a living cell remains alive if it has 2 or 3 living


neighbors, otherwise it dies

a dead cell stays dead unless it has exactly 3


living neighbors, when it bursts into life.

A LIFE SEQUENCE

A Life sequence

Other rules

OTHER RULES

A square block
changes to
ell is on
only
when
it
Parity
this after 47 steps:
s an odd number
of only when it A square block
a cell is on
this after 47 steps:
n cells
to number
the
Parityaround
has an itodd
of
rth,East,
South
and
cells
around
to the
a cellon
is
on
only
when it it
has
an odd
number
of on
cellsand

est around
North,
East,
South
it to the North, East,
47

47

West
South
and West

otherwise it is off

herwise it is off

otherwise it is off

ZUMA workshop: Simulation for the social sciences

A square block changes to


this after 47 steps

K. Troitzsch and N. Gilbert, 199

Neighbourhoods

Moore neighbourhood
NEIGHBORHOODS

Moore
neighbourhood
Von Neumann neighborhood

von Neumann neighbourhood

Moore neighborhood

von Neumann neighbourhood

(7.10)

North
East
South
West
North

East
South
West
North
North-east
East
South-east
North
South
North-east
South-west
East
West
South-east
North-west
South

South-west
West
K
ZUMA workshop: Simulation for the social sciences

THE UNIVERSE

The universe
Right neighbour is left edge cell

Bottom neighbour is
top edge cell

30.08.99 (7.11)

ZUMA workshop: Simulation for the social sciences

K. Troitzsch and N. Gilbert, 1996

One-dimensional CAs
ONE-DIMENSIONAL CAs

Cells arranged along a line


Cells arranged along a line
Rules depend only on cells to the left and right

Rules depend only on cells to the left and right


Rule is:

Rule is:

cell becomes on if

114

cell
left
andbecomes
centre is on, on
right if
is off or
and centre
on,
leftisleft
on, centre
and rightisare
off or
right is off or
leftisleft
off, centre
right are
on or
is on,and
centre
and
Generation
right
are
left and
centre
areoff
off,or
right is on
left is off, centre and
otherwise cell goes off
start with one on cell in the middle
right are on or
left and centre are off, right is on
30.08.99 (7.12)
K. Troitzsch and N. Gilbert, 1996
workshop:
otherwise ZUMA
cell goes
offSimulation for the social sciences

GOSSIP

Rule:

if any of your neighbors has news,

otherwise, you stay uninformed

a chance of 10 per cent per neighbor of obtaining it

if you already have the news, you keep it

2 dimensional CA with a stochastic element

SPREADING
SpreadingGOSSIP
gossip

After 150 steps, starting from a single source of


After
150 steps,
gossip:
starting from a
single source of
gossip:

Note that gossip spreads, although there is only a


low probability (10%) of any one conversation
Note
that
gossip
spreads,
although
there
is
only
a
low
probability
passing it on.
(10%) of any one conversation passing it on.

151

30.08.99 (7.14)

ZUMA workshop: Simulation for the social sciences

K. Troitzsch and N. Gilbert, 1996

MAJORITY
RULE
Majority
rule
Starting configuration:
Starting configuration:
50% random on
50% random on
Rule: on if 5 or
Rule:more
von
on if
5 Neumann
or more von
Neumann
neighbors
and
neighbours
and
self are
self on
are on

22

Result:
stable
blocksofofon
Result:
stable
blocks
on form
and off form
and off

30.08.99 (7.15)

ZUMA workshop: Simulation for the social sciences

K. Troitzsch and N. Gilber

THE
EFFECT
OF
INDIVIDUAL
The
Theeffect
effectof
ofindividual
individual
DIFFERENCES

differences
differences

7 7

Atstart
start
AtAt
start

After55steps
steps
After
steps

Rule:
majority
rulewith
withuniform
uniformrandom
randomthreshold
thresholdvariation
variation
Rule:
majority
rule
30.08.99
(7.16)
30.08.99
(7.16)

ZUMA
workshop:
Simulation
social
sciences
ZUMA
workshop:
Simulation
forfor
thethe
social
sciences

K.
Troitzsch
Gilbert,
1996
K.
Troitzsch
andand
N. N.
Gilbert,
1996

EXTENSIONS TO THE BASIC MODEL

Migration models

Larger neighborhoods

Actors can move around the grid

Transitions depend on more than the immediate


neighbors

More complex rules

e.g. rules based on game theory

MIGRATION MODELS

Agents can move around the grid

Rules determine when and where they move to

Agents must be distinguished from cells (locations)

Agents can only move to a vacant space on the grid

AN EXAMPLE:
SEGREGATION

Suppose that (e.g. in the US) there was a threshold


of tolerance, so that white people are content so
long as at least 3/8 of their neighbors are also white
(i.e. less than a ma jority), the rest being black

If less than 3/8th are white, they move to a


neighborhood where they are content with the ratio

And the same applies to black people in reverse

SEGREGATION

Then black and white neighborhoods would nevertheless


develop.

Process

or each cell (selected in random order)

check whether agent is content

if not,

find a nearby empty space to move where it is


content

move it there, leaving an empty space

Segregation
Segregation
SEGREGATION

Initialrandom
randomarrangement
arrangement
Initial
30.08.99 (7.29)
30.08.99 (7.29)

Finalstable
stable arrangement
arrangement
Final
for tolerance = 0.375
for
tolerance = 0.375

ZUMA workshop: Simulation for the social sciences


ZUMA workshop: Simulation for the social sciences

K. Troitzsch and N. Gilbert, 1996


K. Troitzsch and N. Gilbert, 1996

PROGRAMMING CAs

There are toy CA programs, especially for the Game


of Life. see, e.g. http://alife.santafe.edu/software/

But serious work means (at present) writing your


own.