= Matching pennies
{wiki}
Both players choose heads $H$ or tails $T$ without seeing the other's choice. The row player receives $1$ when the choices match and $-1$ when they differ; the column player receives the opposite <payoff>. Thus <matching pennies> is a <zero-sum game>, with ordered <payoff> pairs:
|| Row choice / column choice
|| $H$
|| $T$
| $H$
| $(1,-1)$
| $(-1,1)$
| $T$
| $(-1,1)$
| $(1,-1)$
At $(H,H)$ the column player improves by switching to $T$; at $(H,T)$ the row player improves by switching to $T$; at $(T,H)$ the row player improves by switching to $H$; at $(T,T)$ the column player improves by switching to $H$. Every <pure strategy> <strategy profile> therefore has a profitable <unilateral deviation>, so none is a <Nash equilibrium>.
Let $p$ be the row player's <probability> of heads and $q$ the column player's <probability> of heads. Their random choices are <independent>. Against fixed $q$, the row player's pure-choice <expected payoffs> are
$$
U_1(H,q)=2q-1,\qquad U_1(T,q)=1-2q.
$$
Against fixed $p$, the column player's pure-choice <expected payoffs> are
$$
U_2(p,H)=1-2p,\qquad U_2(p,T)=2p-1.
$$
Consequently the <best responses>, expressed as allowed heads <probabilities>, are
$$
\operatorname{BR}_1(q)=\begin{cases}\{0\}&q<1/2,\\ {[0,1]}&q=1/2,\\\{1\}&q>1/2,\end{cases}
\qquad
\operatorname{BR}_2(p)=\begin{cases}\{1\}&p<1/2,\\ {[0,1]}&p=1/2,\\\{0\}&p>1/2.\end{cases}
$$
Here $[0,1]$ means every mixture is a <best response>, including both <pure strategies>. If $q>1/2$, the row player must choose $p=1$, which makes the column player's <best response> $q=0$, a contradiction. If $q<1/2$, the row player must choose $p=0$, which forces $q=1$, also a contradiction. Hence $q=1/2$; for the column player to mix at this $q$, the two column <payoffs> must tie, forcing $p=1/2$. The unique <Nash equilibrium> is therefore
$$
p^*=q^*=\frac12,\qquad U_1(p^*,q^*)=U_2(p^*,q^*)=0.
$$
Indeed, for any $p,q$, $U_1(p,q)=(2p-1)(2q-1)$ and $U_2(p,q)=-U_1(p,q)$. Holding $q=1/2$ gives the row player zero for every deviation $p'$; holding $p=1/2$ gives the column player zero for every deviation $q'$. A player is indifferent against the equilibrium mixture, but choosing an arbitrary <best response> to it need not preserve the opponent's <best response>. This is why that indifference does not produce additional <Nash equilibria>.
\Image[/matching-pennies-best-responses.png]
{title=Matching pennies: pure-choice expected payoffs and the unique intersection of best responses}
For a teaching treatment with the same <payoff> convention, see https://ocw.mit.edu/courses/17-810-game-theory-spring-2021/mit17_810s21_lec3.pdf[MIT 17.810, lecture 3, slides 29–38, on mixed strategies and matching pennies].
Back to article page