AI AI Department of Computer Science University of Calgary CPSC - - PowerPoint PPT Presentation

ai ai
SMART_READER_LITE
LIVE PREVIEW

AI AI Department of Computer Science University of Calgary CPSC - - PowerPoint PPT Presentation

Spreading Phenomena Spreading Phenomena and and Excitable Media Excitable Media Christian Jacob AI AI Department of Computer Science University of Calgary CPSC 565 Winter 2003 Emergent Computing CPSC 565 Winter 2003 1


slide-1
SLIDE 1

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 1

Spreading Phenomena Spreading Phenomena and and Excitable Media Excitable Media

AI AI

Christian Jacob

Department of Computer Science University of Calgary

CPSC 565 — Winter 2003

slide-2
SLIDE 2

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 2

Two-Dimensional Two-Dimensional Cellular Automata Cellular Automata

slide-3
SLIDE 3

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 3

Formally, we can characterize the 2D Moore neighbourhood Nij(r) of radius r in a cell lattice L for a cell cij by Nij(r) = {(k, l) Œ L | |k-i| ≤ r and |l-j| ≤ r }.

Two-dimensional CA Neighbourhoods Two-dimensional CA Neighbourhoods

von Neumann r = 1 Moore r = 1 Extended Moore r = 1, 2, 3

slide-4
SLIDE 4

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 4

Totalistic Cellular Automata Totalistic Cellular Automata

  • Consider the following 1D CA rule:

111 110 101 100 011 010 001 000 0 1 1 0 1 0 0 0

  • This automaton changes ci into a 1 only if the sum of the

cells ci-1, ci, and ci+1 is exactly 2: This is an example of a totalistic rule. ci(t+1) = 1, if ci-1(t) + ci(t) + ci+1(t) = 2 0, otherwise

{

slide-5
SLIDE 5

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 5

Encoding of Totalistic Rules Encoding of Totalistic Rules

  • We first look at one-dimensional, binary CA rules (k = 2):

ci(t+1) = f ( ∑j Œ Ni(2) ci+j (t) ), where f : {0, 1, …, 2r +1} Æ {0, 1}.

  • We can make a table of f in the form of a tuple

( f (0), f (1), f (2), …, f (2r + 1) ).

  • We can encode this tuple by the following formula:

Cf = ∑j=0, …, 2r+1 f ( j ) · 2j.

slide-6
SLIDE 6

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 6

Encoding of Totalistic Rules (2) Encoding of Totalistic Rules (2)

  • With this encoding all legal rule codes are even numbers.

– All 32 rules for k = 2 and r = 2 are encoded by all even numbers between 0 and 62. Note: In the previous lecture we used a different notation, with V instead of k, and K = 2r +1. – Example: mod-2 rule Sum: 1 2 3 4 5 f (Sum): 1 1 1 Cf : 0 · 20 + 1 · 21 + 0 · 22 + 1 · 23 + 0 · 24 + 1 · 25 = 42

slide-7
SLIDE 7

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 7

Encoding of Totalistic Rules (3) Encoding of Totalistic Rules (3)

  • This encoding for binary, totalistic CAs (k = 2)

Cf = ∑j=0, …, 2r+1 f ( j ) · 2j can be generalized to any number of k values per cell: Cf = ∑j=0, …, 2r+1 f ( j ) · kj , where f maps to any of the k values for a neighbourhood of radius r: f : {0, 1, …, 2r +1} Æ {0, 1, …, k}.

slide-8
SLIDE 8

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 8

Some Example 2D Cellular Automata: Some Example 2D Cellular Automata: 1022 1022

5-neighbourhood, outer totalistic 5-neighbourhood, outer totalistic

0-39 40 30 20

slide-9
SLIDE 9

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 9

Some Example 2D Cellular Automata: Some Example 2D Cellular Automata: 510 510

5-neighbourhood, outer totalistic 5-neighbourhood, outer totalistic

0-39 40 30 20

slide-10
SLIDE 10

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 10

Some Example 2D Cellular Automata: Some Example 2D Cellular Automata: 374 374

5-neighbourhood, outer totalistic 5-neighbourhood, outer totalistic

0-39 40 30 20

slide-11
SLIDE 11

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 11

Some Example 2D Cellular Automata: Some Example 2D Cellular Automata: 614 614

5-neighbourhood, outer totalistic 5-neighbourhood, outer totalistic

0-39 40 30 20

slide-12
SLIDE 12

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 12

Some Example 2D Cellular Automata: Some Example 2D Cellular Automata: 174 174

5-neighbourhood, outer totalistic 5-neighbourhood, outer totalistic

0-39 40 30 20

slide-13
SLIDE 13

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 13

Some Example 2D Cellular Automata: Some Example 2D Cellular Automata: 494 494

5-neighbourhood, outer totalistic 5-neighbourhood, outer totalistic

0-39 40 30 20

slide-14
SLIDE 14

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 14

Patterns from Seed Regions: Patterns from Seed Regions: 143954 143954

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

Single-Cell Seed Random Disordered Seed

slide-15
SLIDE 15

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 15

Patterns from Seed Regions: Patterns from Seed Regions: 50224 50224

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

Single-Cell Seed Random Disordered Seed

slide-16
SLIDE 16

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 16

Patterns from Seed Regions: Patterns from Seed Regions: 15822 15822

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

Single-Cell Seed Random Disordered Seed

slide-17
SLIDE 17

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 17

Patterns from Seed Regions: Patterns from Seed Regions: 85507 85507

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

Single-Cell Seed Random Disordered Seed

slide-18
SLIDE 18

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 18

Patterns from Seed Regions: Patterns from Seed Regions: 191044 191044

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

Single-Cell Seed Random Disordered Seed

slide-19
SLIDE 19

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 19

Patterns from Seed Regions: Patterns from Seed Regions: 93737 93737

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

Single-Cell Seed Random Disordered Seed

slide-20
SLIDE 20

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 20

Spreading Phenomena Spreading Phenomena

slide-21
SLIDE 21

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 21

Spreading Phenomena Spreading Phenomena

  • Spreading is the process in which an object extends itself
  • ver an increasingly larger area by incorporating regions

adjacent to itself.

  • The spreading or kinetic growth (KG) models describe a

wide variety of natural processes:

– Tumor growth – Epidemic spread – Gelation – Rumor-mongering – Fluid flow through porous media – …

slide-22
SLIDE 22

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 22

Slow Diffusive Growth: Slow Diffusive Growth: 256746 256746

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

slide-23
SLIDE 23

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 23

Slow Diffusive Growth: Slow Diffusive Growth: 736 736

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

slide-24
SLIDE 24

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 24

Slow Diffusive Growth: Slow Diffusive Growth: 174826 174826

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

slide-25
SLIDE 25

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 25

Slow Diffusive Growth: Slow Diffusive Growth: 175850 175850

9-neighbourhood, outer totalistic 9-neighbourhood, outer totalistic

slide-26
SLIDE 26

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 26

Eden Model Eden Model

  • The original kinetic growth model was the Eden model,

introduced by the biologist M. Eden in the 1960s.

  • The Eden model simulates accretive growth of a cell

cluster (originally for simulating the spread of tumor cells) in a square lattice by sequentially adjoining randomly selected cells from the perimeter.

  • In more detail:

– We start with a cluster list consisting of a seed site. – A site is randomly chosen from the perimeter list, consisting of the nearest sites adjacent to the seed site (v. Neumann neighbourhood). – The cluster and perimeter lists are updated. – Another site is randomly selected from the perimeter list, and so on.

slide-27
SLIDE 27

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 27

Variations of the Eden Model Variations of the Eden Model

  • We look at two variations of the Eden model:

– The Invasion Percolation Model – The Single Percolation Cluster Model

slide-28
SLIDE 28

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 28

The Invasion Percolation Model The Invasion Percolation Model

  • The invasion percolation model describes the flow of fluid

through porous media.

  • Invasion Percolation Algorithm:

– Each site in the perimeter list has a random number associated with it. – The cluster spreads by incorporating the perimeter site with the lowest associated random number.

  • This model describes a process of spreading that “follows

the path of least resistance.”

slide-29
SLIDE 29

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 29

Invasion Percolation Model: Spreading Invasion Percolation Model: Spreading

slide-30
SLIDE 30

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 30

Invasion Percolation Model: Spreading (2) Invasion Percolation Model: Spreading (2)

slide-31
SLIDE 31

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 31

The Single Percolation Cluster Model The Single Percolation Cluster Model

  • The single (or random) percolation cluster model describes

the epidemic spread of disease.

  • Single Percolation Cluster Algorithm:

– Each randomly selected perimeter site has a probability p of joining the cluster. – If the selected site is placed in the cluster, it is removed from the perimeter list. – Even if the selected site is not placed in the cluster, it is removed from the perimeter list so that it cannot be chosen again later.

  • When p = 1, this model reduces to the Eden model.
slide-32
SLIDE 32

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 32

Single Percolation Cluster Model: Single Percolation Cluster Model: p p = 1.0 = 1.0

slide-33
SLIDE 33

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 33

Single Percolation Cluster Model: Single Percolation Cluster Model: p p = 1.0 = 1.0

slide-34
SLIDE 34

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 34

Single Percolation Cluster Model: Single Percolation Cluster Model: p p = 0.5 = 0.5

slide-35
SLIDE 35

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 35

Invasion vs. Single Percolation Invasion vs. Single Percolation

Invasion Percolation Single Percolation

p = 1.0 p = 0.5

slide-36
SLIDE 36

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 36

Excitable Media Excitable Media

slide-37
SLIDE 37

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 37

Excitable Media Excitable Media

  • Systems involving excitable media:

– Slime mold growth, – Star formation in spiral galaxies, – Cardiac tissue contraction, – Reaction-diffusion chemical systems, – Infectious disease epidemics

  • In each of these cases various spatially distributed patterns

are formed (such as concentric and spiral waves).

slide-38
SLIDE 38

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 38

Excitable Media (2) Excitable Media (2)

  • Self-organized, self-propagating structures consist of

spatially distributed elements which

– can be excited as a result of interacting with neighbouring elements, – Subsequently returning incrementally to the quiescent state in which they are again receptive to being excited.

  • The excited-refractory-receptive cycle characterizes these

systems.

  • These can be modeled using multi-state cellular automata.
slide-39
SLIDE 39

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 39

2D CA: Emergent Pattern Formation in Excitable Media 2D CA: Emergent Pattern Formation in Excitable Media

Neuron excitation Neuron excitation Cyclic Space Cyclic Space Hodgepodge Hodgepodge

slide-40
SLIDE 40

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 40

Neuron Excitation Neuron Excitation

  • Electrical activity in biological systems can exhibit

excitable media behaviour.

  • Example: contraction of cardiac tissue (heart muscle)
  • The two-dimensional Greenberg-Hastings CA has been

used to model neuron excitation and recovery in a network

  • f neurons.

– Lattice site (neuron) values range from 1 to r. – A neuron with value 1 is said to be excited. – A neuron with value r is said to be rested. – A neuron with an intermediate value is said to be in a state of recovery.

slide-41
SLIDE 41

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 41

Neuron Excitation: Rules Neuron Excitation: Rules

  • In the neuron excitation-recovery process, an excited

neuron goes through a sequence of recovery states until it is rested.

  • A rested neuron becomes excited if at least one nearest

neighbour (v. Neumann) neuron is excited.

  • Update rules:

– A rested neuron (having value v = r) with at least one excited nearest neighbour neuron (having value v = 1) becomes excited (r Æ 1). – A rested neuron (having value v = r) with no excited nearest neighbour remains rested (r Æ r). – A neuron that is in a recovery state (1 ≤ v ≤ r-1) goes to the next recovery state (v Æ v +1).

slide-42
SLIDE 42

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 42

Neuron Excitation: Rule Implementation Neuron Excitation: Rule Implementation

  • Here is an example of how to implement the Neuron

Excitation rules through pattern matching in Mathematica:

neuron[a_, b_, r, d_, e_]:= 1 /; MatchQ[1,a|b|d|e] neuron[a_, b_, r, d_, e_]:= r neuron[_, _, c_, _, _] := c + 1 Attributes[neuron]= Listable

slide-43
SLIDE 43

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 43

Neuron Excitation: Visualization Neuron Excitation: Visualization

slide-44
SLIDE 44

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 44

Neuron Excitation: Visualization Neuron Excitation: Visualization

slide-45
SLIDE 45

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 45

Cyclic Space Cyclic Space

  • In the Greenberg-Hastings CA, the recovery of a site

proceeds independently of the state of neighbouring sites.

  • In the Cyclic Space CA, the recovery process for a site

proceeds only when a neighbouring site is slightly more relaxed.

  • The behaviour of this model has been related to the

changes that occur in phase transitions (e.g., water to ice).

slide-46
SLIDE 46

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 46

Cyclic Space: Rules Cyclic Space: Rules

  • Lattice sites have values between 0 and n-1.
  • Update rules:

– A cell in state n-1 goes to state 0 if any of its nearest neighbour cells are in state 0. That is, a cell in state n-1 is “eaten” by a nearest neighbour cell in state 0. – A cell in state v, 0 ≤ v ≤ n-1, goes to state v +1 if any of its nearest neighbour cells is in state v +1. – A cell in state v, 0 ≤ v ≤ n -1, remains in state v if it has no nearest neighbour cells in state v +1.

slide-47
SLIDE 47

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 47

Cyclic Space: Rule Implementation Cyclic Space: Rule Implementation

  • Here is an example of how to implement the Cyclic Space

rules through pattern matching in Mathematica:

cyclicSpace[a_, b_, (n-1), d_, e_]:= 0 /; MatchQ[0, a | b | d | e ] cyclicSpace[a_, b_, c_, d_, e_]:= (c+1) /; MatchQ[(c+1), a | b | d | e ] cyclicSpace[_, _, c_, _, _] := c Attributes[cyclicSpace]= Listable

slide-48
SLIDE 48

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 48

Cyclic Space: Visualization Cyclic Space: Visualization

slide-49
SLIDE 49

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 49

Cyclic Space: Visualization Cyclic Space: Visualization

slide-50
SLIDE 50

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 50

Hodgepodge Machine Hodgepodge Machine

  • Hodgepodge = heterogeneous mixture
  • The Hodgepodge Machine models autocatalytic chemical

reactions.

  • Two or more compounds combine, dissociate, and

recombine in the presence of a catalyst.

  • Examples:

– Combination of carbon monoxide and oxygen to form carbon dioxide while these molecules are absorbed on the surface of dispersed palladium crystallites (car catalysers!). – Belousov-Zhabotinsky reaction: malonic acid is oxidized by potassium bromate in the presence of iron or cerium. – Spreading of infectious diseases.

slide-51
SLIDE 51

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 51

Hodgepodge: Rules Hodgepodge: Rules

  • s ¥ s square lattice with periodic boundary conditions.
  • Lattice site values range from 0 to r.
  • Cells having a value of 0 are said to be healthy.
  • Cells having a value r are said to be ill.
  • All other cells (0 < v < r) are said to be infected.

The higher the value, the more infected the cell is.

slide-52
SLIDE 52

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 52

Hodgepodge: Rules Hodgepodge: Rules

  • Update rules:

– If a cell is ill (v = r), it becomes healthy (v Æ 0). – If a cell is healthy (v = 0), it becomes infected with the new v determined by:

Min[r, Floor[# infected NN cells / k1 ] + Floor[# ill NN cells / k2 ]

where k1 and k2 are constants. Note: The use of Min ensures that v does not exceed r. – If a cell is infected (0 < v < r), it becomes more infected with the new v determined by:

Min[r, g + Floor[sum of NN cell values / # infected NN cells ]

where g is an integer known as the speed of infection constant.

slide-53
SLIDE 53

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 53

Hodgepodge: Rule Implementation Hodgepodge: Rule Implementation

  • Here is an example of how to implement the Hodgepodge

rules through pattern matching in Mathematica:

hodgepodge[r, _, _, _]:= 0 hodgepodge[0, x_, y_, _]:= Min[r, Floor[y/k1] + Floor[x/k2]] hodgepodge[c_, x_, y_, z_] := Min[r, g + Floor[(c+(r x) + z)/(y+1)]] Attributes[hodgepodge]= Listable

slide-54
SLIDE 54

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 54

Hodgepodge: Visualization Hodgepodge: Visualization

slide-55
SLIDE 55

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 55

Hodgepodge Machine: Visualization Hodgepodge Machine: Visualization

slide-56
SLIDE 56

Christian Jacob, University of Calgary Emergent Computing — CPSC 565 — Winter 2003 56

References References

  • Eden, M. (1960). A two-dimensional growth process . In Proceedings of

Fourth Berkeley Symposium on Mathematics, Statistics, and Probability, volume 4, pages 223-239, Berkeley, 1960. University of California Press.

  • Gaylord, R. J. and P. R. Wellin (1995). Computer Simulations with

MATHEMATICA: Explorations in Complex Physical and Biological Systems. New York, Springer. (in particular: chapters 4 and 11).

  • Gaylord, R. J. and K. Nishidate (1996). Modeling Nature: Cellular

Automata Simulations with Mathematica. New York, TELOS/Springer.

  • Toffoli, T. and N. Margolus (1987). Cellular Automata Machines: A New

Environment for Modeling, MIT Press.

  • Wolfram, S. (1994). Cellular Automata and Complexity. Reading,

Addison-Wesley.

  • Wolfram, S. (2002). A New Kind of Science. Champaign, IL, Wolfram

Media.