Friday, October 12, 2012

hex life

One of mathematics' best known recreations is Conway's Game of Life, popularized by Martin Gardner in his Mathematical Games column (see this recent post on Math Munch for another classic Gardner recreation: flexagons). John Conway first came up with his Game of Life using a square grid and (as described in this nice wikipedia overview) four basic rules:
  1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overcrowding.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Things like Conway's Game of Life are examples of what are more generally called Cellular Automota - there are lots of great websites that offer overviews of these, and many include interactive demonstrations.

I've been wanting to play around with life-like automata for a while, so for fun I decided to try out the standard 4 rules (above) on a grid made of hexagonal close-packed disks, instead of the usual square grid. On a hexagonal grid, every cell has only 6 neighbours, instead of the usual 8. This little experiment showed me how delicate and perfect Conway's original life is - and how changing the geometry a little can have a big impact.

In the experiments that I tried, hex-life, quickly dies down to a few stable formations (patterns that don't change) and oscillators (patterns that move through a set cycle of formations). These were pretty, but I didn't observe any of the explosive or travelling patterns that makes the usual Game of Life so interesting.

One oscillator that emerged was a simple "windmill" (you can see one in the middle of the screen capture above) that has three dots that seem to rotate around a central dot. This is actually an oscillator of period 2 that is governed by rules 1, 2, and 4. The diagram below shows how many neigbours each cell has - with live cells coloured blue and dead cells coloured white.

Another oscillator was the blinking diamond shown below. The two cells across the middle of the diamond blink in and out of the live state, governed by the rules 2, 3 (blinking off) and 2, 4 (blinking on).

I found a some other oscillators, and quite a few stable patterns, but nothing too exciting - I am sure there is a joke I could make here about having a stable, nice, but not too exciting hex life, but I won't. :) 

BTW - just as I was writing this up I came across a new post about a continuous version of Life - definitely worth looking at.