Recreate the famous Game of Life
Everyone loves 2D cellular automaton, to explore this exciting subject we’re going to use Game of Life as our working example. This isn’t to be confused with The Game of Life, the family board game that was first produced in 1960 and is still going strong today. So, let’s begin by explaining how Game of Life the non-board game edition works! Before we start you can get the code packs for this tutorial from the LXF Archive here: https://bit.ly/lxf284code.
Game of Life doubles up as both a programming exercise and an introduction to theoretical mathematics and computer science (don’t let that put you off! – Ed), but in this tutorial we’re only dealing with the former. Although it might not seem it, the game is Turing Complete, which means that its data manipulation rules can be used to simulate a Turing Machine (see LXF271). We’ll look at this in more detail later in the article.
can have various states, depending on the initial state of the board. Given an initial state, doesn’t require any extra input from the user. Put simply, once it has an initial state, can operate on its own with the help of its rules.
You’re reading a preview, subscribe to read more.
Start your free 30 days