Each square (or "cell") on the grid can be either alive or dead, and they evolve according to the following rules:
- Any live cell with fewer than two live neighbors dies (referred to as underpopulation)
- Any live cell with more than three live neighbors dies (referred to as overpopulation)
- Any live cell with two or three live neighbors lives unchanged to the next generation.
- Any dead cell with exactly three live neighbors comes to life.
Cellular automata are a class of mathematical models that describe the behavior of
systems composed of discrete, locally interacting elements.
The elements are often represented as cells on a regular lattice, such as a two-dimensional grid, and the state of
each cell is updated according to a set of rules that depend on the state of its neighbors.
Cellular automata have been used to model a wide variety of phenomena, including
physical systems, biological systems, and social systems.
Authored By : Shadmehr Salehi , Nazanin Zarei ,Foozhan Fahimzade