Hello again!
In this video, we are going to start looking at Conway's Game of Life.
This was devised by the British mathematician, John Conway, in 1970.
He was interested in the field of "cellular automata", which was just starting at that point.
He wanted to find a set of rules which would give interesting and unpredictable results.
And he certainly succeeded with that!
His work was picked up by a journalist called Martin Gardner, who had a column in Scientific American
magazine.
And it became very popular with mathematicians and computer programmers.
What is a cellular automaton?
This is something which emerged from research into how crystals grow.
A cellular automaton is a grid of cells.
The cells on this grid have two states, so "on" and "off", if you like.
And the bit which makes it interesting, is that the state of a cell depends on the state of the
cells around it.
So this allows you to model systems which have interaction and feedback.
So this can be used to model a lot of naturally occurring processes.
For example, the patterns which appear on seashells.
The way that plants respire.
In Physics you can use its for phase transitions, and so on.
A cellular automaton is "Turing-complete", which means that, in principle, you can use it to solve
any computational problem.
So there has been talk about using it for cryptography and neural networks.
More philosophically, a cellular automaton is an example of a so-called "emergent" system.
So this means basically a system where the whole is greater than the sum of the parts.
For example, the human brain.
This is just a load of molecules which are experiencing chemical reactions, but that can produce thoughts,
feelings, consciousness and so on.
It is also an example of a "self-organizing" system.
This is where you have a system where, originally, all the components are arranged at random, and they organize
themselves and set up a stable and robust arrangement.
For example, if you have a bar of iron, all the atoms are going to be pointing in different directions.
But if you bring a magnet up against this bar of iron, then the atoms are going to eventually all end
up pointing in the same direction, and the bar will be magnetized.
The Game of Life is played on an infinite two-dimensional grid of cells.
Each cell on the grid is either "alive" or "dead".
Or, if you prefer, "populated" or "unpopulated".
The game is played by the computer.
So I suppose, strictly speaking, it is really a simulation.
In the game, or simulation,
the grid goes through a series of generations, so the cells on the grid will become alive, remain
alive or die out as the game progresses. So a live cell can survive to the next generation or die out.
If we have a cell which is unpopulated in this generation, it may become populated in the next
generation.
And the fate of a cell depends not only on its own state, but also on the state of its neighbours.
So these are the rules that Conway came up with.
If we have a cell, which is live in this generation, and it has fewer than two live neighbours or more
than three live neighbours, then it will die out in the next generation.
So it will only survive if it has exactly two or exactly three neighbours which are live.
If we have a cell which is unpopulated in this generation, it will become populated next time,
if it has exactly three live neighbours.
Otherwise it will remain unpopulated.
So let's look at some pictures.
Here is a cell.
Each of the cells on the grid will have each neighbours, one on each side, one above and below,
and four diagonally.
If we have a cell, which is live, then it needs to have two or three neighbours which are live, in order
to survive to the next generation.
If it has one or less, or four or more, then it will die out.
If we have a cell which is unpopulated, it needs to have exactly three live neighbours to become populated
in the next generation.
Otherwise, it will remain unpopulated.
Okay.
So that is it for this video.
In the next video will look at implementing this, but until then, keep coding!