CS 420/594 — Biologically Inspired Computation
NetLogo Simulation

Life


This page was automatically generated by NetLogo 3.1.4. Questions, problems? Contact feedback@ccl.northwestern.edu.

The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun’s Java site.  General information on the models, including instructions for running them on your own computer, is available from the NetLogo Simulation Information Page.

created with NetLogo

view/download model file: Life.nlogo

WHAT IS IT?

This program is an example of a two-dimensional cellular automaton. A cellular automaton is a computational machine that performs actions based on certain rules. It can be thought of as a board which is divided into cells (such as square cells of a checkerboard). Each cell can be either "alive" or "dead." This is called the "state" of the cell. According to specified rules, each cell will be alive or dead at the next time step.

This particular cellular automaton is called The Game of Life. The rules of the game are as follows. Each cell checks the state of itself and its eight surrounding neighbors and then sets itself to either alive or dead. If there are less than two alive neighbors, then the cell dies. If there are more than three alive neighbors, the cell dies. If there are 2 alive neighbors, the cell remains in the state it is in. If there are exactly three alive neighbors, the cell becomes alive. This is done in parallel and continues forever.

There are certain recurring shapes in Life, for example, the "glider" and the "blinker". The glider is composed of 5 cells which form a small arrow-headed shape, like this:

           X
X
XXX

This glider will wiggle across the world, retaining its shape. A blinker is a block of three cells (either up and down or left and right) that rotates between horizontal and vertical orientations.


HOW TO USE IT

The INITIAL-DENSITY slider determines the initial density of cells that are alive. SETUP-RANDOM places these cells. GO-FOREVER runs the rule forever. GO-ONCE runs the rule once.

If you want to draw your own pattern, use the ADD-CELLS button and REMOVE-CELLS button and then use the mouse to "draw" in the view. Make sure only one of the two buttons is active -- if they're both active, you'll get unexpected behavior.

You can use SAVE STATE to save an interesting configuration, which can be loaded later with LOAD STATE.  (The files have a ".csv" extension automatically appended and are saved or loaded from the same directory as the .nlogo files.)

Try loading the following initial states: Life-glider, Life-cmu, Life-p8, Life-clock, Life-largefish, Life-12gliders, Life-blinkerpuffer, Life-gardenofeden, Life-benchmark, Life-oscillator1 (all from Flake) for some interesting examples.


THINGS TO NOTICE

Find some objects that are alive, but motionless.

Is there a "critical density" - one at which all change and motion stops/eternal motion begins?


THINGS TO TRY

Are there any recurring shapes other than gliders and blinkers?

Build some objects that don't die (using "add-cells")

How much life can the board hold and still remain motionless and unchanging? (use "add-cells")

The glider gun is a large conglomeration of cells that repeatedly spits out gliders. Find a "glider gun" (very, very difficult!).


EXTENDING THE MODEL

Give some different rules to life and see what happens.

Experiment with using neighbors4 instead of neighbors (see below).


NETLOGO FEATURES

The neighbors primitive returns the agentset of the patches to the north, south, east, west, northeast, northwest, southeast, and southwest. So "count neighbors with [living?]" counts how many of those eight patches have the living? patch variable set to true.

neighbors4 is like neighbors but only uses the patches to the north, south, east, and west. Some cellular automata, like this one, are defined using the 8-neighbors rule, others the 4-neighbors.


RELATED MODELS

Life Turtle-Based - same as this, but implemented using turtles instead of patches, for a more attractive display
CA 1D Elementary - a model that shows all 256 possible simple 1D cellular automata
CA 1D Totalistic - a model that shows all 2,187 possible 1D 3-color totalistic cellular automata
CA 1D Rule 30 - the basic rule 30 model
CA 1D Rule 30 Turtle - the basic rule 30 model implemented using turtles
CA 1D Rule 90 - the basic rule 90 model
CA 1D Rule 110 - the basic rule 110 model
CA 1D Rule 250 - the basic rule 250 model


CREDITS AND REFERENCES

The Game of Life was invented by John Horton Conway.

See also:

Von Neumann, J. and Burks, A. W., Eds, 1966. Theory of Self-Reproducing Automata. University of Illinois Press, Champaign, IL.

"LifeLine: A Quarterly Newsletter for Enthusiasts of John Conway's Game of Life", nos. 1-11, 1971-1973.

Martin Gardner, "Mathematical Games: The fantastic combinations of John Conway's new solitaire game `life',", Scientific American, October, 1970, pp. 120-123.

Martin Gardner, "Mathematical Games: On cellular automata, self-reproduction, the Garden of Eden, and the game `life',", Scientific American, February, 1971, pp. 112-117.

Berlekamp, Conway, and Guy, Winning Ways for your Mathematical Plays, Academic Press: New York, 1982.

William Poundstone, The Recursive Universe, William Morrow: New York, 1985.

To refer to this model in academic publications, please use: Wilensky, U. (1998). NetLogo Life model. http://ccl.northwestern.edu/netlogo/models/Life. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

In other publications, please use: Copyright 1998 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/Life for terms of use.

Program modified 2007-07-25 by Bruce MacLennan to allow saving and loading of complete CA state.


Return to CS 420/594 home page

Return to MacLennan's home page

Send mail to Bruce MacLennan / MacLennan@utk.edu

Valid HTML 4.01! This page is www.cs.utk.edu/~mclennan/Classes/420/NetLogo/Life.html
Last updated: 2007-08-21.