Game Theory in The Dark Knight: A Critical Review of the Opening Scene (Spoilers)
19 August 2008Every Tuesday is a Game Theory article at Mind Your Decisions
The newest Batman flick The Dark Knight absolutely stunned me. Not since Dr. Strangelove has a movie contained so much game theory. While many others have noticed the game theory connection, particularly about a scene near the end of the movie, such commentaries miss the big picture: the entire film is a sequence of games and an exploration of strategic thought.
Game theory comes up in many scenes even where it’s not clear what the “game” really is. Strategy is a theme introduced immediately in the opening bank robbery scene. This scene is one of the most powerful movie openings and it foreshadows the chaos and tempo in the story. Today, I’ll analyze the robbery scene using the lens of game theory.
(Warning: this article contains spoilers and covers roughly the first five minutes of the movie. The thoughtful comments contain major spoilers so only read them if you’ve seen the movie.)
How can we split up the stash?
The movie starts out with a bang. An aerial attack begins when a window shatters on a skyscraper, allowing two robbers to glide across a zip-line on to a bank’s roof. On the street-level, a car screeches to a stop to pick up the last member of the ground attack.
The first spoken words concern the topic of strategy. These lines introduce the Joker’s character and they foreshadow the punch and counterpunch of the entire movie. The robbers in the car explain the job and how the loot will be divided. It’s apparent they are not happy with the plan:
Driver: Three of a kind. Let’s do this.
Passenger side: That’s it—three guys?
Driver: Two guys on the roof. Every guy gets a share. Five shares is plenty.
Passenger side: Six shares. Don’t forget the guy who planned the job.
Driver: He thinks he can sit it out and still take a slice. I know why they call him the Joker.
The robbers don’t like that the Joker gets an equal share for doing unequal work. Their complaint raises the issue of fair division, which is central to game theory. In fact, fair division is the first problem that game theory addressed historically. The problem appears in the Babylonian Talmud about how creditors should divide an estate. The text offers a mysterious solution that had baffled scholars for over 2,000 years. It was only very recently that a Nobel Laureate economist deciphered the answer using the tools of coalitional game theory. Let me tell you, the answer is fascinating.
Fair division is about understanding incentives and strategic thought. How can you trust self-interested people? How can you achieve cooperative outcomes with diametrically opposed motives? Such ideas have been applied to important areas such as nuclear disarmament and labor negotiations. But they are even applicable to mundane situations, like dividing up restaurant bills fairly.
The robbers accept an equal division for unequal work, but should they believe things will go as planned? Perhaps they should not, if they really considered the incentives and the possible ways others could tamper with the plan. In game theory you do not trust someone because they are your friend. You trust them because it is in their self-interest to help you. We can learn from a natural example: children should trust their parents on safety rules because parents have a vested interest in seeing their children are safe. They should not, however, trust strangers.
Had the robbers considered these issues, perhaps their fate would have been different. A little bit of thinking ahead and reasoning backwards would have demonstrated flaws in the plan.
The scene is reminiscent of a popular game theory puzzle about pirates and splitting up treasure. Some of you may have even heard this as a technical interview question. The game offers insights to collective voting and the ability of a leader to buy off votes.
The Pirate puzzle
The game
Three pirates (A, B, and C) arrive from a lucrative voyage with 100 pieces of gold. They will split up the money according to an ancient code dependent on their leadership rules. The pirates are organized with a strict leadership structure—pirate A is stronger than pirate B who is stronger than pirate C.
The voting process is a series of proposals with a lethal twist. Here are the rules:
- The strongest pirate offers a split of the gold. An example would be: “0 to me, 10 to B, and 90 to C.”
- All of the pirates, including the proposer, vote on whether to accept the split. The proposer holds the casting vote in the case of a tie.
- If the pirates agree to the split, it happens.
- Otherwise, the pirate who proposed the plan gets thrown overboard from the ship and perishes.
- The next strongest pirate takes over and then offers a split of the money. The process is repeated until a proposal is accepted.
Pirates care first and foremost about living, then about getting gold. How does the game play out?
The solution
At first glance it appears that the strongest pirate will have to give most of the loot. But a closer analysis demonstrates the opposite result—the leader holds quite a bit of power.
The game can be solved by thinking ahead and reasoning backwards. All pirates will do this because they are a very smart bunch, a trait necessary for surviving on the high seas.
Looking ahead, let’s consider what would happen if pirate A is thrown overboard. What will happen between pirates B and C? It turns out that pirate B turns into a dictator. Pirate B can vote “yes” to any offer that he proposes, and even if pirate C declines, the situation is a tie and pirate B holds the casting vote. In this situation, pirate C has no voting power at all. Pirate B will take full advantage of his power and give himself all 100 pieces in the split, leaving pirate C with nothing.
But will pirate A ever get thrown overboard? Pirate A will clearly vote on his own proposal, so his entire goal reduces to buying a single vote to gain the majority.
Which pirate is easiest to buy off? Pirate C is a likely candidate because he ends up with nothing if pirate A dies. This means pirate C has a vested interest in keeping pirate A alive. If pirate A gives him any reasonable offer—in theoretical sense, even a single gold coin—pirate C would accept the plan.
And that’s what will happen. Pirate A will offer 1 gold coin to pirate C, nothing to pirate B, and take 99 coins for himself. The plan will be accepted by pirates A and C, and it will pass. Amazingly, pirate A ends up with tremendous power despite having two opponents. Luckily, the opponents dislike each other and one can be bought off.
The game illustrates the spoils can go to the strongest pirate or the one that gets to act first, if the remaining members have conflicting interests. The leader has the means to buy off weak members.
Don’t get caught up in the exact assumptions or outcomes of the game—just remember the basic lesson. In the real world, it might be necessary to buy a vote with 20 gold coins. Nonetheless, the general logic is the same. Here are some of the main insights from the game:
Lessons:
- Players should think ahead and reason backwards
- A leader can win by exploiting conflict among weaker members
- Players derive worth from voting power, and some players can be bought off
The robbery scene in The Dark Knight
The original plan of equal division is flawed. Each robber has incentive to increase his share by killing a fellow team member. Once a member performs his job, he loses his negotiating power and value to the team.
The Joker plays off this conflict by instructing the robbers to take out fellow teammates once their tasks are performed. The game would be different if the robbers were a group and they repeated crimes together—perhaps an even split could be sustainable. But as the movie hints right away with the first backstabbing scene, this robbery will be a one-shot game.
Many of the robbers fail to see they can be victim to the same deceit they pull on others. The second robber on the rooftop is a prime example. After his partner disarms the silent alarm, he quickly kills him and then proceeds to perform his own job. He doesn’t see the same thing could happen to him.
After he disarms the bank vault, he is greeted with a most unpleasant surprise:
Robber: Where’s the alarm guy?
Vault guy: Boss told when the guy was done, I should take him out. One less share, right? [opens the vault]
Robber: Funny. He told me something similar.
Vault guy: What? No! No! [gets shot in the back]
By now it’s clear the Joker wants everyone dead, and minutes later we learn the Joker has been present on the job all along. The plan finishes with two more deaths both involving the escape vehicle bus.
The Joker, being the “strongest pirate,” was able to sequentially bribe the weaker robbers one by one. In the end, he puts a twist on the game by taking the whole pie.
Other strategic elements
There are many other mini-strategy elements during the robbery scene. Here are three that came to my mind:
- How can a handful of robbers overtake a bank?
In theory, a mob of unarmed citizens should be able to overwhelm a small group of armed robbers. The problem is there will be casualties, particularly for those that act first. Who is going to step out and be the hero? Robbers make sure that people don’t coordinate by forcing them to act sequentially. Any individual that attempts to be a hero will be killed as an example, like the angry bank employee. In the movie, the robbers demonstrate they are willing to use lethal violence by shooting up in the air and taking out the bank cop.
- Do you trust your teammate?
This is a subtle point and I loved it. The robbers face a small obstacle when an angry bank employee starts firing his shotgun. The robbers duck for cover, and after a few shots, one robber asks the other if the bank employee is out of bullets.
If you watch closely, you’ll see the robber (really the Joker) ponders the question carefully and then nods his head “yes.” The other robber jumps out and is greeted with a bullet that narrowly misses him. Almost immediately the disguised Joker jumps out and disables the bank employee with a round of bullets. The disguised Joker acted so quickly and without fear, almost as if he was now sure the bank employee was out of bullets. Did the Joker lie on purpose earlier to put the other robber in danger? The other robber, not aware it’s the Joker, is furious that he was almost shot and yells back: “Where did you learn to count?” The disguised Joker looks back in scorn.
- What kind of robber is the Joker?
The cops who arrive on the scene will be stunned. They will see a crime scene with five dead robbers and a bank vault that has been cleaned out. They will likely conclude the Joker is interested in selfish gains, a simple criminal, who wants all the money in Gotham.
As the cops, the mobsters, Batman, and we as the audience experience the complex themes that unfold later in the movie, many of us are left with one thought: if only the Joker were so simple.
The Joker demands money, yes, but is that what he really wants? That’s a question the Joker plays off later in the movie in an explosive fashion.


46 Responses to “Game Theory in The Dark Knight: A Critical Review of the Opening Scene (Spoilers)”
Awesome - thanks for the explanation!
Interestingly, I did that pirate problem in a math class in college, and we had to take it further to figure out what the results were if there were x number of pirates…interestingly, if there were 205 pirates, the first pirate would get tossed overboard no matter what because he wouldn’t be able to make enough pirates happy. (But if there were 206, the first pirate would live because pirate 205 would know he would be tossed overboard if he voted against him).
By Christina on Aug 19, 2008
Yea, quite a great analysis. I really loved the movie, and given the Joker being such a strong villain, its neat to see his actions be quantified via game theory. I recall a few other parts of the movie which would be fun to see your analysis on.
By RohoMech on Aug 19, 2008
Christina:
Indeed, the pirate problem can be extended to some surprising results. Here’s a good write-up of the math:
http://euclid.trentu.ca/math/bz/pirates_gold.pdf
Of course, I find this is more an intellectual exercise than having practical application.
By Presh Talwalkar on Aug 20, 2008
Excellent - so many components of the movie have been thus far overlooked in favor of the easy and erroneous observation that the ferry scene is a classic prisoner’s dilemma. Tackling something a bit less straightforward is refreshing and, in this case, revealing.
As such, I am linking to this post in my latest entry on the qp.
By Michael Allen on Aug 20, 2008
Man…I wish I had that website when I had to do the write up for that problem!!!
By Christina on Aug 20, 2008
Christina
While the website might have given you the answer, it would not gain you knowledge.
Then, like the other bank robbers, you’d probably not make it out
By RohoMech on Aug 20, 2008
In ‘a beautiful mind’, russel crowe’s Nash believes at one point that he’s cracking code for the pentagon, sees, er, strange messages in newspapers/magazines, and invisible algorithms pretty much everywhere.
This film review seems to be straying into similar territory.
I just thought that the bank robber scene, other than showcasing the capabilities of imax, was a bit of a scene-setter intended to let you know that the joker is a bit of a psycho who doesn’t sign up to any notion of ‘honour amongst thieves’.
By SA on Aug 21, 2008
Yes, follow ups, please. Terrific read.
By Plainview on Aug 21, 2008
I think SA overestimates the complexity of game theory. This review isn’t about uncovering hidden implications or depth, it’s about validating a relatively simple series of events by application of strategic theory.
We’re talking nothing more than an observation coupled with general social philosophy.
In “A Beautiful Mind,” Crowe’s character was reading signs that didn’t exist. In the case of this review, the author is just reading the signs and discussing how they relate to a school of thought.
By Jerry on Aug 21, 2008
SA
I think Presh Talwalkar is using the film scene as a practical example to demonstrate some math, not to be confused with a review of the film being based on game theory.
By Martyn on Aug 21, 2008
I can come up with any theory basing them on anything. you are nothing but a clown
By am on Aug 21, 2008
And am is nothing but an ignorant fool.
By Tucker on Aug 21, 2008
Yes, thanks, am, that was a very valuable contribution.
Back on topic I’m no expert on game theory but I suppose I just didn’t think that the robbery was a very pure example of a game that’s easy to analyse because the robbers knew nothing about [consistent with, in terms of the plot, the unpredictability & strange moral code of the joker] the ‘rules’ of the game or even probably the choices available to other players.
In these circumstances the robbers would not really have had any chance at all to backwards induct their way to a fair share of the cash or whatever.
The ferry scene obviously has some striking similarities to a classic prisoner’s dilemma, although the ‘first to the buzzer’ element & seeming lack of even a potential collusive solution mean that it isn’t one..
By SA on Aug 21, 2008
Totally agreed that the beginning of the movie was awesome…but for the rest…
http://zia.blogspot.com/2008/08/dark-knight-first-impression-from.html
By Zia on Aug 21, 2008
SA
That’s a good point, the robbers didn’t realize they were playing a game, didn’t realize certain rules were in effect. However, as each robber takes out the next, they should be able to figure out what game is being played.
Something that makes the Joker come out ontop is that he knows the rules from the beginning. At one point, his plan is discovered, but he gets saved by the bus driver…
By RohoMech on Aug 21, 2008
Thanks all for the comments–positive or not
I take full criticism for parts that seem over analyzed–please don’t hate me for that. I come from a math background.
Jerry best captures my motives–I wanted to explain how the scene would be viewed by game theory. I certainly don’t expect that Nolan had any of this in mind!
Thanks for the enlightening thoughts and community moderating of some comments.
I have also gotten many requests about the ferry scene. I would write my own, but I was beaten to the punch by two great articles. Please read:
http://www.quantitativepeace.com/blog/2008/07/the-dark-knight.html
and
http://www.scienceblogs.com/purepedantry/2008/07/game_theory_and_the_dark_knigh.php
By Presh Talwalkar on Aug 22, 2008
Presh, great article, it was wuite enjoyable to see that opening scene laid out through the lens of game theory. I would certainly enjoy more columns such as this.
In regards to the Ferry situation, one issue I thought about is if the ferry-folk can trust the Joker’s rules. I wouldn’t put it past the Joker if he actually gave each ferry the detonator to their own boat. that, I think, would change the calculations of the detonator holders greatly.
By MDK on Aug 23, 2008
Really interesting analysis. Thanks! Despite all the problems with game theory when applied to ACTUAL human behavior (watch the documentary “The Trap”) it definitely was a great model for The Dark Night movie.
By Tommy on Aug 24, 2008
An excellent analysis of the bank scene in the Batman: The Dark Knight movie.
By web design company on Aug 25, 2008
isn’t this how we’ve been to behave? Our policians bring home the bacon and we dutififully keep electing them to office. It matters not that as a country we’re broke. Add to this the class warfare ( make the wealth pay their share of the taxes - even though nobody talks about the freebies which has led us into this quagmire). The truely wealthy have no reason to fear the socialist (Democrats) and wimps (the Republicans) because their money is shielded from such higher taxes - ask Buffet or Ted Kennedy anbout such things as trusts and foundations - the higher taxes will ultimately fall on the middle class. Yes game theory, and we willingly suspend our disbelief and follow in line.
By Erwin Rysz on Aug 25, 2008
I thoroughly enjoyed reading your article. I had thought about the game theory while watching the movie for the first time, but never really thought about it this in depth. Thank you for writing such an interesting piece.
By Adam on Aug 25, 2008
I think you hit the nail on the head with one of the earliest assessments (and an above commenter did too). The way these scenes throughout the movie develop appear to be classic Game Theory problems perverted by the Joker to never exactly be fair, to always either allow him to come out ahead or to not let the participants arrive at an equilibrium by any means.
Most Game Theory involves complete information, this is more poker than chess - the participants can’t see all the pieces, or aren’t able to communicate. More, they’re being told they’re playing chess going in and only later is it revealed that not all the pieces are visible.
By John on Aug 26, 2008
I’m unfamiliar with game theory but….If there are 205 pirates the first one doesn’t have to get tossed overboard.
What if he gives all the gold pieces away? He no longer has what others want. They have no reason to take his life. This is something that he would do because pirates are smart. He would not trade his life for some gold.
Why do we assume that the first pirate would not value his life?
On a larger note, what happens if we extend this option to the public domain of politics.
By Awareness on Aug 26, 2008
The Joker used various game theory approaches throughout the Dark Knight — it’s not over-analysis. There’s the bank scene and the ferry scene, obviously, the latter of which is almost a classic “game”. There’s also the issue about the choice between saving the girl or the lawyer. And the whole question about killing the guy vs. the hospital. This particular Joker, unlike the Nicholson Joker, is all about creating extremely tough choices. And what is game theory other than the systemization of tough choices?
The real beauty of the Joker, of course, is that he sometimes breaks the rules—as Batman says, at one point, “with the Joker, it’s never that simple.” Even when he tells you that you are in a game you can’t trust that the rules of the game are going to be enforced. It took me two viewings to realize that when the Joker tells them that the girl is in one warehouse and the lawyer is in the other, that he’s lying—they’re switched. So factoring in the veracity of the apparent game is yet another wonderful wrinkle.
By Alex W. on Aug 26, 2008
“what is game theory other than the systemization of tough choices?”
game theory is about making choices, but it’s specifially about making choices where the benefits that you get from choosing are completely dependent on the choices that others make [like 'the prisoner's dilemma', 'battle of the sexes', and so on].
in the ‘choose to save the girl or the lawyer’ example the joker had already set both the bombs ticking, & implied that he wouldn’t intervene further whatever batman did, meaning that batman had a straight decision to make make based on his own preferences, independent of any further actions made by others.
so it was no more an example of game theory at work than someone in a burger king deciding whether to buy a whopper or a chicken royale.
to my mind the scene was intended to remind the viewer of the one in the first [recent] spiderman film where spiderman was given a choice to save his girlfriend or a cable car full of schoolchildren… but in a feelgood film of that sort spiderman’s ingenuity was such that he was able to save both… but this was a much darker film, where the choice offered to batman was a serious one, he genuinely did have to choose to consign at least one person to being blown up.
the ferry scene can be analysed quite easily using game theory [as done on the links provided by the author], but it was a complicated one that is hard to analyse with simple game theory. in the simplest prisoner’s dilemma each prisoner cares only about the number of years’ sentence that he personally receives, & is indifferent to everything else. if, in the ferry scene, players had cared only about their chances of survival, the nash equilibrium would have been a race to the buzzer on both boats, with the fastest boat surviving. as it was, it seemed that, whilst the game itself was very simple, the payoffs of the passengers on each boat were potentially complex, with issues of morality coming into it.
By SA on Aug 27, 2008
they’re playing prisoner’s dilemma for cash on the UK big brother right now as we speak.
if they both play “share” they get £25k each
if one plays “share” and the other “take” the taker gets it all.
if both play “take” they both get zero.
looks like they’re going to share.
By SA on Aug 27, 2008
Awareness:
Good question–there is no reason to kill the pirate who gives away all the gold, except pirates are considered to be ruthless. Perhaps they keep their group small so each gets a larger share for the next job.
I think people get lost in game theory since the mathematical models can lead to some strange predictions of reality. This is unfortunate and causes much problems since they should be seen more as guides, not as full-scale predictions.
To me, the pirate game makes sense for a handful of people. When you get to 200+ pirates, almost all intuition is gone and it’s more of a math problem. Still interesting, but nothing we should take so seriously.
By Presh Talwalkar on Aug 28, 2008
I thoroughly enjoyed your analysis of The Dark Knight with the game theory angle. It was truly fantastic. I will return here.
By Furious Gopher on Aug 28, 2008
205 Pirates agree:
If we only have 100 gold pieces, we are pretty bad pirates.
By anomdebus on Aug 30, 2008
Well, so much for intellectual masturbation…
By Rick on Sep 1, 2008
Personally I think you have over thought the movie…
By cat on Sep 2, 2008
anomdebus: I laughed out loud when I read this! Yes, let’s not take these problems too seriously…
By Presh Talwalkar on Sep 4, 2008
I read some comments stating that there was to much beeing read into that movie which may not have been intended by the director/screenwriter in the first place. This is bullshit, of course, because every interpretation is legitimate when it is backed up with facts from the film and has to be discussed. The film has many layers to discover, but you can chose not to bother with that and just be entertained while thinking you see a simple action movie.
By nobb on Sep 10, 2008
you have just managed to get a humanist interested in maths
thanks
By amberlyn on Sep 11, 2008
Thanks for sharing this Great Information With US !
By Frank on Sep 17, 2008
I re-watched the movie with game theory in mind and the whole thing is full of it.
I think it’s most apparent when Joker says he destroyed Harvey as part of his master plan. This is after he told Harvey he is only a “dog chasing cars” and while it’s true to some extent, it’s a lie when he later reveals to Batman that he was changed as part of the plan to create chaos.
Even the end result where they choose to chase Batman is based on the desired outcomes of possible reactions to Harvey’s killings. They are playing on public reactions but also playing there own game with the public as pawns in order to prevent the chaos the Joker planned for.
By Dj.Jk on Sep 21, 2008
Dj.Jk:
Great points. I am waiting till December so I can get the film at home and do a scene by scene analysis.
By Presh Talwalkar on Sep 23, 2008