15
6/10/2009 1 Cellular Automata CS6800 Summer I 2009 Thap Panitanarak Cellular Automata Definition Discrete dynamic system Discrete in space, time and state “Cells” in space “States” in time Current states of all its neighborhoods (may including itself) defines next state of that cell State changed according to “Local rule” 6/10/2009 CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

1

Cellular Automata

CS6800 Summer I 2009

Thap Panitanarak

Cellular Automata

Definition

� Discrete dynamic system

� Discrete in space, time and state

� “Cells” in space

� “States” in time

� Current states of all its neighborhoods (may including itself) defines next state of that cell

� State changed according to “Local rule”

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 2: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

2

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Formal Definition� Cellular Automaton C = <S, s0, G, d, f>� S is finite set of states� s0 is initial state, s0 in S� G is cellular neighborhood

� G = {i, i+r1, i+r2, …, i+rn} where n is neighborhood size

� d – dimension� f: Sn � S is local rule� C(t) is configuration at time t

� C(t) = (s0(t), s1(t), …, sN(t)) where N is finite size of CA & si(t) is state of cell i at time t

� Global mapping, F� F: C(t) � C(t+1)

Cellular Automata

Varieties of Cellular Automata

� Dimension

� Shape

� Color

� Neighborhood

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 3: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

3

Cellular Automata

Dimension

one-dimensional two-dimensional

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata

Shape

square hexagon

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 4: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

4

Cellular Automata

Color

2 colors 3 colors

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata

Neighborhood

Moore von Neumann

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 5: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

5

Cellular Automata

� Theoretically, space is defined infinitely

� Practically, space is bounded

� How to handle cells along the edges?

� Keep them static

� Differently defined neighborhoods

� Wrap-around: torus

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata

Elementary Cellular Automata (ECA)

� Simplest

� Dimension: one

� Shape: square

� Color: two (binary)

� Neighborhood: nearest

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 6: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

6

Cellular Automata

ECA Properties

� Next state can be derived by current states of itself & its two neighborhoods (left & right)

� Neighborhood: 3 cells � 2 x 2 x 2 = 8 possible patterns of states

� Total rules = 28 = 256 rules

� Rule’s number represented in binary

� Rule 30 = 111102

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata

ECA with rule 30

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 7: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

7

Cellular Automata

ECA more examples

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata

ECA more examples

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 8: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

8

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Totalistic Cellular Automata (TCA)

� Dimension: one

� Shape: square

� Color: k

� Neighborhood: nearest

� Use average of cells in neighborhood to derive next state

Cellular Automata

TCA Properties

� Next state can be derived by “average” of current states of itself & its two neighborhoods (left & right)

� Neighborhood consists of three cells, itself, left & right cells

� With k = 3, all possible averages (sums) are0, 1, 2, 3, 4, 5, 6 � 7 possible sets of states

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 9: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

9

Cellular Automata

TCA Properties

� Indexed with (3k – 2)-digit k-ary number called “code”

� With k = 3 � 7-digit 3-ary number

� Code 777 = 10012103

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata

TCA with code 777

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 10: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

10

Cellular Automata

TCA with code 777

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Cellular Automata

TCA more examples

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Page 11: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

11

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Conway's Game of Life (Life)

� Dimension: two

� Shape: square

� Color: two (binary)

� Neighborhood: Moore/nearest (without itself)

� Use average of cells in neighborhood to derive next state

� It can view as 2-dimensional, binary totalistic cellular automata

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Life’s Rule

� Count – summation of its neighborhoods

� Use 3 rules; death, survival, birth

� Death – on cell changed to off if count < 2 or count > 3

� Survival – on cell left unchanged if count = 2 or count = 3

� Birth – off cell changed to on if count = 3

Page 12: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

12

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Life – Simple Example

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Life – Still Life

� Special Patterns that their states do not change on time

� No death & no birth, only survival

Page 13: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

13

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

� Life – More Examples

� http://www.math.com/students/wonders/life/life.html

� 2D Cellular Automata

� http://psoup.math.wisc.edu/mcell/mjcell/mjcell.html

� 3D Cellular Automata

� Visions of Chaos

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

� Universal Cellular Automata

� Capability of simulating any cellular automata or Turing machine

� It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp, Conway & Guy1982][Gardner 1983] are universal

� In 2002, Wolfram had proved that one-dimensional, two-color cellular automata with nearest neighbor rules is sufficient to exhibit universality

Page 14: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

14

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Conclusion

� Three fundamental properties of CA

� Parallelism : each cell updates independently

� Locality : new state derived from previous states of neighborhoods

� Homogeneity : use local rule, common for all cells

� Simple systems � more complex, dynamic systems

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

References

� http://mathworld.wolfram.com/CellularAutomaton.html

� http://en.wikipedia.org/wiki/Cellular_automata

� L. N. de Castro, “fundamentals of natural computing: an overview”, Physics of Life Reviews, 4 (2007), 1–36.

Page 15: Cellular Automata - wmich.edu · 2013. 8. 3. · Capability of simulating any cellular automata or Turing machine It had been proved that ECA (with rule 110) [Cook 2004] & Life [Berlekamp,

6/10/2009

15

Cellular Automata

6/10/2009CS6800 Summer I 2009 Thap Panitanarak

Question

� Show the first five generations of elementary cellular automata using rule 30 with a start state that has only middle cell black