Online Introduction to Conway's Way of Life in Javascript

Introduction

The Game of Life was invented in 1970 by John Horton Conway a British mathematician as an intriguing solitaire pastime which he called "life". It is one of several 'simulation' games or 'cellular automaton' which have been invented that have analogies with the rise, death and development of colonies of living organisms – i.e. they resemble real-life processes. Originally it was played with a large checkerboard and a heap flat counters of two colours – one for live cells and one for dead cells. In some ways it resembles the ancient Oriental game of "Go", with the concept that a cell surrounded by 4 neighbours (vertically and horizontally) dies. The game is much easier to play on a computer.

The basic idea is to start with a simple pattern of counters (organisms), one to a square on the board, then see how the pattern and distribution of cells changes as you apply Conway's list of "genetic life laws" for births, deaths and survivals. Conway spent a lot of time choosing his rules after many experiments.

The Game of Life - Rules and How to Play

The outcomes for the starting pattern or 'colony' cannot be predicted, and there are several outcomes. The colony can grow for several generations before:

  • disappearing gradually, either temporarily or permanently (from being isolated ('lonely'), too sparse or dies out through overcrowding
  • reaching a stable configuration that remains as a fixed pattern,
  • or becoming an oscillating pattern in which the colony repeats through a cycle in an endless cycle of two or more periods.

The game is now played on computers is a 'set and let go' game, meaning that its path and outcome is determined by its initial state, described as a 'seed', and no further input is require from the player. The fascination with the Game of Life lies with the creation of an initial seed configuration and seeing how it evolves and whether you can create a population that lives for ever or produces and interesting oscillating pattern or stable fixed set of colonies.

Rules

The universe of the Game of Life is a potentially infinite two-dimensional grid of squares, each of which can be live or dead. Every cell is influenced by its eight neighbours in the colony, which includes the cells that are directly adjacent either horizontally, vertically, or diagonally. At each step in time (known as a 'tick' or step of the game), the following transitions occur:

  • Survivals - Every cell with 2 or 3 neighbouring counters survives for the next generation.
  • Deaths - Each cell with 4 or more neighbours dies (disappears) from overpopulation. Every counter with 1 or zero neighbours dies from isolation (loneliness).
  • Births - Each empty or dead cell that is adjacent to exactly 3 neighbours no more or less, is a birth cell through reproduction. A live cell is added at the location the next move.

The HighLife version spawns a new cell if there are exactly 6 neighbouring cells a well as 3.

Players should note that all deaths and births occur simultaneously. The outcome of applying all the rules constitute a single generation step in the evolution of the population or colony. Because deaths and births occur simultaneously, the newborn cells have no role in leading to the retention of adjacent cells or their deaths and births in the generation in which they were created.

The initial cellular layout or pattern is described as the 'seed' for the game. The first generation of the colony is produced by applying the rules to every cell in the seed - both deaths and births occur simultaneously, and the precise time when this happens is often referred to as a 'tick'. Each generation is purely created from the one before without input from the player. The rules and calculations of neighbours continues to be applied to create further generations unless the pattern is fixed and stable or the colony dies out completely.

Players will be intrigued to see the population developing and progressing through unusual, sometimes lovely and unexpected changes with unpredictable outcomes. Sometimes the colony or population eventually dies out (all cells die), although this may not occur until after a large number generations. Most seed patterns either reach stable pattern, that Conway called 'still lifes', that don't change or patterns that oscillate forever. Seed patterns with no initial symmetry often become symmetrical after several generations. Once this happens the symmetry remains, and it may increase in richness by will not become unsymmetrical again.

Game of Life devotees have catalogued more than 600 of interesting seed patterns leading to unique and interesting populations, including:

  • Glider – set of 5 cells that moves diagonally down or up the page. The glider regenerates the start pattern in the same orientation after four generations.
  • Gun - a pattern that repeatedly shoots out a sequence of moving objects such as the "glider" or another pattern referred to as a "puffer train" (a pattern that leaves behind a trail of "smoke" particles as it moves across the board).
  • Spaceships - the glider is a "featherweight spaceship"; there are many others with lots more cells and complexity, but they all glide across the board).
  • Traffic lights blinkers - three or more cells that flash from a vertical to a horizontal position.
  • Star Patterns - oscillating patterns that resemble stars or fire-works.

Ever since its inception, Conway's Game of Life has generated huge interest and many devotees because of the fascinating way the patterns and structures appear and evolve It also provides programming challenge and life simulation modelling. The Game of Life provides an example of self-organization and emergence and is a good example of cellular automaton . It is interesting for mathematicians, physicists, philosophers, biologists, economists, population scientists and others to study the way that complex structures, patterns and oscillating forms can emerge from the application of very simple rules. The popularity of Conway's Life was increased by the widespread availability inexpensive minicomputers (PC's) which at the time became more readily available. This allowed longer and more complex seeds to be run for millions of generations.

The game was originally played as a manual board game but it was tedious and difficult to apply the rules. Computers changed this and there have been a huge number of programs developed. It has been set as a classic computer programming language for generations and information technology students. Surprisingly although there is a java applet, that can be run on a website, there have been few stand-alone website applications using Javascript.

© janderson99-HubPages

A recent application provides a simple introduction:

Since Life's original inception, various new cellular automata of the same theme have been developed. Variant HighLife, includes an extra rule that 6 neighbours, in addition to the 3 neighbours causes a birth. HighLife is best known for its frequently occurring replicators which are patterns that create series of identical colonies that replace the original colony or produce new colonies.

The new website applications provide an easy way for new user to play the game.

From a seemingly random initial pattern of living cells on the grid, players will find the on-screen population constantly changing and evolving as the generations tick by. Many beautiful patterns can be developed from the simple rules. Small isolated colonies of cells showing no initial symmetry generally become symmetrical after several generations. When this happens the symmetry remains is only lost if a nearby colony moves in and devours it. In some cases the population eventually dies out, with all living cells disappearing, but this may not occur for many generations and after the colony has passed through many stages. Most initial patterns eventually produce either stable patterns or colonies that oscillate forever between two or more states. The patterns may also produce one or more gliders or spaceships that move off away from the initial location.

It is very interesting to try the more than 600 patterns that have been invented and to try your own.

But beware you can become obsessed by the Game of Life. Enjoy!

© janderson99-HubPages

More by this Author


Comments

No comments yet.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working