In game theory, the stag hunt is a game which describes a conflict between safety and social cooperation. Other names for it or its variants include "assurance game", "coordination game", and "trust dilemma".
Jean-Jacques Rousseau described a situation in which two individuals go out on a hunt. Each can individually choose to hunt a stag or hunt a hare. Each player must choose an action without knowing the choice of the other. If an individual hunts a stag, he must have the cooperation of his partner in order to succeed. An individual can get a hare by himself, but a hare is worth less than a stag. This is taken to be an important analogy for social cooperation. So you can see in the table that if the player one choose a stag and the player two too then they will both get a payoff of 5. But if the hunter one takes a rabbit a the player two a stag then the first player will get 4 and the second 0 and so on.
Figure 1: Example of stag hunt
A stag hunt is a game with two pure strategy Nash equilibria - one that is risk dominant another that is payoff dominant. The strategy pair (Stag, Stag) is payoff dominant since payoffs are higher for both players compared to the other pure NE, (Rabbit, Rabbit). On the other hand, (Rabbit, Rabbit) risk dominates (Stag, Stag) strategy since if uncertainty exists about the other player's action, gathering will provide a higher expected payoff. The more uncertainty players have about the actions of the other player(s), the more likely they will choose the strategy corresponding to it.
Both players prefer one equilibrium to the other - the both are Pareto optimal and Hicks optimal.
The stag hunt differs from the Prisoner's Dilemma in that there are two Nash equilibria: when both players cooperate and both players defect. In the Prisoners Dilemma, however, despite the fact that both players cooperating is Pareto efficient, the only Nash equilibrium is when both players choose to defect.
There is a substantial relationship between the stag hunt and the prisoner's dilemma. In biology many circumstances that have been described as prisoner's dilemma might also be interpreted as a stag hunt, depending on how fitness is calculated. It is also the case that some human interactions that seem like prisoner's dilemmas may in fact be stag hunts. But occasionally players who defect against cooperators are punished for their defection. For instance, if the expected punishment is -2, then the imposition of this punishment turns the above prisoner's dilemma into the stag hunt given at the introduction.