Title: Cellular Automata: from regularity to complexity
1Cellular Automata from regularity to complexity
- Useful reference
- A New Kind of Science
- by Stephan Wolfram
2Parallel automata
- We have seen that Turing machines are in
principle as powerful as any computing machine
ever built. However, its worth considering other
computing models which might make addressing some
problems easier. - Weve seen that a variation of the Turing machine
is to have many tape heads where many cells can
be modified in each step. - What if we could modify every cell on each step,
all in parallel? - This is the basis of cellular automata.
3Cellular automata (CA)
- In cellular automata, the control unit is usually
replaced by a set of rules for how a given cell
is to be modified on the next step. - In these rules, the choice of what to put in a
given cell usually depends on what was in the
cell the previous step, as well as what was in
the cells close to it. - For example, in some well studied CA, the rules
depend on what was in a given cell and what was
in the cells just to its left and right.
4Cellular Automata
- Consider rules like these. We assume an infinite
line of blocks. All are white, except for one
which is black (or equivalently, one occupied,
the others blank.) - Assume that the tape begins like this
- How do we get the next step which will also be an
infinite row of blocks below the first one?
5The rules
- The colour of each block on the next line is
uniquely determined by the colour of the three
blocks directly above it, or the previous step.
?
?
6Example 1
- To completely specify the rule we have to say
what happens in 8 cases (the parents). - For example
- From this we can construct the rest of this
cellular automata (CA). What does it look like?
Parents
children
7Building the first CA.
The first six steps. The end result is pretty
boring.
8Example 2
- Consider the following rule
- It only differs from the first one by the second
set of blocks - What does this CA look like?
9Again it is an infinite tower, this time not so
boring, but still not very interesting!
10Example 3 something interesting!
- What CA does the following CA give rise to? It
only differs from the last example in the last
two sets of blocks
11These are the first 8 rows what does the rest
look like?
12Clearer now?
13A few hundred steps of this CAgives the
Sierpinski Gasket!
(This and the following graphics from Wolframs
book)
14Fractals
- The Sierpinski Gasket is a fractal.
- Roughly speaking, a fractal is an object that
looks the same no matter how much one zooms in or
out
15Another fractal example
16Fractal dimensions
- Fractals also usually have dimensions which are
not integers! The Sierpinski gasket has
fractal dimension D 1.5849 - What does this mean? We need a useful definition
of dimension. Use the formula - V L D
- Here D is the dimension, V is the volume and L
is the length of a box enclosing the object
17Consider a box which encloses the first triangle.
How much more of the image do we enclose if we
double both sides of the box? We get the whole
figure, which is three copies of the first
triangle! So V increases by 3, while L has
increased only by a factor of 2..
18Fractal dimensions
- Rewriting the equation for the dimension gives
- D logL V
- Which in this case is
- D log2 3 1.58496
19From fractals to randomness
- We have seen that a very simple rule can give us
fractal behaviour - But can a simple rule give us anything that is
unpredictable or random?
20Rule 30
Consider the following rule, which Wolfram calls
Rule 30
It generates the Following CA Can you
predict What it will look like? Further on?
21Rule 30after 1500 steps
There is a change From predictable To
unpredictable Along the line
22Zoom of the regular region
23Zoom of the random area
24- We have seen that Cellular automata with very
simple rules just two colours and only three
parents can give rise to - Regular behaviour
- Fractals
- Randomness and interesting phase transitions
25Some of the possible 256 CA behaviours
Two colours, 3 parents
26Some more patterns
27And some more
28Conclusions
- Cellular automata can mimic very complex
behaviour and mathematics - Unanswered question Is there any
behaviour these simple cellular automata cannot
mimic?
29How can we generalise these CA?
- Add more parents or more colours
- Make the rules non-deterministic give only
probabilities for the next step. For example, we
could change the rule to
60
40
30Applications of probabilistic CA
- Traffic flow
- Crowd movement
- Formation of galaxies
- Spread of fire in forests
- Anywhere the interactions are local!
31CA in higher dimensions
- We can also generalise our CA by allowing the
initial state to be two dimensional (or higher
dimensional) - So, instead of starting with
32We start with a 2d grid, with some distribution
of black squares
Our earlier CA rules are not enough anymore Now
the rules should depend on the neighbouring cells
in every direction
33To work out the future colour of any square
We need to look at the squares around it, for
example the nearest 8
To fully specify all possible combinations the
rule would need to show 256 cases! (not just 8
like the 1d CA)
34Concise rules for 2d CA
- It is easier to give general descriptive rules.
- Example At the next step a square will become
black if every square around it is black,
otherwise it will be white. - For any finite distribution of black squares,
this CA will eventually end up being completely
white (why?)
35Conways Game of Life
- In 1970 John Conway devised his Game of Life
a 2d CA. - He had three aims
- He wanted no simple pattern to grow forever
- He wanted wild, unpredictable growth
- There should be patterns that changed a great
deal before stabilising (emergent complexity)
36The rules for Life
- If a square is black (on) then it will be
black at the next step if 2 or 3 of its
neighbouring squares are black - A white (off) square will become black only if
it has exactly 3 black neighbouring squares - Otherwise a square will be white (die) the next
step (either because it is overcrowded or lonely)
37- So, we can have birth
- Or death
- A nice implementation is at
- www.math.com/students/wonders/life/life.html
38Types of behaviour in the Game of Life
- Still life objects unchanging
- Simple repeating patterns (oscillations)
- Part of the system can leave the rest and travel
(movement - gliders) - The system can die out completely
- The system grows randomly before stabilising to
predictable behaviour - The system grows forever (quite rare and
difficult to find)
39The R-pentomino
- What happens to this starting point? How long do
you think it takes to stabilise to something
predictable? - What happens if we change it slightly?
40Chaos
- All behaviour in the Game of Life is chaotic it
depends extremely sensitively on the starting
state and is completely altered if the system
changes a little -
- Just like the weather the butterfly effect
Could the fluttering of a butterflys wings in
China affect our weather next week?
41 - Cellular Automata despite having extremely
simple rules show a remarkable range of
phenomena which we see in real life including
emergence of complexity, chaotic behaviour and
apparently random behaviour