Play Conway’s Game of Life on Bitcoin Forever

Conway’s Game of Life is a fascinating zero-player game on a grid, whose evolution is determined by its initial state. Each generation is a pure function of the preceding one.

Game Of Life

We implement the game on Bitcoin SV. Each generation evolves to a new generation when triggered by a bitcoin transaction. The game lives completely on chain. As long as there are transactions interacting with it, it lives on chain forever.

Rules

  1. Any live cell with fewer than two live neighbours dies, as if by needs caused by underpopulation.
  2. Any live cell with more than three live neighbours dies, as if by overcrowding.
  3. Any live cell with two or three live neighbours lives, unchanged, to the next generation.
  4. Any dead cell with exactly three live neighbours cells will come to life.
The Game of Life

Implementation

The generation of the game is stored as the state of the contract. We show the part enforcing rules below. The complete contract can be found here.

Game of Life Contract

sCrypt Inc is a company with mission to providing integrated on-chain smart contracting solutions on Bitcoin SV. https://scrypt.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store