The Computational Beauty of Nature
Source code

life

play Conway's Game of Life

Full screen →

life -help
  or
life   [-width integer] [-height integer] [-extra integer]
       [-wrap] [-infile string]  [-steps  integer]  [-inv]
       [-mag integer] [-term string]

Simulates Conway's Game of Life with an arbitrary set of initial conditions. Input files need to be in the PBM file format.

Simulate Conway's Game of Life with an arbitrary set of initial conditions. Input files need to be in the PBM file format.

Miscellany

You will need to use the -extra option in conjuction with the -wrap option if you wish to simulate moving objects that tend to fly off in one direction. Periodic patterns may need the -extra option to give them a little bit of extra room to work in.

Bugs

No sanity checks are performed to make sure that any of the options make sense.

Credits

The data files for the initial states supplied with this

program were lifted and converted from the excellent and free program xlife.

Options

-widthWidth of the plot in pixels.0
-heightHeight of the plot in pixels.0
-extraNumber of extra border pixels.5
-wrapWrap around world?True
-infileInitial configuration filedata/life/p8.pbm
-stepsNumber of time steps to simulate.1000
-invInvert all colors?True
-magMagnification factor.10
-termHow to plot points.None

life.c on GitHub