This is an implementation of cellular automata following Conway's Game of Life Rule. Each cell in this case only has two states, either being alive or dead. The state of each cell is updated based on the states of its eight neighborhoods, which are the cells that are horizontally, vertically, or diagonally adjacent.
At each step in time, the following rules apply:
The automaton is initialized randomly at the beginning and evolves over time as each cell's state is updated based on the states of its neighbors. In the mean time, the age of each cell is also tracked and will increment if the cell's state stays the same. It is used to color each cell as that cell ages.