top of page

The game of life

 

 

     The "game of life" is not a game strictly speaking, or rather a zero player game... It is called a cellular automaton handled by specific rules allowing to switch from a state "n" to a state "n+1".

​

     The game is based on a two dimensions grid, where each cell can have two values: alive (white) or dead (black). This grid is potentially infinite, but for obvious reasons it will be limited to a predefined size, but unbounded (as by repetition, right side is "against" left side, same for up and down sides). The next state of a cell is defined by its own current stat and the cirrent state of its eight neighbors cells.

​

The rules

​

     We wanted to make the game jst like John Horton Conway thought it through, meaning it follows two simple rules:

  • An alive cell surrounded by two or three alive cells will remain alive, and will die overwise.

  • A dead cell surrounded by exactly three alive cells will become alive, and will remain dead overwise.

​

These basic rules allow to get patterns that can potentially repeat themselves, and "give life" to cells.

Below, we can modify some parameters of the grid and see the cells evolution during time:

​

 

 

     The algorithm used here is basically rough and was not particularly optimized: to display an image, every cell of the grid is scanned, to check every neighbor's state. This process is computed by the computer processor. Because of that, if the defined grid is too wide, the framerate may drastically drop...

​

 

 

     A way to bypass this performance issue is to give this process to the graphical processor, through a shader. Since the graphic card is optimised to handle this kind of computing, the limitation encountered before will be pushed much far away. We will then be able to increase the images processing speed, or heavily increase the image size we want to play with.

​

bottom of page