the dark knight and game theory

Wednesday, December 17, 2008

We love movies, and one of the best we saw this year was The Dark Knight.

We're convinced that the screenwriters, Christopher and Johnathan Nolan, have studied the branch of economics known as game theory--at the very least, they must have an intimate knowledge of the prisoner's dilemma--because the film pays a lot of attention to decision making in strategic situations.

As an example, we've plotted out the opening heist based on what the Joker hopes to accomplish and how he goes about it (SPOILERS AHEAD).

1) The Joker wants to ends up with all the money from the bank robbery.

2)To do that, he needs everyone else in his gang dead by the time he escapes.

3) The Joker can't take the entire gang on by himself, so he needs them to whittle each other down while they're robbing the bank.

4) To do that, he plans the robbery in sequence, where each gang member is needed to perform a particular task and each task must be completed before moving on to the next. (So, for example, Goon#1, whose job is to disarm the alarm, needs to disarm the alarm before Goon#2, whose job is to crack the safe, can crack the safe.)

5) Next, the Goons are secretly instructed to kill the Goon immediately below them in the sequence once he's completed his respective task (so once Goon#1 disarms the alarm he serves no further purpose, and Goon#2 is free to kill him). This keeps the gang from killing each other all at once, since at some point in the sequence they have to rely on the Goon they're going to kill to complete his task. It also keeps the Goons who may realize they're next to be whacked from striking preemptively, since (if they want any money) they also have to rely on the Goon above them to complete his task.

And the Joker's plan works because he knows that, given the choice, the Goons will always choose to defect (i.e. betray each other) even when cooperation yields a better payoff.

That's pretty much a textbook example of the prisoner's dilemma.

What's interesting is that the Joker never alters his decision-making behavior--he always assumes that his opponents will defect or follow their own self-interest instead of cooperating. And so each game he sets up is designed to punish self-interest and reward cooperation: The only way the Goons could have survived the opening heist was through cooperation; during the interrogation, if Batman had cooperated with the Joker right off the (wokka wokka!) bat, there would have been enough time to save both Harvey and Rachel; and, of course, the people on the ferries live because both crews choose to cooperate.

Likewise, Batman pursues self-interest when he chooses to save Rachel over Harvey. And since the Joker anticipates his opponent making the selfish choice, he switches the location of the two, dooming Rachel and setting in motion the events that disfigure, corrupt, and eventually destroy Harvey.

"Yeah, but if Batman had made the right choice and saved Harvey, Rachel would have lived, but Gotham City's crusading D.A. would have died."

Yeah, but because Batman didn't make the right choice, we know Harvey would have died anyway. Not only that, Harvey went batmansh!t crazy and almost undid everything everything his crusading D.A. image stood for. Had he been the one to die in the explosion, he still would have been a martyr, but Rachel would be alive, Batman wouldn't be an outlaw, and the two could have lived happily ever after.

There's more! The Joker expects the prison guard to retaliate for the murder of his friends; he does--and ends up unwittingly cooperating with the Joker's plan for escape; Batman works out a plan to salvage Harvey and cooperate under the radar with the police when had he cooperated from the beginning, the outcome would have been much better; there are lots more examples, but I'm leaving them for now.

Suffice to say, The Dark Knight's a must-see film for anyone who's ever heard of game theory, along with anyone who's a Batman fan. Or anyone ever.

Also of note: Screenwriter Todd Alcott has posted the first part of his analysis of The Dark Knight. It's good. Read it. Now.