'Game' of Life

Life requires a browser with JavaScript support; it has been tested with

Let me know about your experience with other browsers. If Images are not loaded automatically, you'll have to Load/Show Images manually after (re)loading page

What is Life? | Using Life | Examples | Versions | Distribution


X: Y: Auto Dot?

Pat: Gen:































What is Life?

Life icon

Life is a mathematical simulation (game) described by John Conway in Scientific American in Oct. 1970.

Several rules are used to create a next generation from a cell's 8 neighbors:

0|0|0
0|?|0
0|0|0
Survival
a cell with 2 or 3 neighbors survives
Death
a cell with 1 or less, or 4 or more neighbors, dies
Birth
an empty cell with exactly 3 neighbors will be born

Using Life

Pat:
pattern to add
Clear
clear all cells, reset Gen counter
Next
evolve a single generation
Gen
Generation counter
Repeat/Stop
evolve until all cells are empty or static, or you tap Stop or Clear
click in a cell
add current pattern (Pat); if dot, toggles the cell. Note: if this doesn't work in older browsers, use the following controls:
Add
add the current pattern (incl. dot) at current X,Y location. Note: 0,0 is left,upper corner
L-
move one cell left; if Pat is dot and Auto Dot is on, automatically add dot there
X:
current X(column) location. Enter a number between 0-29
R+
move one cell right (see L)
U-
move one cell up (see L)
Y:
current Y(row) location. Enter a number between 0-29
D+
move one cell down (see L)
Auto Dot?
if on and Pat is dot, automatically add dot with L/R/U/D buttons

Note: grid area is currently 30x30 (adding more rows is easy; more columns would be more work). Larger patterns run more slowly in general; they also refresh more slowly in NN.

If clicking in grid area does not add pattern in older browsers, these commands allow you to add cells:

Examples

...to try (some in pattern picker):

blinker: flips
OOO
glider: down&left 1 in 4 steps
 O
O
OOO
block: stable
OO
OO
beehive: stable
 OO
O  O
 OO
5 long: turns into "traffic lights" (4 blinkers) in 9 steps
OOOOO
7 long: "honey farm" (4 beehives)
OOOOOOO
9 long: double traffic lights
OOOOOOOOO
a pattern/link page

Versions

Last updated: 21 Jun 2005: updated syntax via JSLint and tested with newer browsers

Distribution

This version is free, and can be downloaded locally and mirrored in its entirety. If you copy/modify/improve the code, I would appreciate an acknowledgment of this version and link to this page.

© 1999-2007, S. Weyer. All Rights Reserved Worldwide.

Valid HTML 4.01 Transitional