550 likes | 693 Views
Space and Cellular Automata . Stefano Redaelli LIntAr - Department of Computer Science - Unversity of Milano-Bicocca redaelli@disco.unimib.it. Continuous or discrete?. Euclid. (x + y) 2 = x 2 + 2xy + y 2. Kepler. Space and discrete representations. Newton. numbers. Onda luminosa. 0.
E N D
Space and Cellular Automata Stefano Redaelli LIntAr - Department of Computer Science - Unversity of Milano-Bicocca redaelli@disco.unimib.it
Euclid (x + y)2 = x2 + 2xy + y2 Kepler Space and discrete representations Newton numbers Onda luminosa 0 1 0 1 Einstein Fotoni o quanti di luce
Continuous: More accurate Computationally heavy Space not explicitly represented Spatial equations Suitable for analytical approaches Global dynamic Top-down approach Discrete: Less accurate More simple Structure represents the space Discrete systems Suitable for Individual-Oriented approaches Local dynamic Bottom-up approach Continuous vs Discrete
Cellular Automata (CA):informal definition • Cellular Automata are discrete dynamical systems • System: a set of interacting entities • Dynamic: temporal evolution on a set of steps • Discrete: space, time and properties of the automaton can have only a finite, countable number of states
Formal definition • A Cellular Automata is a tuple <L,Q,q0,u,f > • L: a uniform lattice • Q: finite state set • q0: initial state • u: the local connection template, or automaton’s neighborhood u : L Lk • k is a positive integer • f: the automaton transition rule f : QkQ
Space • A grid n×n - Square lattice • Each cell has different states • The world is represented through space
Just an idea The model of a classroom Free place Occupied place
Interactions • Distance • Adjacency • Only two near cells can interact each other • When two cells are near? d = 1 d = 2
Interactions • The concept of neighborhood • Each cell has the set of cells adjacent to it in its neighborhood • Local
Neighborhood • A grid n×n - Square lattice • Neighborhood: - Von Neumann - Moore
Neigborhood radius r = 1 r = 2 r = 3
- Triangular - Hexagonal Not-square lattice • A grid n×n - Square lattice
- Triangular - Hexagonal Not-square lattice • A grid n×n - Square lattice
Just an idea The model of a classroom Application of the rule: “to have a lot of space it is more confortable”
? 2 Border condition Time: step 1
Border conditions: solutions • Opposite borders of the lattice are "sticked together". A one dimensional "line" becomes following that way a circle (a two dimensional lattice becomes a torus). • The border cells are mirrored: the consequence are symmetric border properties. The more usual method is the possibility 1
Example: the study of Pedestrian and Crowd Dynamics • describing the behavior of crowd • Crowd (or group) formation • Crowd (or group) dispersion • Crowd (or group) movement • Crowd behavior in given spatial structures • Other…
? Why to use a CA approach • Local perception and partial knowledge of the environment • Complexity of global dynamic • a bottom-up approach is easier
The strength of CA • “CAs contain enough complexity to simulate surprising and novel change as reflected in emergent phenomena” (Mike Batty) • Complex group behaviors can emerge from these simple individual behaviors • Complexity emerges through spatial patterns
Patterns • A pattern is a form, template, or model • Patterns can be used to make or to generate things or parts of a thing • The simplest patterns are based on repetition/periodicity: several copies of a single template are combined without modification.
Life: example • Any live cell with fewer than two neighbours dies of loneliness. • Any live cell with more than three neighbours dies of crowding. • Any dead cell with exactly three neighbours comes to life. • Any live cell with two or three neighbours lives, unchanged, to the next generation.
Emergent patterns in Life • Static patterns (the most famous) • Still life object: • Block • Beehive • Boat • Ship • Loaf
Emergent patterns in Life • Dynamic patterns (the most famous) • Oscillators: • Blinker • Toad • Moving patterns: • Gliders
Long-ranged interaction Local interaction The problem of CA approach • The problem of Action at a distance: • How to make local a long-ranged interaction Local interaction!!! A trace in the space
Space is only a container? Which cities are NEAR each other? • A container? • A collection of objects? • …or something more The space morphologyinfluence the possibility of interaction between the objects!
Example: shadowing must follow
Example: shadowing must follow
Example: shadowing must follow
Example: shadowing must follow
Example: shadowing must follow
Example: shadowing must follow ?
if in N(s) if if if Example: shadowing must follow
if in N(s) if if if Example: shadowing must follow
if in N(s) if if if Example: shadowing must follow
if in N(s) if if if Example: shadowing must follow
Example: shadowing if and in N(*) or if and in N(*) if and in N(*)
Action at a distance problem The model of a classroom Application of the rule: “to have a lot of space it is more confortable”
Space is anisotropic! Action At-a-Distance in CA • Traditional CA • Local neighborhood definition (e.g. Moore) • Isotropic space • But... in real world In order to have interaction between two cells far in space I have to extend the neighborhood
Neighborhood and proximity matrices • For example: in modeling geographical space, roads establish preferential directions. • The neighborhood should consider this preferences • but it should be different for each roads
From Cells to Agents • Hybrid Automata • The example of TerraML • TerraLib Modeling Language (TerraML) is a spatial dynamic modeling language to simulate dynamic processes in environmental applications. • Situated Cellular Agents (SCA) • The example of MMASS • A model defining MAS whose entities are situated in an environment whose structure (i.e. space) is defined as an undirected graph of sites • Agents in MMASS can emits fields that propagate signals through the space
SCA (Situated Cellular Agent) • < Space, F,A > • Space: models the spatial structure of the environment • A: set of situated agents • F: set of fields propagating throughout the Space • Agent interaction • Asynchronous AAAD: field emission–propagation–perception mechanism • Synchronous interaction: reaction among a set of agents of given types and states and situated in adjacent sites
Agent environment • Space: set P of sites arranged in a network • Each site p є P (containing at most one agent) is defined by the 3–tuple where : agent situated in p : set of fields active in p : set of sites adjacent to p • Then the Space is a not oriented graph of sites
Fields • Mean for agent asynchronous communication • Fields are generated by agents <Wf ,Diffusionf ,Comparef ,Composef > • Wf: set of field values • Diffusionf: P ×Wf × P → (Wf)+: field distribution function • Composef: (Wf)+ → Wf: field composition function • Comparef: Wf ×Wf → {True, False} field comparison function
The example of Crowd Dynamics • describing the behavior of crowd • Crowd (or group) formation • Crowd (or group) dispersion • Crowd (or group) movement • Crowd behavior in given spatial structures • Other…
Importance of spatial interactions in crowd context • Example: a group getting through a crowded area • Weak bonds: keeping sight • Strong bonds: keeping by hand
Importance of spatial interactions in crowd context • The force of relationships influence the behavior: • Weak bonds: more possibility to get through in few time but more possibility of members getting lost • Strong bonds: few possibility to loose members but more difficulty to get through
Example: cohesion and movement Physical interpretation Crowd phenomenon Computational SCA-model
Example: cohesion and movement Physical interpretation Crowd phenomenon Computational SCA-model