Recreate the Game of Life simulator
Calvin Robinson uses Python and Turtle graphics to run this unique game.
Calvin Robinson
Each issue we’re building a retro video game. In this series of programming games with Python, so far we’ve created a lunar space module, a side scrolling platformer, a 2D graphical insect/animal game, Pac-Man and Pong. Take a look at the Linux Format back catalogue to have a go at creating any of these vintage game formats (more details on page 69).
OUR EXPERT
Calvin Robinson is a subject matter expert at the National Centre for Computing Education, and a computer science teacher.
This issue we’re going to be creating life itself. A simulation of life, that is. Game of Life, sometimes known as just Life, is a unique game in that it doesn’t have any interactive properties, per se. The game is set up or configured and then left to run, simulating the creation of life exponentially. Bear with us on this one…
John Horton Conway, a British mathematician, invented the Game of Life in 1970 based on the work of John von Neumann in 1940. The very same John von Neumann, a Hungarian mathematician, who would later go on to design von Neumann architecture - the basis of all modern central processing units (CPUs). We’ve no idea why all 20th century mathematicians were apparently called John. Von Neumann’s original theory was that a being or organism should be able to reproduce itself and pass the tests of the Turing machine, in order to call itself ‘life’.
Game of Life simulates an unpredictable environment and monitors the behaviour of cell automata based on a set of predefined rules. This is similar to the principle still used in contemporary virus behaviour modelling. No doubt mathematicians around the world have been using advanced adaptations of this methodology to predict Coronavirus spread rates. To prove that the automaton was ‘alive’ the game would have to be able to run for a long period without the cells dying, and the original configuration would need run indefinitely, without any loop cycles.