3. Cellular Automata (CA) – Teil 1
Cellular Automata Computing Model Formal Definition Grids, Randbehandlung, Nachbarschaft, Rule Types
Updating: Synchron / Asynchron Game of LIFE XOR Rule Wolfram Classes of Complex Behavior Software Performance Hardware Support
WS 10/11 MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Massivparallele Modelle und Architekturen R. Hoffmann, FB Informatik, TU-Darmstadt
3-1
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
„Batterie of 1D communicating Buddhas“ Photo taken by Patrick Ediger, Kamakura, Japan, 2008
3-2
Universal Computation
Hydrodynamics
Self-Reproduction
Sound Waves
Biological Growth
Wave Optics
Crystal Growth
Ising Spin Systems
Artifical Worlds
Simulation of Digital Logic
Games
Numerical Applications (e.g. Sorting)
Physical Fields Movement and Collision of Particles
Layout of Printed Circuits
Lattice Gas Models
Pattern Recognition
Diffusion
Random Generator
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Cellular Automata Applications
Image Processing
3-3
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Oil&Water Simulation
Bruce Boghosian, Boston Univ. 3-4
Surfactant = oberflächenaktiver Stoff, Tensid
Bruce Boghosian, Boston Univ.
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Surfactant Formation
3-5
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Art
3-6
CA Idee erstmals vorgestellt von Stanislaw Ulam 1940 weiter untersucht von John von-Neumann (selbst reproduzierende Automaten) Zuse: Rechnender Raum, Friedrich Vieweg & Sohn, Braunschweig, 1969. 70 p. [Calculating Space, MIT Technical Translation AZT-70-164-GEMIT, Massachusetts Institute of Technology (Project MAC), Cambridge, Mass. 02139, February 1970. ] John Horton Conway: Game of Life Tommaso Toffoli und Normal Margolus: Cellular Automata Machines, MIT Press 1987 Stephen Wolfram: A New Kind of Science. Wolfram Media, Inc., May 14, 2002.
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Literatur
Moshe Sipper: Evolution of Parallel Cellular Machines, Springer 1997, http://www.moshesipper.com/pcm/ 3-7
NW
N
NE
W
C
E
SW
S
SE
neighbors C‘ = rule(C, N, E, S, W) // newstate C C‘ // nextstate C(t+1)=C(t)
Regular grid of active cells with local connections. The application of a local rule (transition function) to each cell of the array allows the modelling of complex global behaviours. The model is inherent massively parallel. The cells may have a complex state (record) or may be considered as objects.
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Principle of Cellular Processing Cellular Automata Computing Model
3-8
CA: General and Simple the model supports universal computation the basic units encode a general form of local interaction rather than some specialized action
Simplicity the basic units of interaction are modest in comparison to Turing machines. The CA model is one of the simplest, general models available. From the point of view of parallel cellular machines, CAs exhibit three notable features, namely, massive parallelism, locality of cellular interactions, and simplicity of basic components (cells).
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Generality
Sipper, Sec. 1.2.1 3-9
Begriffe Bestimmter Zeitpunkt, (je nach Kontext auch Konfiguration K(t) zum Zeitpunkt t)
Konfiguration K die Summe aller Zellzustände des CA
Garden of Eden Configuration kann nicht wieder erreicht werden (non reversible CA)
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Generation t
3-10
CA=(I, S, s0, X, Y, N, f) I = {0, 1, 2, …m-1} Index Set an jeder Pos. i befindet sich ein endlicher Automat S = {s0, s1, …sn-1} Zustandsmenge s0 ∈ S Ruhezustand X⊆S Eingabealphabet Y⊆S Endzustände, f(y, beliebige Nachbarzustände) = y ∈ Y N = {rel | rel ∈ R ⊆{0, ∓ 1, ∓ 2, …} } Nachbarschaft, rel. Indizes f: S|N| S Transition Function, Rule f(s0, s0, … s0) = s0 Nullregel gefordert, Background Rule t Zeit, Generation s[i] = si Zustand der Zelle i K = (s[0], s[1], …) Konfiguration, alle Zellzustände K(t+1) ergibt sich durch paralleles Anwenden von f auf alle Zellen aus K(t) (Definition in Anlehnung an Vollmar/Worsch: Modelle der Parallelverarbeitung, Teubner 1995)
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Formal Definition, 1D-CA
3-11
Grids, Randbehandlung n-dimensional
rectangular triangular hexagonal n-angular
Randbehandlung „reiner CA“: kein Rand, unendliche Ausdehnung Aktive und inaktive Bereiche unterschieden durch Nullregel
mit Rand: Randzellen werden nicht neu berechnet und liefern feste Konstanten ohne Rand mit Wrap-around (Cyclic, Periodic) Ring, Torus Reflecting (Rand fungiert als Spiegel)
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Grid of cells, sites, tiles, points in space
3-12
1D Nachbarschaften, Beispiele Radius 1
L
C
R
C(-1)
C(0)
C(1)
relative Sichtweise / Adressierung
Radius 2
unsymmetrisch
spezielle
L2
L1
C
R1
L2
L1
C
R1
L2
L1
C
R2
R2
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Nachbarschaft N = {-1, 0, +1}
R4
3-13
Von-Neumann-Neighborhood (1 Center + 4 nearest Neighbours) C f(C, N, E, S, W)
Moore-Neighborhood (1 Center + 8 nearest Neighbours C f(C, N, NE, E, SE, S, SW, W, NW) Manhattan-Distance
Erweiterte Nachbarschaft: Radius r bzw. Manhattan-Distanz >1
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
2D-Nachbarschaften
Radius
3-14
Rule Types Each cell obeys to the same local rule specified as rule table, transition function
Non-uniform cells may obey to different rules (space-dependent)
Totalistic Neuer Zustand hängt nur von der Anzahl der Nachbarn (in einem bestimmten Zustand) ab, (inklusive der eigenen Zelle), (Bsp. LIFE)
Reversible In eine frühere Konfiguration kann zurückgekehrt werden
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Uniform
3-15
Information kann sich im CA nur mit begrenzter Geschwindigkeit ausbreiten, die maximale Geschwindigkeit vmax(überbrückte Entfernung pro Takt) ist durch die am weitesten entfernte Zelle C(dmax) in der Nachbarschaft gegeben: vmax = dmax Die Information fließt von der Nachbarzelle H zur Zentrumszelle C , C kopiert / liest H. (C H) „Zellulare Lichtgeschwindigkeit“: Radius=1, vmax=1. copy from
MMA - WS 10/11, R. Hoffmann, Rechnerarchitektur, TU Darmstadt
Ausbreitungsgeschwindigkeit
dmax=3
3-16
Updating: Synchron synchrones Updating
wird meist verwendet der Ablauf der Zustandsänderungen ist reproduzierbar
Berechnungschema 1. verwende die Zellwerte (Eigener Zustand und Nachbarzustände) der momentanen Generation(t) 2. berechne die Regel für alle Zellen und speichere die neuen Zellwerte in GenerationNEXT 3. Kopiere: Generation(t+1)