As a last example, we will simulate life with Conway's Game of Life. The original game of life is based on a few basic rules. We start out with a random configuration on a two-dimensional square grid. Each cell in the grid can be either dead or alive. This state depends on the neighbors of the cell. You can read more about the rules at http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life#Rules At each step in time, the following transitions occur:
Convolution can be used to evaluate the basic rules of the game. We need the SciPy package for the convolution process.