For this lab you will work on Project 8.12 (Cellular Automata, pages 145-148). This is a complicated, multi-part project, so I encourage you to work carefully on one part at a time. First, read through the description of the topic on pages 145-146. Then you will be ready to begin Exercise 8.19.
To get started on Exercise 8.19, download and unzip this file Then complete exercise 8.19, which you can test by running the script test8_19.py (as usual, just open this script and hit F5). You should get a plot that looks like Figure 8.1.
Once you have solved Exercise 8.19 move on to Exercise 8.20 and use test8_20.py to test your solution. Before moving on to Exercise 8.21, check with me so I can put your caiter function through its paces.
Next you can attack Exercise 8.21, testing your solution by running test8_21.py. You can put your intToBits function in the same caiter.py script file as your caiter function. Solving this exercise will mean that your caiter function no longer works with Exercise 8.20 (the rule input will be in a new format), which is fine. Once you’ve completed 8.21, check with me again so I can try it out.
To complete the lab, do Exercise 8.22. Since this exercise represents an optimization, not a new feature, you can still test your solution with test8_21.py. You need only submit your final version of caiter.py to sakai. As ever, make sure to include a comment block on the top with your team member names!
Extra Credit exercise For extra credit, do Project: The Mandelbrot Set (pages 148-152)