The Maths of Doctor Who #5 – “It’s like it’s some kind of game, and only you know the rules.”

The Seventh Doctor likes to play games. Not little ones mind, but really big ones. He likes to challenge opponents to games of strategy, like chess, but mix it in with the high-stakes winnings of gambling games, like poker. He’s not afraid to use real people as the game pieces, including his closest friends and allies, and the outcome of his games will ultimately determine the fate of entire worlds and cause the toppling of empires. Like he once said, quoting the former British Prime Minister Benjamin Disraeli, “Every great decision creates ripples…”1.

Arguably there is no story that makes this on-screen characterisation of the Seventh Doctor clearer than 1989’s The Curse of Fenric, a story which sees him do battle once again with an ancient and terrible evil known as Fenric. The Doctor challenges Fenric to a chess problem and Ace, along with us the audience, learns that the story’s unfolding events are all part of a real-life chess game being played between them. A game within a game, if you will, one an abstract representation contained within the other.

This story then employs the ideas of an area in mathematics known as ‘game theory’, and the serial itself explicitly invokes these ideas with the Doctor’s reference to the Prisoners’ Dilemma, perhaps the most well-known problem within game theory. We can even see, as we are told, a logic diagram for the Prisoners’ Dilemma on one of the blackboards in Dr. Judson’s offices. Whilst these ideas are present in the background of the story, they are never expanded upon or explained fully within the serial, which is unsurprising given how much is already going on – they were certainly pressed for time as it was when it came to the broadcast edit!

However, I feel that these ideas of game theory and the Prisoners’ Dilemma have stronger thematic relevance to the story than has been realised among fans, and that these ideas are remarkably suited to a story set during the height of the Second World War. So then, without further ado… Guys, it’s time for some game theory.

Game Theory and the Mathematics of War

“Real mathematics has no effect on war. No-one has yet discovered any warlike purpose to be served by the theory of numbers or relativity, and it seems very unlikely that anyone will do so for many years.”

– G. H. Hardy, 1940.2

Mathematics had a considerable effect on bringing about the end of the Second World War in 1945. Not only had number theory been used by the cryptographers working at Bletchley Park to crack the Enigma Code and potentially shorten the war by around two years, but also the mathematics of relativity assisted with the development and subsequent testing of the first atomic bomb. Whilst Hardy, a highly regarded mathematician of his time, provides an emphatic defence about the pursuit of mathematical studies for its own sake in his landmark essay A Mathematician’s Apology, his aforementioned quote is perhaps one of the finest examples of Things That Have Aged Poorly. At times, his thoughts even stray into blatant misanthropy (“most people can do nothing at all well”3) and I would consider such an attitude against the narrative ethos of Fenric as well as Doctor Who more generally (e.g. “We’re all capable of the most incredible change”4).

However, Hardy was known to detest the militaristic applications of mathematics and so naturally did not play a considerable role in the efforts of the Second World War, but had he known about the highly secretive work of his contemporaries then he may have sooner revised his earlier statement. One such contemporary was John Von Neumann, a Hungarian-born mathematician from a wealthy Jewish family who emigrated to America comfortably before the outbreak of the Second World War. Writer Alex Bellos describes Neumann as “the mathematician who shaped the modern world”5. Whilst not a cryptographer like Alan Turing, he played a central role in the development of the modern computer, designing the fundamental internal architecture of the electronic device you are currently using to read this blog, as well as working on the Manhattan Project which developed the first nuclear bomb. He was also the central figure behind the field of game theory.

Game theory is “an area of mathematics concerned with modelling how participants behave in situations of conflict and cooperation”6. Neumann coined the term ‘game theory’ himself in 1944 when he co-wrote the book The Theory of Games and Economic Behaviour. However, his ideas weren’t simply used for recreational purposes but to predict the behaviour of competitive market forces in economic scenarios as well as develop military strategies for US intelligence during the Cold War. As Simon Singh notes, generals were now “treating battles as complex games of chess”7. This is precisely what the Doctor is up to in The Curse of Fenric when he arrives at the secret military base near Maiden’s Point.

But more than that, the story presents us with a dramatic representation of game theory in motion, set at the point in history when it first came into formal existence. Because in the year 1943, as the Doctor is masterminding a plan to prevent Fenric and the Ancient One detonating a set of devastating chemical bombs that will poison and pollute the entire world, Von Neumann is taking up his post on the Manhattan Project, pursuing the development of a weapon that will have similar consequences.

Perhaps it’s unlikely that writer Ian Briggs knew this detail within the history of mathematics, but nevertheless the inclusion of game theory in a story set at this exact point in history is extremely pertinent. As Una McCormack observes in her Black Archive, “The wartime setting of The Curse of Fenric is very far from being window dressing, and the moment in the war is crucial.”8 Neumann’s choice to apply his knowledge of mathematics to military warfare, in what can be read as an attempt to re-lay the global chessboard, creates the very future that we inhabit today. Just like in The Curse of Fenric, the history of the past continues to unfold within our present moment.

Zero-Sum Games and The Prisoners’ Dilemma

JUDSON: You’re familiar with the Prisoner’s Dilemma, then?

DOCTOR: Based on a false premise, don’t you think? Like all zero-sum games. But a neat algorithm nevertheless, Doctor Judson.9

This quote gives us a nice insight to the Seventh Doctor’s moral philosophy here, as he states that all zero games are based on a ‘false premise’. Game theorists will assign a value, sometimes referred to as ‘utility’, to every possible outcome for each player in a game. A zero-sum game is one where if you add up all the possible values, the sum of all the utility, you get zero. This means that if one player gains some points then another player must lose an equal number of points; the sum total of points remaining constant. If you were to apply this idea to all real-world contexts, it would suggest that there must always be winners and losers in each game. The concept of a mutually beneficial outcome for all players doesn’t exist! There is significant research10 to suggest that people tend to have a cognitive bias towards zero-sum games. They believe, intuitively or otherwise, that this is how the world works.

Consequently, this suggests that the Doctor believes life more accurately reflects a non-zero-sum game, meaning that there exists at least one outcome where all the players can gain utility, that it is indeed possible for to achieve mutually beneficial outcomes. This remark then foreshadows the story’s conclusion where the British and Russian soldiers, Bates and Vershinn, join forces to fight the common enemy. This is a rejection by them of the ideology of zero-sum games as they embrace the possibility for the first time that both sides can win. Moreover, this is a rejection of Thatcher’s own political philosophy by the narrative, as is pretty much every other story produced under the tenure of script editor Andrew Cartmel. It also managed to pre-empt Geoffrey Howe in his resignation speech in 1990 (“The European enterprise is not and should not be seen like that – as some kind of zero-sum game”).

What about the Prisoners’ Dilemma then? How does that fit in with all this? Below I have presented the problem as formalised by Albert W. Tucker in 1950:

“Two members of a criminal gang are arrested and imprisoned. Each prisoner is in solitary confinement with no means of communicating with the other. The prosecutors lack sufficient evidence to convict the pair on the principal charge, but they have enough to convict both on a lesser charge. Simultaneously, the prosecutors offer each prisoner a bargain. Each prisoner is given the opportunity either to betray the other by testifying that the other committed the crime, or to cooperate with the other by remaining silent. The possible outcomes are:

  • If A and B each betray the other, each of them serves two years in prison.
  • If A betrays B but B remains silent, A will be set free and B will serve three years in prison.
  • If A remains silent but B betrays A, A will serve three years in prison and B will be set free.
  • If A and B both remain silent, both of them will serve only one year in prison (on the lesser charge).”11

We can more easily refine the description of this problem with a pay-off matrix, a grid which shows all the values in an easy-to-read layout, like so:

Criminal B remains silent Criminal B betrays
Criminal A remains silent [1, 1] [3, 0]
Criminal A betrays [0, 3] [2, 2]

For each set of outcomes, the first number represents the jail term of criminal A and the second number represents the jail term of criminal B. So if A betrays and B remains silent, then A spends 0 years in prison whilst B spends 3 years in prison, just as its stated in the second bullet point above. It is also not a zero-sum game, allowing the two prisoners to decide whether they want to cooperate or compete with each other.

What outcome might we expect if we let the two criminals play the game? Well, one way that a game theorist might predict this is to investigate whether there is a dominant strategy here. A dominant strategy is an action that a criminal can take that will always provide the better outcome, regardless of what the other criminal chooses to do. We can see that such a strategy is indeed present here.

If Criminal B expects Criminal A to remain silent, then they should choose to betray because they will spend zero years in prison instead of one. But if Criminal B expects Criminal A to betray them, then they should still choose to betray them because they will spend two years in prison instead of three. Whatever Criminal A chooses, it would seem the rational choice for Criminal B is to betray.

Another approach is to use the minimax algorithm, meaning here that each criminal wants to minimise their maximum sentence. A quick look at the pay-off matrix shows that the maximum sentence possible for each criminal is three years and this can only occur if they remain silent. So, in order to avoid the worst possible outcome for themselves individually, they will each choose to betray the other and so consequently end up with two years in jail each. Again, this reveals the dominant strategy of the game presented here.

This individualistic and supposedly rational mindset to decision making reveals the inherent tragedy of the Prisoners’ Dilemma, because whilst they have individually avoided the worst outcome for themselves (three years in prison) they have ended up in the worst-case scenario as a collective (four years combined in prison). If the prisoners had decided to cooperate instead of compete, by both remaining silent, then they would have collectively spent only two years in prison, which would have been the best-case scenario for the prison gang.

You can change the actions, the points and the context of the scenario, but if your pay-off matrix reveals this same basic conclusion as described here then it is yet another example of the Prisoners’ Dilemma. The tragedy then is that by choosing to avoid the worst-case scenario, the players of the game fail to achieve the best-case scenario.

Chess Problems and Mind Games

“But the ‘great game’ of chess is primarily psychological, a conflict between one trained intelligence and another”

 – G. H. Hardy.12

This fundamental idea behind the Prisoners’ Dilemma appears in a number of ways throughout the story. Perhaps the most obvious of these is the chess puzzle presented by the Doctor as a challenge for Fenric to solve. The solution is revealed to be an unintuitive yet rather straightforward move involving opposing pawns uniting in order to reach checkmate, but logically this seems rather bizarre. As Sandifer duly observes, “the fact that the chess puzzle and its solution are completely non-sensical, that a mate-in-one puzzle that stumps an ancient god for ages is ridiculous”13.

However, thematically it ‘rhymes’ with the narrative at-hand. The Doctor’s chess puzzle is a mirror of the real-life game happening right now at the secret military base, and is used by him to showcase the flaw in Fenric’s strategic outlook; he cannot fathom the possibility that the pawns might not kill each other at the first possible chance, the clear dominant strategy, or to actively choose to work against the premise of the game itself. The pawns then, represented by Bates and Vershinn, choose to work together in order to achieve the best outcome for themselves rather than as individuals. Cooperation over competition.

Then there’s the Ancient One. For most of the narrative, he14 is used as a game piece by Fenric, who belittles and barks orders at him, in order for him to reach his desired outcome of the chemical pollution of the entire world. But I mentioned earlier that we witness a game within a game and this allows the Doctor to redefine the game being played. He persuades the Ancient One to stop being a pawn in Fenric’s game, essentially exiting the chessboard, and instead becomes a player in the game, substituting into the Doctor’s place. This entraps Fenric once again in a game where he cannot foresee the winning move, and now he must face the consequences of mistreating his own game piece. And since the Ancient One by this point already believes that mutual cooperation between them is no longer possible, they are left only with the option to betray each other: mutually assured destruction. This is the flipside to Bates and Vershinn. The Curse of Fenric’s resolution presents us with both ‘winners’ and ‘losers’ of the Prisoners’ Dilemma. Of course, this reading assumes that we actually witnessed the end of Fenric, but the expanded universe may have other ideas.15

Margaret Thatcher once famously said, “There is no alternative.” But unfortunately for her, there is. So what is it? The alternative is that we witnessed just one of many iterations in the ongoing battle between the Doctor and Fenric. Much like how in Heaven Sent (2015) we initially see one iteration of the Doctor running about the castle, in fact. What then does such a game look like? Let’s dare to imagine that we can even comprehend such a thing.

Consider then that the Seventh Doctor and Fenric are playing the most elaborate and extraordinary game. One with an impossibly large number of options for each of them to choose from, and perhaps not limited to a mere two-dimensional display of outcomes but many, many more. And the potential pay-offs are not just points on a scoreboard but the lives of countless individuals, people like you or me, and the continued existence of our world. The whole of reality as we know then is at stake here. A ‘rather neat’ algorithm, as the Doctor put it, that started so very long ago and will continue from now until the end of time. Making decision after decision. Iteration after iteration. Game after game.

The end of history? Far from it.

“We play the contest again, Time Lord.”

 

Bibliography

  • Alex Through the Looking Glass by Alex Bellos
  • A Mathematician’s Apology by G. H. Hardy
  • Fermat’s Last Theorem by Simon Singh
  • The Black Archive #23: The Curse of Fenric by Una McCormack
  • The Simpsons and Their Mathematical Secrets by Simon Singh

All internet references have been highlighted throughout.

Footnotes

1 Remembrance of the Daleks (1988)

2 Hardy, G.H., A Mathematician’s Apology, p44

3 Hardy, G.H., A Mathematician’s Apology, p7

4 The Woman Who Fell To Earth (2018)

5 Bellos, Alex, Alex Through The Looking Glass, p261

6 Singh, Simon, The Simpsons and Their Mathematical Secrets, p99

7 Singh, Simon, Fermat’s Last Theorem, p167

8 McCormack, Una, The Black Archive #23: The Curse of Fenric, p41

9 The Curse of Fenric: Special Edition (2019)

10 For example, see “Belief in a Zero-Sum Game as a Social Axiom: A 37-Nation Study” and “Your gain is my loss”: An examination of zero-sum thinking with love in multi-partner romantic relationships and with grades in the university classroom.

11 I’ve quoted this as presented on the Wikipedia page on the Prisoner’s Dilemma. Accessed 3rd August 2020.

12 Hardy, G.H., A Mathematician’s Apology, p30

13 Sandifer, Elizabeth, Take Hitler and Put him in the Cupboard Over There (The Curse of Fenric)

14 The television story identifies the Ancient One as male with he/him pronouns but the novelisation tells us that the Ancient One is female and uses she/her pronouns. I do not agree with TARDIS Wiki insisting on referring to the Ancient One as “it”.

15 See Gods and Monsters by Alan Barnes and Mike Maddox.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s