space and cellular automata

53
1 Stefano Redaelli LIntAr - Department of Computer Science - Unversity of Milano-Bicocca [email protected] Space and Cellular Automata

Upload: arlo

Post on 19-Feb-2016

43 views

Category:

Documents


0 download

DESCRIPTION

Space and Cellular Automata . Stefano Redaelli LIntAr - Department of Computer Science - Unversity of Milano-Bicocca [email protected]. Continuous or discrete?. Euclid. (x + y) 2  = x 2  + 2xy + y 2. Kepler. Space and discrete representations. Newton. numbers. Onda luminosa. 0. - PowerPoint PPT Presentation

TRANSCRIPT

Page 3: Space and Cellular Automata

3

Space and discrete representationsEuclid (x + y)2 = x2 + 2xy + y2 Kepler

Newton

Einstein

Onda luminosa

Fotoni o quanti di luce

0 1

0 1

numbers

Page 4: Space and Cellular Automata

4

Continuous vs Discrete

• 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

Page 5: Space and Cellular Automata

5

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

Page 6: Space and Cellular Automata

6

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 : Qk Q

Page 7: Space and Cellular Automata

7

Space• A grid n×n

- Square lattice

• Each cell has different states

• The world is represented through space

Page 8: Space and Cellular Automata

8

Just an idea

The model of a

classroom

Free place

Occupied place

Page 9: Space and Cellular Automata

9

Interactions• Distance

• Adjacency– Only two near cells can interact each other– When two cells are near?

221 ),( Zxxx 2

21 ),( Zyyy 2

222

11 )()(),( yxyxyxd

d = 1d = 2

Page 10: Space and Cellular Automata

10

Interactions• The concept of neighborhood

– Each cell has the set of cells adjacent to it in its neighborhood

• Local

Page 11: Space and Cellular Automata

11

Neighborhood• A grid n×n

• Neighborhood:

- Moore

- Von Neumann

- Square lattice

Page 12: Space and Cellular Automata

12

Neigborhood radiusr = 1 r = 2 r = 3

Page 13: Space and Cellular Automata

13

Not-square lattice• A grid n×n

- Square lattice

- Triangular

- Hexagonal

Page 14: Space and Cellular Automata

14

Not-square lattice• A grid n×n

- Square lattice

- Triangular

- Hexagonal

Page 15: Space and Cellular Automata

15

Just an idea

Application of the rule: “to have a

lot of space it is more

confortable”

The model of a

classroom

Page 16: Space and Cellular Automata

16

Border condition

?Time: step 12

Page 17: Space and Cellular Automata

17

Border conditions: solutions

1. 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).

2. The border cells are mirrored: the consequence are symmetric border properties.

The more usual method is the possibility 1

Page 18: Space and Cellular Automata

18

Border condition

Page 19: Space and Cellular Automata

19

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…

Page 20: Space and Cellular Automata

20

Why to use a CA approach

• Local perception and partial knowledge of the environment

• Complexity of global dynamic– a bottom-up approach is easier

?

Page 21: Space and Cellular Automata

21

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

Page 22: Space and Cellular Automata

22

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.

Page 23: Space and Cellular Automata

23

Life: example1. Any live cell with

fewer than two neighbours dies of loneliness.

2. Any live cell with more than three neighbours dies of crowding.

3. Any dead cell with exactly three neighbours comes to life.

4. Any live cell with two or three neighbours lives, unchanged, to the next generation.

Page 24: Space and Cellular Automata

24

Emergent patterns in Life

• Static patterns (the most famous)

– Still life object:• Block• Beehive

• Boat

• Ship

• Loaf

Page 25: Space and Cellular Automata

25

Emergent patterns in Life

• Dynamic patterns (the most famous)

– Oscillators:• Blinker

• Toad

• Gliders

– Moving patterns:

Page 26: Space and Cellular Automata

26

The problem of CA approach

• The problem of Action at a distance:– How to make local a long-ranged interaction

Long-ranged interaction

Local interactionA trace in the space

Local interaction!!!

Page 27: Space and Cellular Automata

27

• A container? • A collection of

objects? • …or something more

Which cities are NEAR each other?

The space morphology influence the possibility of interaction between the objects!

Space is only a container?

Page 28: Space and Cellular Automata

28

Example: shadowing

must follow

Page 29: Space and Cellular Automata

29

Example: shadowing

must follow

Page 30: Space and Cellular Automata

30

Example: shadowing

must follow

Page 31: Space and Cellular Automata

31

Example: shadowing

must follow

Page 32: Space and Cellular Automata

32

Example: shadowing

must follow

Page 33: Space and Cellular Automata

33

Example: shadowing

must follow

?

Page 34: Space and Cellular Automata

34

Example: shadowing

must follow

if in N(s)

if

if

if

Page 35: Space and Cellular Automata

35

Example: shadowing

must follow

if in N(s)

if

if

if

Page 36: Space and Cellular Automata

36

Example: shadowing

must follow

if in N(s)

if

if

if

Page 37: Space and Cellular Automata

37

Example: shadowing

must follow

if in N(s)

if

if

if

Page 38: Space and Cellular Automata

38

Example: shadowing

if

and in N(*) or

if

and in N(*)

if

and in N(*)

Page 39: Space and Cellular Automata

39

Action at a distance problem

Application of the rule: “to have a

lot of space it is more

confortable”

The model of a

classroom

Page 40: Space and Cellular Automata

40

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

Space is anisotropic!

Page 41: Space and Cellular Automata

41

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

Page 42: Space and Cellular Automata

42

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

Page 43: Space and Cellular Automata

43

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

Page 44: Space and Cellular Automata

44

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

ppp PFa ,,

Aap

FFp PPp

Page 45: Space and Cellular Automata

45

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

Page 46: Space and Cellular Automata

46

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…

Page 47: Space and Cellular Automata

47

Importance of spatial interactions in crowd context

• Example: a group getting through a crowded area– Weak bonds:

keeping sight– Strong bonds:

keeping by hand

Page 48: Space and Cellular Automata

48

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

Page 49: Space and Cellular Automata

49

Example: cohesion and movement

Crowd phenomenon

Physical interpretation

Computational SCA-model

Page 50: Space and Cellular Automata

50

Example: cohesion and movement

Crowd phenomenon

Physical interpretation

Computational SCA-model

Page 51: Space and Cellular Automata

51

Example: cohesion and movement

Crowd phenomenon

Physical interpretation

Computational SCA-model

Page 52: Space and Cellular Automata

52

Example: cohesion and movement

Crowd phenomenon

Physical interpretation

Computational SCA-model

Page 53: Space and Cellular Automata

53

Example: cohesion and movement

Crowd phenomenon

Physical interpretation

Computational SCA-model