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 ↔ State of a Spatial location / Cell Cell in a 1D, or 2D, or 3D Lattice Example of selected neighborhood of 𝑦 𝑗 , represented by the set { 𝑦 𝑗−1 , 𝑦 𝑗+1 } 𝑦 2 𝑦 3 𝑦 𝑙 𝑦 1 𝑦 𝑗−1 𝑦 𝑗 𝑦 𝑗+1 1D Example of selected neighborhood of 𝑦 𝑙+𝑗 , represented by the set { 𝑦 𝑙+𝑗−1 , 𝑦 𝑙+𝑗+1 , 𝑦 𝑗 , 𝑦 𝑗+1 , 𝑦 𝑗−1 , 𝑦 2𝑙+𝑗 , 𝑦 2𝑙+𝑗+1 , 𝑦 2𝑙+𝑗−1 } 𝑦 2 𝑦 3 𝑦 1 𝑦 𝑙 𝑦 𝑙+1 𝑦 𝑙+2 𝑦 𝑙+3 𝑦 𝑙+𝑗 𝑦 2𝑙 2D 𝑦 𝑙+𝑛 2
CA S ARE L ATTICE 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 3
C ELLULAR A UTOMATA 1D 1D Lattice 𝑦 2 𝑦 3 𝑦 𝑙 𝑦 1 𝑦 𝑗−1 𝑦 𝑗 𝑦 𝑗+1 1 1 , 𝑦 𝑜 2 ) 𝑦 𝑜+1 = 𝑔 1 (𝑦 𝑜 1 1 , 𝑦 𝑜 2 , … . 𝑦 𝑜 𝑙 ) 𝑦 𝑜+1 = 𝑔 1 (𝑦 𝑜 2 1 , 𝑦 𝑜 2 , 𝑦 𝑜 3 ) 𝑦 𝑜+1 = 𝑔 2 (𝑦 𝑜 2 1 , 𝑦 𝑜 2 , … . 𝑦 𝑜 𝑙 ) 𝑦 𝑜+1 = 𝑔 2 (𝑦 𝑜 ….. ….. 𝑗 , 𝑦 𝑜 𝑗 𝑗−1 , 𝑦 𝑜 𝑗+1 ) 𝑦 𝑜+1 = 𝑔 𝑗 (𝑦 𝑜 𝑙 1 , 𝑦 𝑜 2 , … . 𝑦 𝑜 𝑙 ) 𝑦 𝑜+1 = 𝑔 𝑙 (𝑦 𝑜 ….. 𝑙 𝑙−1 , 𝑦 𝑜 𝑙 ) 𝑦 𝑜+1 = 𝑔 𝑙 (𝑦 𝑜 Toroidal boundary conditions ….. 1 𝑙 , 𝑦 𝑜 1 , 𝑦 𝑜 2 ) 1 𝑙 , 𝑦 𝑜 1 , 𝑦 𝑜 2 ) 𝑦 𝑜+1 = 𝑔 1 (𝑦 𝑜 𝑦 𝑜+1 = 𝑔(𝑦 𝑜 ….. ….. Single 𝑗 , 𝑦 𝑜 𝑗 , 𝑦 𝑜 𝑗 𝑗−1 , 𝑦 𝑜 𝑗+1 ) 𝑗 𝑗−1 , 𝑦 𝑜 𝑗+1 ) 𝑦 𝑜+1 = 𝑔 𝑗 (𝑦 𝑜 𝑦 𝑜+1 = 𝑔(𝑦 𝑜 map ….. ….. 𝑙 𝑙−1 , 𝑦 𝑜 𝑙 , 𝑦 𝑜 1 ) 𝑙 𝑙−1 , 𝑦 𝑜 𝑙 , 𝑦 𝑜 1 ) 𝑦 𝑜+1 = 𝑔 𝑙 (𝑦 𝑜 𝑦 𝑜+1 = 𝑔(𝑦 𝑜 4
CA: A F ORMAL 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) 5
CA: C OMPONENTS 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 of all initial states define the initial condition of the CA 𝐺 𝑗 𝑡 𝑗 = 3 𝑏 𝑗 6
CA: L ATTICE 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 ) 𝑏 1 𝑏 2 𝑏 3 𝑏 𝑗−1 𝑏 𝑗 𝑏 𝑗+1 1D 𝒪 𝑏 𝑗 = {𝑏 𝑗−1, 𝑏 𝑗+1 } 2D Regular grid Extended Moore Von Neumann Moore 7
CA: L ATTICE , B OUNDARIES Infinite/adaptive lattice The grid grows as the pattern propagates Finite lattice Hard boundary : fixed, edge cells have a fixed state Hard boundary : reflective, leftmost (rightmost) cell only diffuse right (left) Soft boundary: periodic boundary conditions, edges wrap around 8
CA: L ATTICE , B OUNDARIES Edge wraps around 1D is a ring 2D is torus Weird(er) topologies with a twist: Moebius bands, Klein bottles 9
CA: S CHEDULES 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 𝑢 𝑏 𝑗−2 𝑏 𝑗−1 𝑏 𝑗 𝑏 𝑗+1 𝑏 𝑗+2 𝑢 + 1 𝑏 𝑗−2 𝑏 𝑗−1 𝑏 𝑗 𝑏 𝑗+1 𝑏 𝑗+2 𝐺(𝑏 𝑗 , 𝑏 𝑗−1 , 𝑏 𝑗+1 ) 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 10
D ESIGN 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 11
D ESIGN CHOICES TO STUDY CA S 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 12
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 0 otherwise 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 𝒃 13
1D B OOLEAN CA, SOME NUMBERS 𝑙 = 𝑇 = number of (cell) states 𝑇 = {0,1} 𝑙 = 2 𝑁 = number of cells 2 𝑁 possible configurations of CA’s state vector , 𝑁 = 100, 𝑙 = 2 2 100 ≈ 10 30 !!!! 𝑠 = range = 𝒪 𝑏 /2 (assuming a symmetric neighborhood) One specific function 𝐺 𝑙 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 𝒪 = 8 If 𝑠 = 1, 𝑙 = 2 256 possible Boolean evolution functions If 𝑠 = 2, 𝑙 = 2 4 ∙ 10 9 possible Boolean functions! 14
E LEMENTARY CA: W OLFRAM 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 15
S OME RULES … 16
S TUDYING CA S : NON - LINEAR BUSINESS AS USUAL Direct problem (Prediction): Given the function, what’s the behavior? 17
R ULE 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) 18
A ZOO OF BEHAVIORS 19
Recommend
More recommend