Is there a solution to the Joker's game in The Dark Knight? In the final battle in the movie, the Dark Knight (2008), the Joker has rigged two ferries carrying people out of Manhattan Gotham to explode. One ferry carries mostly civilians with a substantial National Guard presence. The other ferry contains large numbers of prison inmates and some guards. The Joker has rigged both to explode, and he has given the crew on each boat the detonators — only they have the detonator for the other boat. He announces the rules of the game to the crew and passengers of each vessel.


  
  Each of them have the power to blow up the other boat and then their boat will live.
  If they get to midnight with know no exploded boats, the Joker will detonate both.
  Any attempt to leave or defuse the bombs will result in the destruction of both boats.
  


Is this a known variant of the prisoner's dilemma? How to model this game and what is the actual solution? Why is the equilibrium as shown in the game attained?
Suppose first that the groups are not altruistic and care only about their own survival. It is not exactly a prisoner's dilemma since the outcome obtained by mutual cooperation (if both groups wait) is not Pareto-improving: everyone dies in that case. The only equilibrium is that one of the groups destroys the other boat as soon as possible; and any action played initially by the other group is possible in equilibrium, since this team is indifferent between waiting and triggering other the bomb (they will die one second later anyway).

As @Alecos_Papadopoulos wrote, the game becomes more interesting if the groups have pro-social preferences. For instance, they might be reluctant to sacrifice the other group and prefer that everyone dies (including themselves). If there is no uncertainty, the outcome is trivial: the only equilibrium is that both groups wait until the Joker triggers the bombs. 

The most interesting scenario is the one in which the types of the groups are uncertain: each boat can be either selfish or altruistic. In that case, it seems reasonable (but other specifications are possible) to assume that cooperation is desirable only if the other group is also altruistic, but if the other group is selfish the individuals prefer to kill them first and survive. The equilibrium strategies are the following: 


If the group is selfish, it triggers the bomb of the other group as soon as possible (it is a dominant strategy).
If the group is altruistic, its initial action depends on its beliefs about the other boat. If it is sufficiently optimistic (i.e it believes that its opponent is altruistic with a sufficiently high prior), the group waits. If it has not exploded one second later, the group understands that it faces an altruistic opponent and therefore waits until the Joker kills everyone. Notice that the explosions happen either at $t=0$ (as soon as the game starts) or at midnight (when the game ends) but never in between.