Once upon a time there was a mathematician who's name was John Conway. He created many things, and one of these things was a game with cells, to simulate life. It is interesting because it shows how simple rules can create stunning patterns. In this way it is a model for the evolution of life on earth.
The artificial world Conway created consists of a board divided into square cells. Every cell is dead or alive. Time flies in steps, so we can speak about a moment t, and a moment t+1, the first moment after t. Every cell has 8 direct neighbours, because we count the diagonal neighbours also. For each cell we can count the living Neighbours on moment t. Call this number N.
The laws of physics are such that a cell lives on t+1:
Some very beautifull starting configurations are discovered. Do "random seed" and push start a couple of times and maybe you will find the glider: A bunch of 5 cells traveling by themselves. There are more and bigger ships also. There are stable patterns, the simplest being the 2x2 square. And there are periodic configurations, like the blinker: a horizontal or vertical line of three cells.
Regarding the code:
Just email me if you have any problems reading or running it.