MAS 2011 Lecture 2

download MAS 2011 Lecture 2

of 55

Transcript of MAS 2011 Lecture 2

  • 7/28/2019 MAS 2011 Lecture 2

    1/55

    Agent-Based Simulation

    Agent-Based Simulation

    Cellular Automata

    Federico Pecora

    School of Science and Technologyrebro [email protected]

    Federico Pecora Agent-Based Simulation Part 2 1 / 35

    http://localhost/var/www/apps/conversion/tmp/scratch_2/[email protected]://localhost/var/www/apps/conversion/tmp/scratch_2/[email protected]://find/
  • 7/28/2019 MAS 2011 Lecture 2

    2/55

    Agent-Based Simulation

    Outline

    1 Introduction to CA

    2

    Simple CA (apparently)

    3 Other classes of CA

    Reversible CA

    Totalistic CA

    4 Applications of CA

    Federico Pecora Agent-Based Simulation Part 2 2 / 35

    http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    3/55

    Agent-Based Simulation

    Introduction to CA

    Outline

    1 Introduction to CA

    2

    Simple CA (apparently)

    3 Other classes of CA

    Reversible CA

    Totalistic CA

    4 Applications of CA

    Federico Pecora Agent-Based Simulation Part 2 3 / 35

    http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    4/55

    Agent-Based Simulation

    Introduction to CA

    What is a Cellular Automaton?

    A discrete computational model

    Relevant in a number of fields

    theoretical computer science

    mathematics

    biology

    physics

    engineeringcryptography

    . . .

    Federico Pecora Agent-Based Simulation Part 2 4 / 35

    http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    5/55

    Agent-Based Simulation

    Introduction to CA

    What is a Cellular Automaton?

    Regular n-dimensional grid of cells

    Each cell has finte number of states

    Each cell has a neighborhood consisting of other cells

    Time advance function: the state of a cell at time t in function of

    the state of the cells neighborhood at time t1

    Every cell shares the same time advance function

    At every tick (instant of discrete time), the rule is applied for all

    cells in the grid, and a new generation is formed

    Initial condition: all cells have the same state except for a given

    set of cells, called configuration

    Federico Pecora Agent-Based Simulation Part 2 5 / 35

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    6/55

    Agent-Based Simulation

    Introduction to CA

    What is a Cellular Automaton?

    states: 2 (full/empty cell)

    survival: 2 or 3

    birth: 2 or 3

    Federico Pecora Agent-Based Simulation Part 2 6 / 35

    A t B d Si l ti

    http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    7/55

    Agent-Based Simulation

    Introduction to CA

    What is a Cellular Automaton?

    states: 2 (full/empty cell)

    survival: 2 or 3

    birth: 2 or 3

    Federico Pecora Agent-Based Simulation Part 2 6 / 35

    Agent Based Sim lation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    8/55

    Agent-Based Simulation

    Introduction to CA

    What is a Cellular Automaton?

    Generations S23/B23/C8

    states: 8 (colors in a

    spectrum)

    survival: 2 or 3

    birth: 2 or 3

    colors: only first state gives

    birth, others decay in coloruntil they die

    Federico Pecora Agent-Based Simulation Part 2 7 / 35

    Agent Based Simulation

    http://videos/ca.ogghttp://goforward/http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    9/55

    Agent-Based Simulation

    Introduction to CA

    Rules and periodic bondary conditions

    Assume an infinite, 2-dimensional grid

    Assuming 2-state cells, we have for each cell 29 = 512 possible

    patterns

    Since we can only represent a finite grid, the cells on the borders

    are subject to periodic boundary conditions

    cell coordinates are mod(N) (wrap around both vertically and

    horizontally)

    Federico Pecora Agent-Based Simulation Part 2 8 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    10/55

    Agent-Based Simulation

    Introduction to CA

    Properties of CA

    Parallelism: individual cell updates are performed independently of

    each other all of the updates being done at once

    Locality: when a cell is updated, its new value is based solely on

    the values of its neighbors (and on the cells history in

    n-order CA)

    Homogeneity: each cell is updated according to the same rules

    CA are good models for physical, biological and sociolog-

    ical phenomena: each person/cell/small region of space up-dates itself independently (parallelism), based on its immedi-

    ate surroundings (locality) and on some generally shared laws

    of change (homogeneity)

    Federico Pecora Agent-Based Simulation Part 2 9 / 35

    Agent-Based Simulation

    http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    11/55

    Agent Based Simulation

    Introduction to CA

    Properties of CA

    Parallelism: individual cell updates are performed independently of

    each other all of the updates being done at once

    Locality: when a cell is updated, its new value is based solely on

    the values of its neighbors (and on the cells history in

    n-order CA)

    Homogeneity: each cell is updated according to the same rules

    CA are good models for physical, biological and sociolog-

    ical phenomena: each person/cell/small region of space up-dates itself independently (parallelism), based on its immedi-

    ate surroundings (locality) and on some generally shared laws

    of change (homogeneity)

    Federico Pecora Agent-Based Simulation Part 2 9 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    12/55

    Agent Based Simulation

    Simple CA (apparently)

    Outline

    1 Introduction to CA

    2 Simple CA (apparently)

    3 Other classes of CA

    Reversible CA

    Totalistic CA

    4 Applications of CA

    Federico Pecora Agent-Based Simulation Part 2 10 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    13/55

    g

    Simple CA (apparently)

    Conways Game of Life

    Simple rules can lead to spectacular results! An example: Conways

    Game of Life

    A simple CA, with 2 states and the rule (aka S23/B3)

    Any live cell with fewer than two live neighbours dies (loneliness)

    Any live cell with more than three live neighbours dies

    (overcrowding)

    Any live cell with two or three live neighbours lives

    Any dead cell with exactly three live neighbours comes to life

    Due to John Horton Conway, british mathematician

    This is interesting for two reasons. . .

    Federico Pecora Agent-Based Simulation Part 2 11 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    14/55

    Simple CA (apparently)

    Properties of Conways Game of Life (1)

    There are no initial patterns for which there is a simple proof that

    the population can grow without limit

    There exist initial patterns that apparently grow without limit

    Ther exist simple initial patterns that grow and change for a long

    time before (a) fading away completely, or (b) going into a stable

    (static or oscillating) state

    Boat (still)

    Blinker (2-phase oscillator)

    Glider (spaceship)

    Pulsar (3-phase oscillator)

    Federico Pecora Agent-Based Simulation Part 2 12 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    15/55

    Simple CA (apparently)

    Properties of Conways Game of Life (2)

    In the 1940s, John von Neumann wanted to find a hypothetical

    machine that could replicate itself

    He built a mathematical abstraction of a self-replicating robot

    (based on Stanisaw Ulams work on crystal growth models)

    von Neumann proved that a particular pattern existed which could

    make endless copies of itself the von Neumann universal

    constructor

    Conway simplified von Neumanns method into the GoL

    The GoL has the power of a universal Turing machine, i.e., any-

    thing that can be computed algorithmically can be com-

    puted within Conways GoL

    Federico Pecora Agent-Based Simulation Part 2 13 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    16/55

    Simple CA (apparently)

    Properties of Conways Game of Life (2)

    In the 1940s, John von Neumann wanted to find a hypothetical

    machine that could replicate itself

    He built a mathematical abstraction of a self-replicating robot

    (based on Stanisaw Ulams work on crystal growth models)

    von Neumann proved that a particular pattern existed which could

    make endless copies of itself the von Neumann universal

    constructor

    Conway simplified von Neumanns method into the GoL

    The GoL has the power of a universal Turing machine, i.e., any-

    thing that can be computed algorithmically can be com-

    puted within Conways GoL

    Federico Pecora Agent-Based Simulation Part 2 13 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    17/55

    Simple CA (apparently)

    Complex patterns from simple rules

    The GoL (and CA in general) demonstrate how complex patters

    are obtainiable from very simple rules

    There exist oscillators of period 4, 8, 14, 15, 30, and a few others

    have been seen on rare occasions

    Methuselah patterns: less than 10 initial live cells that take

    longer than 50 generations to repeat

    Diehard

    dies after 130 generations

    Acorn

    takes 5206 generations to generate

    at least 25 gliders and stabilise as

    many oscillators

    Federico Pecora Agent-Based Simulation Part 2 14 / 35

    Agent-Based Simulation

    http://videos/acorn.ogghttp://videos/diehard.ogghttp://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    18/55

    Simple CA (apparently)

    Even simpler CA

    The simplest CA are one-dimensional, with two states per cell

    Neghborhood = two adjacent cells on either side

    23 = 8 possibile patterns for a neighborhood28 = 256 possible rules (256 possible CA)

    Each possible CA is identified in Wolfram notation as the

    decimal number which, in binary, gives the rule table

    current pattern 111 110 101 100 011 010 001 000new state of middle

    cell0 0 0 1 1 1 1 0

    Federico Pecora Agent-Based Simulation Part 2 15 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    19/55

    Simple CA (apparently)

    Rule 30 (00011110)

    Seed = one cell on

    Generations

    Generates apparent randomness, passes many randomtests...

    . . . but there exist an infinite number of input patterns that result in

    repeating patterns (e.g., 00001000111000, discovered by

    Matthew Cook)

    Federico Pecora Agent-Based Simulation Part 2 16 / 35

    Agent-Based Simulation

    http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    20/55

    Simple CA (apparently)

    Rule 110 (01101110)

    Seed = one cell on

    Generations

    Very simple structure, but difficult to obtain desired behaviors

    Of the 256 simple" CA, Rule 110 is the only one known to be

    Turing complete

    Federico Pecora Agent-Based Simulation Part 2 17 / 35

    Agent-Based Simulation

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    21/55

    Simple CA (apparently)

    Rule 110 (01101110)

    Like the GoL, Rule 110 is capable of universal computation

    This has been used to suggest that many of the properties of

    many natural systems (e.g., patterns on some seashells) are

    undecidable

    Federico Pecora Agent-Based Simulation Part 2 18 / 35

    Agent-Based Simulation

    Oth l f CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    22/55

    Other classes of CA

    Outline

    1 Introduction to CA

    2 Simple CA (apparently)

    3 Other classes of CA

    Reversible CA

    Totalistic CA

    4 Applications of CA

    Federico Pecora Agent-Based Simulation Part 2 19 / 35

    Agent-Based Simulation

    Other classes of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    23/55

    Other classes of CA

    Reversible CA

    Reversible CA

    A CA is reversible if its update function is bijective

    the current configuration is obtainable by exactly one previous

    configuration

    an irreversible CA is one for which there exist patterns for which

    there are no previous states

    these patterns are called Garden of Eden patterns

    (Garden of Eden pattern for GoL)

    Federico Pecora Agent-Based Simulation Part 2 20 / 35

    Agent-Based Simulation

    Other classes of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    24/55

    Other classes of CA

    Reversible CA

    Reversible CA

    Any one-dimensional CA can be proved to be either

    reversible or irreversible

    For n-dimensional CA (n 2), reversability is undecidable

    i.e., there exist n-dimensional rules for which the complexity of

    describing its inverse vastly exceeds the complexity of the rule

    itself

    i.e., the only way of proving it is to simulate!

    There exist, however, methods to build a reversible CA from an

    existing rule

    second-order technique

    vaious partitioning techniques, e.g., Margolus neighborhood

    . . . although the properties of the original rule are lost

    Federico Pecora Agent-Based Simulation Part 2 21 / 35

    Agent-Based Simulation

    Other classes of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    25/55

    Other classes of CA

    Reversible CA

    Reversible CA

    Wait a minute. . . doesnt the opposite rule give the inverse CA?

    Rule 30111 110 101 100 011 010 001 000

    0 0 0 1 1 1 1 0

    Rule 225111 110 101 100 011 010 001 000

    1 1 1 0 0 0 0 1

    Federico Pecora Agent-Based Simulation Part 2 22 / 35

    Agent-Based Simulation

    Other classes of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    26/55

    Other classes of CA

    Reversible CA

    Reversible CA

    Wait a minute. . . doesnt the opposite rule give the inverse CA?

    . . . the reverse step is not deterministic!

    Federico Pecora Agent-Based Simulation Part 2 22 / 35

    Agent-Based Simulation

    Other classes of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    27/55

    Other classes of CA

    Reversible CA

    Second order technique

    State at time t+1 is function of neighborhood at time tand stateof cell at time t1

    s(t+1) = f(n(t)) s(t1)

    s(t1) = f(n(t)) s(t+1)

    Rule 30 111 110 101 100 011 010 001 0000 0 0 1 1 1 1 0

    Rule 30R

    1 1 1 1 1 1 1 1 (t1)111 110 101 100 011 010 001 000 t

    1 1 1 0 0 0 0 1 (t+1)

    0 0 0 0 0 0 0 0 (t1)111 110 101 100 011 010 001 000 t

    0 0 0 1 1 1 1 0 (t+1)

    Federico Pecora Agent-Based Simulation Part 2 23 / 35

    Agent-Based Simulation

    Other classes of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    28/55

    Reversible CA

    Second order technique

    State at time t+1 is function of neighborhood at time tand stateof cell at time t1

    s(t+1) = f(n(t)) s(t1)

    s(t1) = f(n(t)) s(t+1)

    Rule 30 111 110 101 100 011 010 001 0000 0 0 1 1 1 1 0

    Rule 30R

    1 1 1 1 1 1 1 1 (t1)

    111 110 101 100 011 010 001 000 t

    1 1 1 0 0 0 0 1 (t+1)

    0 0 0 0 0 0 0 0 (t1)111 110 101 100 011 010 001 000 t

    0 0 0 1 1 1 1 0 (t+1)

    Federico Pecora Agent-Based Simulation Part 2 23 / 35

    Agent-Based Simulation

    Other classes of CA

    http://goforward/http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    29/55

    Reversible CA

    Rule 30R

    Federico Pecora Agent-Based Simulation Part 2 24 / 35

    Agent-Based Simulation

    Other classes of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    30/55

    Totalistic CA

    Totalistic CA

    The state of each cell is represented by a numberState at time tdepends only on the sum of the values of thecells in its neighborhood at time t1

    outer totalistic CA: neighborhood does not contain the cell itself

    totalistic CA: neighborhood does contains the cell itself

    GoL is an outer totalistic CA with values 0 and 1

    Generations S0235678/B3468/C9

    Federico Pecora Agent-Based Simulation Part 2 25 / 35

    Agent-Based Simulation

    Applications of CA

    http://videos/tot.ogghttp://find/
  • 7/28/2019 MAS 2011 Lecture 2

    31/55

    Outline

    1 Introduction to CA

    2 Simple CA (apparently)

    3 Other classes of CA

    Reversible CA

    Totalistic CA

    4 Applications of CA

    Federico Pecora Agent-Based Simulation Part 2 26 / 35

    Agent-Based Simulation

    Applications of CA

    http://goforward/http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    32/55

    CA-based encryption

    Low speed of encryption and/or decryption causes big problems

    for practical implementations

    CA are inherently paralleleasy to implement on distributed processing platforms

    Some CA exhibit strong irregularities

    e.g., Wolframs rule 30

    Reversible CA can be used as backdoor functions

    computing f() is easy, computing f1() is difficult

    Federico Pecora Agent-Based Simulation Part 2 27 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    33/55

    Stream ciphers with Rule 30

    Stream cipher: a symmetric key cipher

    where plain text is combined with PRNG

    bitstream

    Wolframs Rule 30 does not repeat for any

    short period and has no obvious structure

    The central column of Rule 30 has been

    subject to many randomness tests, and

    has passed every one so farCryptotext: combination (e.g., XOR) of

    clear stream with a column from Rule 30

    Cleartext

    Cryptotext

    XOR

    Rule30

    column

    Federico Pecora Agent-Based Simulation Part 2 28 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    34/55

    Encryption with reversible CA

    Asymmetric cipher: the key used to encrypt a message differs

    from the key used to decrypt

    e.g., public key cryptography

    It is undecidable if a 2D CA is invertible it can be very

    difficult to invert a 2D CA

    Use the message to encrypt as initial configuration for a

    reversible CA A

    Cryptotext: configuration of A at generation n (n fixed or

    depending on size of message)Keys: A is public key, A1 is private key

    it seems possible to obtain such difficult to invert CA by

    combining several simply invertible CA

    Federico Pecora Agent-Based Simulation Part 2 29 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    35/55

    Reversible CA for gasses

    Reversible CA can be employed to simulate gasses

    Homogeneity: every molecule follows one rule

    Locality: each molecule affects its neighbors only, not

    others far away from itReversibility: all information the motion of molecules is

    backward traceable

    In gasses, heat entails the motion of molecules

    As in CA, the randomness (entropy) of the system increases. . . gasses look like reversible CA!

    Federico Pecora Agent-Based Simulation Part 2 30 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    36/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 1

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    37/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 1

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based Simulation

    Applications of CA

    http://goforward/http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    38/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 2

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    39/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 2

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    40/55

    Agent-Based Simulation

    Applications of CA

  • 7/28/2019 MAS 2011 Lecture 2

    41/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 3

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    42/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 4

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based Simulation

    Applications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    43/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 4

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based SimulationApplications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    44/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 5

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based SimulationApplications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    45/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 5

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based SimulationApplications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    46/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 6

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based SimulationApplications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    47/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 6

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based SimulationApplications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    48/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 7

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based SimulationApplications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    49/55

    Reversible CA for gasses

    Hardy, de Pozzis, Pomeau (HPP) gas model

    Rules are based on Margulos Neighbourhood: 22

    partitioning of the lattice which alternates at every time step

    Rules Step 7

    Federico Pecora Agent-Based Simulation Part 2 31 / 35

    Agent-Based SimulationApplications of CA

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    50/55

    Reversible CA for gasses

    HPP gas model already comes close to Navier-Stokes equation

    realistic simulation of gasses

    More precise models allow movements in more than four

    directions

    e.g., FHP (Fritsch, Hasslacher, Pomeau) model, allowsmovements of particles in six directions used to simulate

    aerodynamics

    Solute around obstacles

    Poiseiulle flow

    Federico Pecora Agent-Based Simulation Part 2 32 / 35

    Agent-Based SimulationApplications of CA

    http://videos/Cbuoy.mpghttp://videos/E.mpghttp://goforward/http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    51/55

    CA simulation of epidemics

    Cells have 3 states: susceptible,

    infected, immune

    A susceptible cell with neighboring

    infected cell

    becomes infected with probabilityp

    becomes immune with probability

    1p

    Rate of spread depends on

    susceptibility to virus pdefinition of neighborhood

    Equivalent to forest fire model

    SIR Epidemic model

    Federico Pecora Agent-Based Simulation Part 2 33 / 35

    Agent-Based SimulationApplications of CA

    http://videos/epidemic.ogghttp://find/
  • 7/28/2019 MAS 2011 Lecture 2

    52/55

    CA simulation of epidemics

    Cells have 3 states: susceptible,

    infected, immune

    A susceptible cell with neighboring

    infected cell

    becomes infected with probabilityp

    becomes immune with probability

    1p

    Rate of spread depends on

    susceptibility to virus pdefinition of neighborhood

    Equivalent to forest fire model

    SIR Epidemic model

    Federico Pecora Agent-Based Simulation Part 2 33 / 35

    Agent-Based Simulation

    Applications of CA

    http://videos/epidemic.ogghttp://find/
  • 7/28/2019 MAS 2011 Lecture 2

    53/55

    CA simulation of traffic flow

    Dynamics of vehicles represented

    in coarse-grained way

    Space and time are discretized

    One dimensional toroid grid

    Emergence of stop-and-go

    behavior from injection of simple

    non-determinism

    slowdown probability

    slow-to-start rules

    An interesting example of

    agent-like CA

    Nagel-Schreckenberg model

    Federico Pecora Agent-Based Simulation Part 2 34 / 35

    Agent-Based Simulation

    Applications of CA

    http://home/fpa/Documents/teaching/MAS-course/trafficCA/trafficCA.htmlhttp://goforward/http://find/http://goback/
  • 7/28/2019 MAS 2011 Lecture 2

    54/55

    Cellular Automata

    Thank you!

    Federico Pecora Agent-Based Simulation Part 2 35 / 35

    Agent-Based Simulation

    References

    http://find/
  • 7/28/2019 MAS 2011 Lecture 2

    55/55

    References

    Federico Pecora Agent-Based Simulation Part 2 35 / 35

    http://find/