L ECTURE 11: C ELLULAR A UTOMATA 1 / D ISCRETE -T IME D YNAMICAL S - - PowerPoint PPT Presentation
L ECTURE 11: C ELLULAR A UTOMATA 1 / D ISCRETE -T IME D YNAMICAL S - - PowerPoint PPT Presentation
15-382 C OLLECTIVE I NTELLIGENCE S18 L ECTURE 11: C ELLULAR A UTOMATA 1 / D ISCRETE -T IME D YNAMICAL S YSTEMS 3 I NSTRUCTOR : G IANNI A. D I C ARO S TATE VARIABLES SPATIALLY BOUNDED ON L ATTICES : C ELLULAR A UTOMATA State variable
2
STATE VARIABLES SPATIALLY BOUNDED ON LATTICES: CELLULAR AUTOMATA
- State variable โ State of a Spatial location / Cell
- Cell in a 1D, or 2D, or 3D Lattice
1D 2D
๐ฆ1 ๐ฆ2 ๐ฆ3 ๐ฆ๐ ๐ฆ๐โ1 ๐ฆ๐+1 ๐ฆ๐ Example of selected neighborhood of ๐ฆ๐, represented by the set {๐ฆ๐โ1, ๐ฆ๐+1} ๐ฆ1 ๐ฆ2 ๐ฆ3 ๐ฆ๐ ๐ฆ๐+1 ๐ฆ๐+2 ๐ฆ๐+3 ๐ฆ๐+๐ Example of selected neighborhood of ๐ฆ๐+๐, represented by the set {๐ฆ๐+๐โ1, ๐ฆ๐+๐+1, ๐ฆ๐, ๐ฆ๐+1, ๐ฆ๐โ1, ๐ฆ2๐+๐, ๐ฆ2๐+๐+1, ๐ฆ2๐+๐โ1}
๐ฆ๐+๐
๐ฆ2๐
3
CAS ARE LATTICE MODELS
- Regular ๐-dimensional discretization of a continuum
- E.g., an ๐-dimensional grid
- Periodic (toroidal) or non periodic structure
- More abstract definition: Regular tiling of a space by a primitive cell
Bethe lattice, โ-connected cycle-free graph where each node is connected to ๐จ neighbors, where ๐จ is called the coordination number
4
CELLULAR AUTOMATA 1D
1D Lattice
๐ฆ1 ๐ฆ2 ๐ฆ3 ๐ฆ๐ ๐ฆ๐โ1 ๐ฆ๐+1 ๐ฆ๐
๐ฆ๐+1
1
= ๐
1(๐ฆ๐ 1, ๐ฆ๐ 2, โฆ . ๐ฆ๐ ๐)
๐ฆ๐+1
2
= ๐
2(๐ฆ๐ 1, ๐ฆ๐ 2, โฆ . ๐ฆ๐ ๐)
๐ฆ๐+1
๐
= ๐
๐(๐ฆ๐ 1, ๐ฆ๐ 2, โฆ . ๐ฆ๐ ๐)
โฆ.. ๐ฆ๐+1
1
= ๐
1(๐ฆ๐ 1, ๐ฆ๐ 2)
๐ฆ๐+1
2
= ๐
2(๐ฆ๐ 1, ๐ฆ๐ 2, ๐ฆ๐ 3)
๐ฆ๐+1
๐
= ๐
๐(๐ฆ๐ ๐โ1, ๐ฆ๐ ๐ , ๐ฆ๐ ๐+1)
โฆ.. ๐ฆ๐+1
๐
= ๐
๐(๐ฆ๐ ๐โ1, ๐ฆ๐ ๐)
โฆ.. ๐ฆ๐+1
1
= ๐
1(๐ฆ๐ ๐, ๐ฆ๐ 1, ๐ฆ๐ 2)
๐ฆ๐+1
๐
= ๐
๐(๐ฆ๐ ๐โ1, ๐ฆ๐ ๐ , ๐ฆ๐ ๐+1)
โฆ.. ๐ฆ๐+1
๐
= ๐
๐(๐ฆ๐ ๐โ1, ๐ฆ๐ ๐, ๐ฆ๐ 1)
โฆ.. Toroidal boundary conditions ๐ฆ๐+1
1
= ๐(๐ฆ๐
๐, ๐ฆ๐ 1, ๐ฆ๐ 2)
๐ฆ๐+1
๐
= ๐(๐ฆ๐
๐โ1, ๐ฆ๐ ๐ , ๐ฆ๐ ๐+1)
โฆ.. ๐ฆ๐+1
๐
= ๐(๐ฆ๐
๐โ1, ๐ฆ๐ ๐, ๐ฆ๐ 1)
Single map โฆ.. โฆ..
5
CA: A FORMAL DEFINITION
- We can give a definition of CAs aside the general framework of DTDS
- CAs are defined by:
- Components/Cells (Connected FSMs)
- Lattice (Geometry + Topology)
- Schedule (Time + Synchronization)
6
CA: COMPONENTS
- A set of ๐ automata (cells) ๐๐, ๐ = 1, โฆ ๐: finite-state machines
(in a more general sense, each cell could a function)
- Each machine has a specified set of possible states, ๐๐ = {๐ก1, ๐ก2, โฆ , ๐ก๐ค}
- For each machine ๐๐, state transitions are defined by a local state
transition function, that depends on the current state of ๐๐ and the state of the ๐๐ cells that are in ๐๐โs neighborhood, ๐ช(๐๐), ๐บ๐: ๐๐ โช ๐ช(๐๐) โ ๐๐
- At discrete time ๐ข = 0, each cell has an initial state, where the vector
- f all initial states define the initial condition of the CA
๐บ๐ ๐ก๐ = 3 ๐๐
7
CA: LATTICE
- Cells are defined on a lattice, that induces a topology structure
- Associated to the topology, is the neighborhood map, ๐ช, of a cell ๐๐,
that associates to ๐๐ a set of neighbors, ๐ช ๐๐ = {๐๐ โถ ๐๐ ๐๐ก ๐๐๐๐โ๐๐๐ ๐๐๐๐}
- Neighborhood ๏ Range for a cell to be influenced by other cells,
range of influence of a cell
- Boundary conditions define how the notion of topological neighborhood
includes the boundaries, if any, of the lattice
- Infinite vs. Finite lattices (Hard boundaries vs. soft boundaries)
1D
๐1 ๐2 ๐3 ๐๐โ1 ๐๐ ๐๐+1 ๐ช ๐๐ = {๐๐โ1, ๐๐+1}
2D Regular grid
Von Neumann Moore Extended Moore
8
CA: LATTICE, BOUNDARIES
- Infinite/adaptive lattice
- The grid grows as the pattern propagates
- Finite lattice
- Hard boundary: reflective, leftmost (rightmost) cell only diffuse right (left)
- Soft boundary: periodic boundary conditions, edges wrap around
- Hard boundary: fixed, edge cells have a fixed state
9
CA: LATTICE, BOUNDARIES
- Edge wraps around
- 1D is a ring
- 2D is torus
- Weird(er) topologies with a twist: Moebius bands, Klein bottles
10
CA: SCHEDULES
- Synchronized updating: at time ๐ข the state value of the cells is frozen,
and all cells update their state based on their own state and that of their neighbors, then time steps up to ๐ข + 1 and process is repeated
- States are updated in sequence or in parallel, depending on the
available hardware, but it doesnโt matter for the final result
- Asynchronous updating: at time ๐ข the state of one of more cells is
updated based on their own state and that of their neighbors at ๐ข, at ๐ข + 1 the state of possibly different cells is updated and process is repeated
- States are selected according to some criterion, or self-trigger the
update, the updating sequence matters for the final result
๐๐ ๐๐โ1 ๐๐+1 ๐๐+2 ๐๐โ2 ๐๐ ๐๐โ1 ๐๐+1 ๐๐+2 ๐๐โ2
๐ข ๐ข + 1
๐บ(๐๐, ๐๐โ1, ๐๐+1)
11
DESIGN CHOICES
- In principle a great freedom choosing:
- number and type of states,
- state transition functions (for each cell),
- topology and neighborhood mapping (for each cell),
- cells updating scheme,
- number of cells,
- boundary conditions
- โฆ
- In an homogeneous CA, neighborhoods, state transition functions, topology, are
the same for all cells, in a non homogenous CA thereโs some heterogeneity, in space and/or time, in terms of transitions, topology / neighborhood
- Freedom in the design space has been exploited in a number of interesting
applications, that precisely might require a diversity of local behaviors, problem- specific interconnection topologies that reflect complex realities such as ecosystems, immune systems, car traffic flows, bio-chemical reactions,โฆ
- CAs are discrete time and space models of partial differential equations
12
DESIGN CHOICES TO STUDY CAS
- Being multidimensional iterated maps, CAs are very complex entities, therefore, to
study them, letโs make a few reasonably simplifying assumptions:
- Homogeneous CAs:
- Lattice is a regular grid, in 1D or 2D
- All cell functions ๐ have the same (relatively simple) neighborhood
mapping ๐ช(๐) ๏ they all have the same number of neighbors defined according to the lattice
- All cell functions have the same state transition function, ๐บ(๐, ๐ช ๐ )
- States are encoded in a few bits, typically, 2 or 3
- Synchronous updating
13
1D CA
- Simplest case: State variables / Cells are Boolean units, ๐ = {0,1}
- The neighborhood of a cell ๐๐, ๐ช ๐๐ corresponds to the one or two closest
neighbors in both left and right directions
- ๏ Transition function ๐บ is a Boolean function of ๐ = 3 or ๐ = 5 arguments
๐บ(๐๐, ๐๐โ1, ๐๐+1, ๐๐โ2, ๐๐+2) = แ1 if ๐๐ + ๐๐โ1 + ๐๐+1 + ๐๐โ2 + ๐๐+2 > 2
- therwise
- ๏ A 1D Boolean CA with ๐ cells is an ๐-dimensional binary vector
๐(t), the state vector of the CA, that evolves over time by the iterated application of the map ๐บ : ๐ t + 1 = ๐บ(๐ t )
- State space of the CA: All possible configurations of the vector ๐
14
1D BOOLEAN CA, SOME NUMBERS
- ๐ = ๐ = number of (cell) states
- ๐ = {0,1} ๏ ๐ = 2
- ๐ = number of cells ๏ 2๐ possible configurations of CAโs state vector,
- ๐ = 100, ๐ = 2 ๏ 2100 โ 1030 !!!!
One specific function ๐บ
๐ช = 8
- ๐ = range = ๐ช ๐ /2 (assuming a symmetric neighborhood)
- ๐2๐ +1 = ๐|๐ช|+1 possible configurations of neighbor set
- If ๐ = 1, ๐ = 2 ๏ 8 possible neighbor configurations
- If ๐ = 2, ๐ = 2 ๏ 32 possible neighbor configurations
- ๐๐2๐ +1 = ๐๐|๐ช|+1 = possible evolution functions for the CA
- If ๐ = 1, ๐ = 2 ๏ 256 possible Boolean evolution functions
- If ๐ = 2, ๐ = 2 ๏ 4 โ 109 possible Boolean functions!
15
ELEMENTARY CA: WOLFRAM CODE
- ๐ = 0,1 , ๐ = 1 ๏ ๐ = 2, ๐ช + 1 = 8, 256 possible Boolean functions
Transition function ๐ฎ (rule of the CA) Example: Rule 30 This is a bit string ๏ Decimal number Rule 30: (00011110) ๏ 30 Wolfram code
16
SOME RULES โฆ
17
STUDYING CAS: NON-LINEAR BUSINESS AS USUAL
Direct problem (Prediction): Given the function, whatโs the behavior?
18
RULE 30
Class 3 cellular automata: overall the evolution presents regularities, however, the state sequence generated by the central cell is used as random generator in Mathematica! (randomness deriving from a purely deterministic process with no external โnoisyโ inputs)
19