Latest Tweet:
  • Loading...

gameoflifeGame of Life is one of those simple, yet really fascinating mathematical ideas you sometime learn about. One of the assignments in the course "object oriented software development" is to first model the "Game of Life" and then implement it in Java.

The Game of Life was invented by Dr. John Conway, and is one of the simplest examples of what is sometimes called "emergent complexity" or "self-organizing systems." Life isn't a game in the traditional sense of the word. It's a grid filled with cells, either dead or alive. Some simple rules determines the state of a cell. The rules that rule the universe of "Life" are as follow:

  • A dead cell with exactly three live neighbors becomes a live cell (birth).
  • A live cell with two or three live neighbors stays alive (survival).
  • In all other cases, a cell dies or remains dead (overcrowding or loneliness).

I got really fascinated by this simple "game", and after doing some reading on the subject it turns out you can implement a "turing machine" in Live, which basically means you can implement any computer program as a pattern inside the "Life" game. For instance there are examples where people have implemented programs that finds prime numbers using the simple rules of "Life".

If you're interested in learning more about "The Game of Life" I recommend checking up the site "Wonders of Math". The Wikipedia article on the subject also gives a nice introduction to the game. If you want to get the latest and greatest discoveries of new and interested patterns in "Life" the "Game of Life News" site is the place to be. If you want to learn how to implement a touring machine in "Life" check out this PDF document. If you just want to check out the "code", check out this gif image showing the touring machine pattern.

If you want to play with Game of Life your self you can either run my compiled version directly (JAR) or download a ZIP file containing both the compiled version and the Java code.

<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910