WEBVTT

00:00.060 --> 00:00.660
Hello again!

00:01.110 --> 00:04.710
In this video, we are going to start looking at Conway's Game of Life.

00:05.950 --> 00:10.510
This was devised by the British mathematician, John Conway, in 1970.

00:11.290 --> 00:16.690
He was interested in the field of "cellular automata", which was just starting at that point.

00:17.410 --> 00:22.240
He wanted to find a set of rules which would give interesting and unpredictable results.

00:22.930 --> 00:24.700
And he certainly succeeded with that!

00:25.900 --> 00:31.420
His work was picked up by a journalist called Martin Gardner, who had a column in Scientific American

00:31.420 --> 00:31.960
magazine.

00:32.590 --> 00:36.280
And it became very popular with mathematicians and computer programmers.

00:39.170 --> 00:41.510
What is a cellular automaton?

00:42.320 --> 00:46.250
This is something which emerged from research into how crystals grow.

00:47.240 --> 00:50.090
A cellular automaton is a grid of cells.

00:50.780 --> 00:55.160
The cells on this grid have two states, so "on" and "off", if you like.

00:55.760 --> 01:02.030
And the bit which makes it interesting, is that the state of a cell depends on the state of the

01:02.030 --> 01:03.260
cells around it.

01:03.920 --> 01:08.390
So this allows you to model systems which have interaction and feedback.

01:09.980 --> 01:13.730
So this can be used to model a lot of naturally occurring processes.

01:14.210 --> 01:17.480
For example, the patterns which appear on seashells.

01:18.140 --> 01:19.580
The way that plants respire.

01:20.060 --> 01:23.750
In Physics you can use its for phase transitions, and so on.

01:24.920 --> 01:29.960
A cellular automaton is "Turing-complete", which means that, in principle, you can use it to solve

01:29.960 --> 01:31.190
any computational problem.

01:31.730 --> 01:35.660
So there has been talk about using it for cryptography and neural networks.

01:37.460 --> 01:42.890
More philosophically, a cellular automaton is an example of a so-called "emergent" system.

01:43.250 --> 01:47.840
So this means basically a system where the whole is greater than the sum of the parts.

01:48.500 --> 01:50.390
For example, the human brain.

01:51.110 --> 01:57.380
This is just a load of molecules which are experiencing chemical reactions, but that can produce thoughts,

01:57.380 --> 01:59.330
feelings, consciousness and so on.

02:00.440 --> 02:03.410
It is also an example of a "self-organizing" system.

02:03.890 --> 02:10.100
This is where you have a system where, originally, all the components are arranged at random, and they organize

02:10.100 --> 02:13.520
themselves and set up a stable and robust arrangement.

02:14.090 --> 02:18.590
For example, if you have a bar of iron, all the atoms are going to be pointing in different directions.

02:18.980 --> 02:24.950
But if you bring a magnet up against this bar of iron, then the atoms are going to eventually all end

02:24.950 --> 02:28.070
up pointing in the same direction, and the bar will be magnetized.

02:30.520 --> 02:34.540
The Game of Life is played on an infinite two-dimensional grid of cells.

02:35.050 --> 02:37.610
Each cell on the grid is either "alive" or "dead".

02:38.060 --> 02:40.630
Or, if you prefer, "populated" or "unpopulated".

02:41.680 --> 02:43.740
The game is played by the computer.

02:43.750 --> 02:46.540
So I suppose, strictly speaking, it is really a simulation.

02:48.620 --> 02:50.420
In the game, or simulation,

02:50.990 --> 02:57.680
the grid goes through a series of generations, so the cells on the grid will become alive, remain

02:57.680 --> 03:04.970
alive or die out as the game progresses. So a live cell can survive to the next generation or die out.

03:05.600 --> 03:10.220
If we have a cell which is unpopulated in this generation, it may become populated in the next

03:10.220 --> 03:10.790
generation.

03:11.750 --> 03:17.300
And the fate of a cell depends not only on its own state, but also on the state of its neighbours.

03:19.270 --> 03:21.580
So these are the rules that Conway came up with.

03:22.000 --> 03:27.820
If we have a cell, which is live in this generation, and it has fewer than two live neighbours or more

03:27.820 --> 03:31.150
than three live neighbours, then it will die out in the next generation.

03:31.690 --> 03:36.670
So it will only survive if it has exactly two or exactly three neighbours which are live.

03:37.240 --> 03:42.640
If we have a cell which is unpopulated in this generation, it will become populated next time,

03:42.970 --> 03:45.340
if it has exactly three live neighbours.

03:45.970 --> 03:47.890
Otherwise it will remain unpopulated.

03:49.560 --> 03:50.850
So let's look at some pictures.

03:51.240 --> 03:52.590
Here is a cell.

03:53.190 --> 03:58.590
Each of the cells on the grid will have each neighbours, one on each side, one above and below,

03:59.040 --> 04:00.570
and four diagonally.

04:02.460 --> 04:08.640
If we have a cell, which is live, then it needs to have two or three neighbours which are live, in order

04:08.640 --> 04:10.410
to survive to the next generation.

04:11.130 --> 04:14.550
If it has one or less, or four or more, then it will die out.

04:17.260 --> 04:23.560
If we have a cell which is unpopulated, it needs to have exactly three live neighbours to become populated

04:23.560 --> 04:24.760
in the next generation.

04:25.240 --> 04:27.730
Otherwise, it will remain unpopulated.

04:28.950 --> 04:29.250
Okay.

04:29.250 --> 04:30.300
So that is it for this video.

04:30.750 --> 04:35.040
In the next video will look at implementing this, but until then, keep coding!
