1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
2. Any live cell with more than three live neighbours dies, as if by overcrowding.
3. Any live cell with two or three live neighbours lives on to the next generation.
4. Any dead cell with exactly three live neighbours becomes a live cell.
I like to use this algorithm to experiment with new graphics libraries, so I had my own Processing version from back in 2005. I’ve ported it to Processing.js here conway-js.
I’ve uploaded my Processing.js examples to DailyJS so you can see them without checking out the git repositories: