16. Emergent behavior

[status: content-mostly-written]

16.1. Motivation, prerequisites, plan

Purpose: a fun exploration of how complex large-scale behavior emerges from very simple rules on the small scale.

Prerequisites:

  • The 10-hour “serious programming” course.

16.2. Before you start

16.3. Write the simple-ca.py program which implements a cellular automaton

See the separate source code at URL

https://sites.google.com/site/santafecoding/documents/simple-ca.py

You can copy this program in, or you can download it and ready through it to understand how it works.

16.4. Install and run the golly program

Command line: type “golly”, it will tell you how to install it. Experiment with drawing your own initial cells and use TAB to advance one at a time, or the run button to advance more.

Then explore the library of starting positions, specifically:

Life -> Guns -> 2c5spaceship-gun-p416

Life -> Guns -> golly-ticker

16.5. Further study

16.5.1. Play with the simple-ca.py program

Make modifications to simple-ca.py to make it

  • Run longer runs so you can see more of the patterns.
  • Have more cells in each row – make it as wide as your terminal will go.
  • You will find the following lines of python code in simple-ca.py:
new_row[i] = new_cell(neighbors)
## NOTE: new_cell_with_rule() is part of the extended code (at
## the bottom)
# new_row[i] = new_cell_with_rule(neighbors)
comment out the line that sets new_row[i] to be the result of new_cell(), and uncomment the line that sets it to be new_cell_with_rule(). Then look at the code in new_cell_with_rule() and play with setting different rules and seeing what the cellular automata look like.

16.6. Further reading

  • Godel, Escher, Bach

    Read the dialogues “Prelude … Ant Fugue”. All the dialogues in the book might be quite interesting to you.

  • Watch the rest of the online course on Complexity

    In the prerequisites I had you watch some sections of Melanie Michtell’s online course on Complexity. You could watch the rest of the series. At a very minimum watch the sections on genetic algorithms and the game of life.

    https://www.youtube.com/playlist?list=PLF0b3ThojznRyDQlitfUTzXEXwLNNE-mI