Monday, November 9, 2015

Game Theory in The Dark Knight!

I personally love when I find places that Math relates to everyday life. And while The Dark Knight might be an extreme relation to real life, it is still a movie, so why not talk about it!

At this point, I hope that everyone who has an interest in seeing the movie already has, I don’t want to ruin the plot for anyone. So if you really want to see the movie, I guess I am assigning you homework to watch it tonight, or at least read about it. The Link below to the blog has a good overview of the movie before getting into the Game Theory discussion.

Game Theory of the Dark Knight 

So without further delay, here is the game theory in The Dark Knight, or at least some of it (there is a lot).

For those who have seen it, I am sure that the first thing that you think about is when the Joker fills the two ferries with people. One ferry carries prisoners from Gotham while the other carries innocent civilians. But here is the twist that gives us the game theory! The Joker has rigged each of the ferries with explosives; he then precedes to hand each of the ferries the detonator to the other ferry. If neither ferry blows up the other ferry before midnight, than the Joker will blow up both of the ferries and everyone will die.

So lets take a look at the payoff matrix for this situation:



So we see that the highest payoff is not dying, for both the prisoners and the civilians.

The civilians recognize this and take a vote on whether or not to blow up the ferry carrying the prisoners. When the vote is tallied, the result is to detonate the ferry. Seems simple in practice, press a button, kill prisoners that have “had their chance,” and you get to live. But it is not as easy as that. There are other factors that go into play. We are going to try and understand these factors by taking a look at a different type of hostage dilemma.

Hostage Dilemma

Lets paint the scene:
-50 people locked in a room by a bad guy
-Bad guy needs a password from at least one of them
-Bad guy will ask hostages one by one what the password is
            -Hostage spills the information, “game” ends
            -Hostage stays quiet, he dies

Now for the payoffs:
Sacrificial and Selfish types
Sacrificial receives -1 from dying and -9 for giving away the password
Selfish receives -1 from dying and does not care if the password is given up

For this case we will make the hostage sacrificial 95% of the time, and selfish the other 5%.

So how often will the bad guy get the password? Turns out that it is 100% of the time, because the first person will always give up the answer.

 Proof

How:
Case 1, the first hostage is selfish.
They will receive a -1 payoff if they die, and a 0 payoff if they give up the password. And thus they will always talk, and so that wraps up case 1.

Case 2, the first hostage is sacrificial.
No one talks, then they die and receive a -1 payoff, if they talk they get a -9 payoff.
Seems simple, but you need to take a look at the future, aka the people to go afterwards. Selfish type will always talk, and so the best-case scenario is that all sacrificial types remain silent. The probability that no one will talk is .95^49=.08.
And thus the probability that someone talks 1-.08=.92, or 92%.

So now this allows us to take a look at the expected utility.
EU(keep quiet)=(-1)(.08)+(-1+ -9)(.92)=-9.28  

EU(talk)=-9

And so the hostage will receive more of a payoff if he/she decides to talk, even though it is –9. And sadly the bad guy will always get the password.

So in the Dark Knight, the hostages, the civilians and the prisoners, have two decisions, detonate or be detonated.
So while the connection between the two is not exactly clear and straightforward, it still helps us to understand that there is more behind the decision.
The civilians who are selfish want to detonate, and the sacrificial ones will not detonate. Detonating will not receive any negative payoff, but sacrificial ones will, and also sacrifice the rest of the ferry.

So I hope this gives you an overview of the hostage dilemma and an intro to the Dark Knight. I hope I didn’t spoil anything yet, but warning there will be a spoiler in class tomorrow.

Thanks guys,
Please post any questions that you have, and I will do my best to answer them in the comments, or in the presentation tomorrow.


Sam Horan

9 comments:

  1. Here are my sources:
    https://www.quora.com/What-can-we-learn-about-game-theory-and-the-prisoners-dilemma-after-watching-The-Dark-Knight

    https://www.youtube.com/watch?v=g2Oxg1oAKpk

    ReplyDelete
  2. Hey Sam! Cool post. One thing though is that the hostage's dilemma doesn't seem to be that relevant to this particular scene. It is more relevant in the scene in the next movie (Dark Knight Rises) in which Bane takes the board members hostage and just needs one of them to gain access to something.

    Modeling the boat scene in this movie (Dark Knight) using the prisoner's dilemma is really cool, though some of the people in the Quora discussion (in the link you gave) point out that it isn't quite a usual prisoner's dilemma. There's actually a lot more to it, some of which is gone over in detail by Michael Allen and Julie VanDusky at Boise State here: http://quantitativepeace.com/blog/2008/07/the-dark-knight.html. Check that out and see if you want to add anything to your discussion!

    Other interesting stuff in the Dark Knight:
    * Fair division/the Pirate Puzzle (http://mindyourdecisions.com/blog/2008/08/19/game-theory-in-the-dark-knight-a-critical-review-of-the-opening-scene-spoilers/#.VkDqsq6rRTY) <~~ this is actually one of the first uses of game theory, so it's pretty interesting from a historical perspective, as well!

    * Mob negotiation scene (https://www.youtube.com/watch?v=JYSI4BXG00c) <~~ this might also come up later when we hear about game theory applied to terrorism

    I'm looking forward to your presentation and maybe a scene or two from the movie (in case someone hasn't seen it or it's been a while)! :)

    ReplyDelete
    Replies
    1. You can also analyze the game theory in this classic scene from the Dark Knight Rises.

      https://www.youtube.com/watch?v=dyUv2wJLE2s

      Delete
  3. Hi Sam,
    Thanks for the post! It's really interesting to think about The Dark Knight in the context of game theory after reading your post. One example that I am using to explain my final paper that I think is relevant for the ferry scene in the The Dark Knight is The Chicken Game Problem. In the ferry scene, the Nash Equilibrium doesn't occur when each group chooses to both cooperate or to both detonate like we see in the Prisoner's Dilemma. The outcome is the same when both ferries choose the same strategies, because both ferries will explode. Each ferry has a different Nash Equilibrium in this situation, so it would be beneficial for the two ferries to choose different strategies.
    Here is a wikipedia link that better explains the game of chicken for those of you who don't know:
    https://en.wikipedia.org/wiki/Chicken_%28game%29

    ReplyDelete
  4. Assuming I understand the ferry scene, it should be true that a blown-up ferry can't blow up the other ferry. That is, choosing to detonate or defect actually forces the other group to lose their detonator and, thus, forces them to cooperate. Forcing your "opponent" to cooperate seems like even more motivation to detonate the bombs. Does this have an effect on the game, or does it just amplify what is already the case?

    ReplyDelete
  5. Hi Sam, really cool post. The Batman trilogy is definitely one of my favorites. When I heard your were presenting on this topic, I originally thought it was going to be applied to the scene where the Joker gives the location of Dent and Rachel, making the cops/Batman choose who to save (but i realized this doesn't really apply). One question I had was regarding the last hostage in the situation. If the bad guy has killed off all other hostages in the scenario, when questioning the last hostage, would he still kill the last hostage if he didn't get the password? It seems like the options would change in this case. Looking forward to watching some Batman clips today

    ReplyDelete
    Replies
    1. Great question, Harry (which I'll let Sam answer). I just wanted to point out that the scene you're reference IS a classical example of a game theory problem!! It's actually an example of something that Jon will talk to us about in a little while: Blotto games.

      Delete
  6. The fact that we can use game theory to make insights about superhero movies is so cool! I got to thinking about the part of the movie when the Joker threatens to kill people everyday until batman reveals his identity. I feel like this represents somewhat of a hostages' dilemma. Although batman himself is not a "hostage," other innocents are killed in the Joker's pursuit of information. Eventually, Harvey Dent identifies himself as batman so the murders would stop. This conflict is definitely a stretch of the hostages' dilemma. It also has some aspects of the volunteer's dilemma and blotto games tied in. Anyways...I think this dilemma that runs throughout the movie can be analyzed game theoretically, but I can't pin down a satisfying model. Any ideas?

    ReplyDelete