The Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is the best-known example of a cellular automaton. The model is actually a zero-player game, meaning that its evolution is determined by its initial state. There is no need for input from human players during the run, hence it the agent-based model architecture is a perfect fit for it.
This model is an example implementation of Game of Life, download it here.
How does it work?
The world of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states; living or dead. Every cell interacts with all its eight neighbors, which are the cells that are directly horizontally, vertically, or diagonally connected to it. At each step in time, the following transitions occur:
The initial pattern constitutes the first generation of the system. The second generation is created by applying the above rules simultaneously to every cell in the first generation - births and deaths happen simultaneously, in ticks. The rules continue to be applied repeatedly to create further generations.
Modifying the model
Try to implement other rules for the neighbourhood relation. Give some different rules to the numberOfNeighbours(x, y) function and see how does it influence the model's behavior.