You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.6 KiB

Game Of Life

Game of Life (sometimes just Life) is probably the most famous cellular automaton (mathematical simulation set on a grid of cells), which with only four simple rules gives rise to a world with patterns that seem to behave similarly to simple biological life. It was invented in 1970 by John Conway, a famous mathematician who researched games, and has since gained popularity among programmers, mathematicians and other nerds as it's not only scientifically valuable, it is also awesome and fun to play around with as a kind of sandbox toy; it is very easy to program, play around with, modify and can be explored to great depth. The word game is used because what we have here is really a zero-player mathematical game, which is furthermore completely deterministic (there is no randomness), so we only choose some starting state of the world and then watch the game "play itself". Game of Life is similar systems such as rule 110 and Langton's ant.

Study of the game goes extremely deep, people are discovering new patterns and concepts. See e.g. LifeWiki at https://conwaylife.com/wiki/Main_Page, Catalogue at https://catagolue.hatsya.com or Life Lexicon at https://conwaylife.com/ref/lexicon/lex.htm. The Catalogue claims to have discovered 478223 distinct types of objects so far, LifeWiki has 1651 documented patterns (many with just boring numeric names, other ones with funny names like Cthulhu, En retard, Meatball, p58 toadsucker, Overweight spaceship, Why not, even Unix lol).

The following is a sum up of some basic properties of the game, many of which should show why it is so significant:

  • There are only four rules and they are extremely simple but at the same time they give rise to extremely complex behavior, demonstrating emergent behavior, a very important concept.
  • It resembles biological life, showing structures that come to life, move, replicate, merge, die, organize into bigger structures etc., showing that life may really arise from a few simple rules.
  • It is a class 4 cellular automaton, meaning its behavior is "interesting": sometimes it behaves orderly, sometimes in chaotic ways, sometimes the state stabilizes quickly, sometimes it evolves in complex ways for very long time etc.
  • It shows many other phenomena such as chaotic behavior, non-chaotic behavior, self-replication, self-organization, oscillation, self hosting (you can program Game of Life in Game of Life!) etc.
  • It is Turing complete, meaning the game can be used as a universal computer, with the same computational power as any other computer.
  • It is very fun to play around with. There are many creatures to discover, observe and document (making this kind of a Pokémon game lol?).

Rules

We have an infinite, regular two dimensional grid of cells, each of which may be in one of two states: alive or dead. Each cell considers its nearest eight cells its neighbors. The game runs in discrete steps, or rounds. Every round each cell counts its neighbors' states and will set its state for the next round according to these rules:

current state next state alive if next state dead if
alive 2 or 3 live neighbors else (under/overpopulation)
dead 3 live neighbors else

TODO: extensions, continuous, code, optimizations