More on game of life

I prepared a small modification to the code that is able to track the percentage of cells that changed their state from the previous time step (shown as the last column). The modifications are not significant, you should look at “num_changed” throughout the code to track them. A link:

http://ideone.com/BVRez

I’d like to see some variants of the code with rule modifications by Monday morning. The most challenging but also interesting one would involve more types of living cells, e.g. 2. This would create an opportunity for all kinds of new rules and behaviors, but would also require you to modify the code to track not only the number of living and dead cells, but also the number of cells of each type (or percentage in terms of the number of living cells). The code modification will also require the neighbors to be not only counted, but the system needs to make a count of the different neighbor types.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


− two = 0

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>