Wolfram Language

Open live version

Implement Conways Game of Life

Conways Game Of Life, in three lines of code.


code

X

Show the development over time of the average slice of a Game of Life board:

X

how it works

Implementing a complete, dynamic Game of Life in the Wolfram Language requires three lines of code:

In[1]:=
X
Out[1]=

The first line defines the rules of the Game of Life in the format used by the CellularAutomaton function. The second line sets up a 50×50 board of random zeros and ones. The third line runs the game and plots the developing board.

This expressionfrom Stephen Wolframs video Introduction to the Wolfram Languageshows the development over time of the average slice of a Game of Life board.

In[2]:=
X
Out[2]=