This web page shows the output of an implementation of Conway's Game of Life written for the Ethereum network as a Smart Contract. In order to evolve the world to its next state (i.e., go to the next turn) one must simply send at least 0.00001 ETH or more to the smart contract's address on the network. Here are some more details:
0.00001 ETH
, or 10000000000000 Wei
to the following address using the Rinkeby Test Network. You can click the address to start a transaction - I recommend a gas limit of at least 400,000.I wrote up a blog post about this project on my website, which explains some of the challenges.
However, you can inspect the code yourself, it's all on GitHub. Just click the link below:
Conway's Game of Life is a cellular automata, and can also be described as a turn-based "zero-player game."
It is made up of a two-dimensional grid of cells. You can think of each cell as having the potential to be populated - it can be alive or dead, and during each turn in the game its state is reassessed based on the states of its 8 neighbours. These are the "rules" by which a cell's state is determined each turn.
Most implementations of the Game of Life simply have
My name is Dan, I'm a software engineer from the UK who lives in Vancouver, BC in Canada. I have a website where I talk about software, books, and the surprisingly good music that I make, plus a Twitter and a GitHub page.
Since 2014 I have been steadily writing implementations of the Game of Life in various languages. It's a fun exercise in TDD and a good way to be exposed to new technologies. The ever-increasing interest in cryptocurrencies and slow rise in availability of distributed apps (Dapps) and smart contracts prompted me to experiment with a version of the game which could run as a Dapp. Turns out, it can.
I started by completing a Hello World tutorial by Brij Mohan, and then started from scratch with a new project. You can read more in a blog post I wrote (PENDING).
If you'd like to see the code, raise an issue, or open a pull request, you can do so on the GitHub repository.