Write a program to play the game of life and investigate


The game of Life, invented by the mathematician John H. Conway, is intended to model life in a society of organisms. Consider a rectangular array of cells, each of which may contain an organism. If the array is viewed as extending indefinitely in both directions, then each cell has eight neighbors, the eight cells surrounding it. In each generation, births and deaths occur according to the following rules:

  • An organism is born in any empty cell having exactly three neighbors.
  • An organism dies from isolation if it has fewer than two neighbors.
  • An organism dies from overcrowding if it has more than three neighbors.
  • All other organisms survive.

To illustrate, the following shows the first five generations of a particular configuration of organisms:

2405_generations of a particular configuration of organisms.png

Write a program to play the game of Life and investigate the patterns produced by various initial configurations. Some configurations die off rather rapidly; others repeat after a certain number of generations; others change shape and size and may move across the array; and still others may produce "gliders" that detach themselves from the society and sail off into space.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program to play the game of life and investigate
Reference No:- TGS02583981

Now Priced at $15 (50% Discount)

Recommended (99%)

Rated (4.3/5)