Biomedical Engineering Reference
In-Depth Information
2.1.1 Game of Life Algorithm
John Conway created a system which today is known as the
[ 17 , 18 ]. He explored possibilities of constructing a system which is capable of
performing universal computations. He constructed a rectangular grid comprising
of squares which he named as cells. He assigned vales 0, 1 to each square cell and
termed cells with value 0 dead cells and value 1 alive. The other probable possi-
bilities of differing states include all cells becoming dead, system coming into a
steady state and becoming
Game of life
xed thereafter, or system entering into oscillating states
which repeats itself for some periods of time. He programmed the system such that
it regularly updated its cells basing on a set of rules which he named as
life and
death rules.
He stated that a cell that is alive can remain alive only if it has exactly
2 or 3 neighboring cells that are alive. A dead cell can become alive if it has exactly
3 neighboring alive cells. All other cells remain dead [ 17 ].
/* Procedure: Game of Life Algorithm */
Construct the Square Lattice;
Create and Initialize the initial position;
Repeat until end conditions are satisfied;
{
For each cell in the lattice
{
var =0;
For each neighboring cell
{
If current cell state =
alive var++;
}
If the cell is in alive state
{
If ((var !=2) || (var
!=3)) Kill cell;
}
Else /* the cell is dead */
{
If var =3
Revive cell
}
}
He framed the rules trying to model the biological replication of the cells and
also stated that any live cells with fewer than 2 neighbors die as if caused due to
underpopulation. Live cells which have 2 or 3 live neighbors live onto the next
generation. If a cell has more than 3 neighbors, it dies due to overcrowding. A dead
Search WWH ::




Custom Search