Saturday, 19 June 2010

Day 170, on which John discovers the Game of Life [19.6.10]

Dag hundrede og halvfjerds. Happy Day 170, everyone! Woo! So, what happened today? Well, I finished off that video I was talking about on Thursday, and, though it took a while, I'm pleased with the outcome. Kinda low quality image, but that's what I was given and I understand there were conversion issues so that's out of my hands. Plus, it'll be projected onto a big screen, and most things look blurry on big screens.

What's the Game of Life? No, not that silly board game you used to play as a kid. It's something much more complex, yet also simpler.

Created by John Conway back in the 70s and featured in this week's NewScientist magazine (how I found out about it), the Game of Life is based on a grid, in which squares can be either alive or dead (binary, 1 or 0). What happens to these squares is decided by three rules:

1. If a live square has one or no live neighbours, it dies from loneliness. Aww.

2. If a live square has four or more live neighbours, it dies from overpopulation. Dang.
(therefore, if a square has two or three live neighbours it survives)

3. If a dead cell has three live neighbours, it becomes live! Yay!

And that's all there is to it. Those three simple rules. And there is an endless amount of possibilities. Some pre-made patterns are there for you to use in the online game, such as gliders (which move in one direction) and exploding things.

So what are the basics? Let's see...

These patterns don't move at all. That's because all the squares have two neighbours, so stay alive. The top-right formation stays as it is because a square can't come alive in the middle; it would have four neighbours.

The bottom-right pattern stays the same because all squares have two neighbours. The dead squares on the inside can't become alive because they only have two live neighbours.

However, I'm kinda stumped about the one on the left. You'd think that, since the dead middle squares have three live neighbours, they'd become alive. However, my concept of it goes like this: say the left middle square was alive, because it had three live neighbours. That means the other dead square would have to stay dead.

But, the squares won't take a preference to the left inside square. Both inside squares would try to be alive at the same time, and both fail because the other is alive. The outcome is calculated before the generation of the next generation of the pattern, so we don't see it change. Hence, it's the same. For ever and ever and ever.

So, onto our next and final example. We're starting with three live squares stacked vertically. How would these evolve?

You'd think that the next generation would go to one live square, because the two on the end have only one live neighbour, and so die. Then that one remaining live square would also die, because it has no live neighbours. Death by loneliness.

But what actually happens is that the vertical column of three turns into a horizontal row, then a column, then a row, then a column, etc etc. Why!?

Let's concentrate on the squares to the left and right of the middle square in the column. They actually have three neighbours: the middle square and the two others (diagonally). Therefore, they become live. The end squares of the column only have one live neighbour, so die. But then the same thing happens to them as happened to the squares on the sides of the middle one.

And so the process repeats over and over again. If I were a more mathematical person, I would work out some clever patterns, but I think three live squares is all I can work with at the moment. Maybe some day, heh.


No comments: