Dynamic Games

Dynamic Games

How I stopped to worry and love the bomb

nuke USSR don't nuke P 3 -1 -2 -2 nuke USSR don't nuke P 0 -3 -1 3 nuke USSR don't nuke G

Dynamic Games

quickstart guide on game trees

Decision nodes
the label inside the circle indicates the player whose turn it is to move.
Edges
the label on the edge indicates the action taken by the player.
Terminal nodes
the numbers inside the split circles indicate the payoffs to each player (the top number is the payoff to player 1, the bottom number is the payoff to player 2). In games with more than two players, we usually just use commas to separate the payoffs.

Dynamic Games

Strategies are not equivalent to actions

In dynamic games, a player's strategy must specify an action for each of the nodes the player controls. In other words, a strategy for a player is a function from the history of the game (the sequence of actions taken so far) to the action the player will take at each of her or his decision nodes.

In the previous game while the general strategy coincides with his actions since he only moves once, the president strategy must specify what to do when the general chose to "nuke USSR" and what to do when the general choose to "not nuke". Thus, the President has four strategies:

NN
Always "nuke USSR"
DD
Always "don't nuke"
ND
"nuke USSR" if the General nukes, "don't nuke" if the General doesn't
DN
"don't nuke" if the General nukes, "nuke USSR" if the General doesn't

Strategies are not equivalent to actions

Payoff Matrix

NN DD ND DN
nuke USSR $\phantom{-}3$,$-1$ $-2$,$-2$ $\phantom{-}3$,$-1$ $-2$,$-2$
don't nuke $\phantom{-}0$,$-3$ $-1$,$\phantom{-}3$ $-1$,$\phantom{-}3$ $\phantom{-}0$,$-3$

The payoffs that correspond to best responses are highlighted. Notice that this game has three equilibria (both players are best responding):

  • (nuke USSR, NN) with payoffs (3,-1)
  • (nuke USSR, ND) with payoffs (3,-1)
  • (don't nuke, DD) with payoffs (-1,3)

but the only credible (subgame perfect equilibrium) is the (nuke USSR, ND). The next slide defines subgame perfect equilibrium.

Subgame Perfect Equilibrium

A subgame perfect equilibrium (SPE) is a strategy profile such that players are best responding in every decision node (not only in the nodes reached in equilibrium). The subgame perfect Nash equilibrium is depicted in red in the tree below:

nuke USSR don't nuke P 3 -1 -2 -2 nuke USSR don't nuke P 0 -3 -1 3 nuke USSR don't nuke G
‘nuke USSR’
subgame
nuke USSR don't nuke P 3 -1 -2 -2
‘don’t nuke’
subgame
nuke USSR don't nuke P 0 -3 -1 3

Click on the P nodes in the tree to extract subgames

Reduced game

nuke USSR don't nuke G 3 -1 -1 3

SPNE path

nuke USSR nuke USSR don't nuke don't nuke don't nuke nuke USSR G P P 3 -1 -2 -2 0 -3 -1 3

Backward Induction

A Recursive Method

Click here to practice backward induction.

Backward Induction

A Recursive Method (cont.)

Backward Induction

Games With A Continuum of Actions

How do we find the subgame perfect equilibrium when players choose from a continuum of actions—as in the public-good, peer-effects, and tournament games we saw earlier?

  1. At the final nodes, apply Recipe #0 or Recipe #1 to find the last mover’s best response.
  2. Step back to the nodes immediately before them. Substitute the best response you just found into the payoff of the player who moves there. The new payoff depends on current and past actions only—the future actions have been eliminated.
  3. Apply Recipe #0 or Recipe #1 to this new payoff to obtain that player’s best response.
  4. Repeat, moving back one stage at a time, until you reach the initial node—the game is solved.

An Example

Peer Effects

Recall the peer-effects model. Individuals $1$ and $2$ choose actions $x$ and $y$. Each would like to choose her own favorite action, $a_1$ and $a_2$ respectively, but also dislikes choosing an action far from her peer’s, with $\lambda\gt 0$ measuring how heavily that peer pressure weighs:

$$\begin{aligned} u_1(x,y) &= 1-(a_1-x)^2-\lambda\,(y-x)^2\\[2pt] u_2(x,y) &= 1-(a_2-y)^2-\lambda\,(x-y)^2 \end{aligned}$$

The simultaneous game, as a reminder. Each individual takes her peer’s action as given, so individual 1 maximizes $u_1$ over $x$ holding $y$ fixed:

$$\diff{}{x}u_1=2\,(a_1-x)+2\lambda\,(y-x)=0 \;\Longleftrightarrow\; x=BR_1(y)=\frac{a_1+\lambda\,y}{1+\lambda}$$

and symmetrically $y=BR_2(x)=\dfrac{a_2+\lambda\,x}{1+\lambda}$. The Nash equilibrium of the static game is the pair at which both best responses hold at once:

$$x^e=\frac{(1+\lambda)\,a_1+\lambda\,a_2}{1+2\lambda} \qquad\text{and}\qquad y^e=\frac{(1+\lambda)\,a_2+\lambda\,a_1}{1+2\lambda}$$

Now change the timing. Individual 1 chooses $x$ first. Individual 2 observes $x$ and only then chooses $y$. Nothing else changes—the same two utility functions, the same $\lambda$.

Individual 2’s strategy. A strategy must specify an action at every node the player controls. Individual 2 controls one node for each $x$ that individual 1 might pick, and every one of those nodes starts a subgame. Subgame perfection asks 2 to best respond in all of them—not only at the $x$ that actually gets played. So in any subgame perfect Nash equilibrium, individual 2’s strategy is the entire best-response function

$$y=BR_2(x)=\frac{a_2+\lambda\,x}{1+\lambda},$$

one action for every $x$. The single number 2 ends up playing is just the value of that function at the $x$ individual 1 chose.

Individual 1 knows this. She is not choosing against a fixed $y$—she is choosing a point along 2’s best-response function. Substituting 2’s strategy into her own utility,

$$u_1\paren{x,BR_2(x)}=1-(a_1-x)^2-\lambda\paren{\frac{a_2+\lambda\,x}{1+\lambda}-x}^2$$

which is a function of $x$ alone.

Apply Recipe #0. Differentiating with respect to $x$ by the chain rule and setting the derivative to zero,

$$\diff{}{x}u_1\paren{x,BR_2(x)} =2\,(a_1-x)-2\lambda\paren{\frac{a_2+\lambda\,x}{1+\lambda}-x}\paren{\frac{\lambda}{1+\lambda}-1}=0$$

The solution. Solving the first-order condition for $x$, and then feeding that $x$ back into 2’s strategy,

$$x^\ast=\frac{(1+\lambda)^2a_1+\lambda\,a_2}{1+3\lambda+\lambda^2} \qquad\text{and}\qquad y^\ast=BR_2(x^\ast)=\frac{(1+2\lambda)\,a_2+\lambda(1+\lambda)\,a_1}{1+3\lambda+\lambda^2}$$

This is not the static Nash equilibrium. Subtracting the static solution,

$$x^\ast-x^e=\frac{\lambda^2(1+\lambda)\,(a_1-a_2)}{(1+2\lambda)(1+3\lambda+\lambda^2)} \qquad\text{and}\qquad y^\ast-y^e=\frac{\lambda^3\,(a_1-a_2)}{(1+2\lambda)(1+3\lambda+\lambda^2)}$$

Both differences carry the sign of $a_1-a_2$: moving first, individual 1 commits closer to her own favorite action, and individual 2—who dislikes being far from her peer—follows her there. Individual 1 moves $\tfrac{1+\lambda}{\lambda}$ times as far as individual 2 does.

Two limiting cases make the point. At $\lambda=0$ both differences vanish: with no peer pressure there is nothing for individual 1 to exploit, and each simply plays her favorite action. As $\lambda$ grows large the simultaneous game drives both actions to the midpoint $\tfrac{a_1+a_2}{2}$, while the sequential game drives both to $a_1$—the more the follower cares about conforming, the more completely the leader dictates the outcome.

The first-mover advantage. Individual 1 is better off:

$$u_1(x^\ast,y^\ast)-u_1(x^e,y^e)=\frac{(a_1-a_2)^2\,\lambda^4}{(1+2\lambda)^2(1+3\lambda+\lambda^2)}\ge 0$$

and you can see why without computing anything. The static Nash pair $(x^e,y^e)$ also lies on 2’s best-response function, since $y^e=BR_2(x^e)$. So it was one of the points individual 1 could have chosen when she maximized along that function—and she did not choose it.

PS 05

Peer Effects

Instead of substituting $BR_2(x)$ into $u_1$, there is a second way to find individual 1’s choice: keep both $x$ and $y$ as choice variables and impose individual 2’s strategy as a constraint. That is a maximization problem with one equality constraint—so it is Recipe #1.

$$\max\limits_{\substack{x,y\\ \mathrm{subject\, to} \\ \\ y \;=\; BR_2(x)}} u_1(x,y)$$

A note on notation. Recipe #1 writes the Lagrange multiplier as $\lambda$, but here $\lambda$ is already taken—it is the weight of the peer pressure in $u_1$ and $u_2$. To avoid the collision we call the multiplier $l$, as you did in PS 02, and it is quicker to type.

  1. Write the Lagrangian $\mathcal{L}$ corresponding to the problem.
  2. Obtain the gradient of the Lagrangian.
  3. Set the first-order conditions.
  4. Show the solution of the first-order conditions—the values of $x$, $y$ and $l$.

Hints. Make sure to use the actual expression for $BR_2(x)$, not the symbol. And notice that you have three variables—$x$, $y$ and $l$—when you compute the gradient and solve the first-order conditions.

Notice that $y$ is the action individual 2 plays in equilibrium—not individual 2’s strategy, which is the whole function $BR_2(x)$.

Submit on Canvas: PS 05. Download the template 510PS05FA26.nb there, type your answers into the cells provided and upload the notebook. Use the template exactly as in the previous problem sets and do not rename the variables. One submission per group, due Friday 25 September at 11:59 PM.

Dynamic Games

Problem Set 03

The set-up is identical to Problem Set 02.

Mark Watney is stranded on Mars but will be rescued after four periods. Time is discrete: $t=0,1,2,3$. He has only 4 potatoes (which we shall assume are infinitely divisible). We use $k_t$ to denote his stock of potatoes at the beginning of period $t$, so the stock starts at $k_0=4$.

At every period he decides how many potatoes to consume, which we denote by $c_t$, and then the stock of potatoes grows according to the rule $$k_t = 2\cdot\paren{k_{t-1}-c_{t-1}}.$$ In words, the amount of unconsumed potatoes doubles. Mark’s utility in period $t$ is given by $\sqrt{c_t}$ and he discounts future utility according to the discount factor $\delta=0.8$.

In order to solve this problem it will be easier if we write it in terms of the amount of potatoes that are saved (not consumed) in period $t$: $$s_t=k_t-c_t.$$ Thus $c_t=k_t-s_t$ and also $k_t=2\cdot s_{t-1}$ (by the growth law of potatoes).

Notice we can solve this by finding the subgame-perfect Nash equilibrium of the game with one player. Let the utility of the player in period $t$ be $\mathbf{U[t]}$. For example $$\mathbf{U[3]=0.8^3*Sqrt[c[3]]}$$ as the past utility is sunk.

Before you start: work through DynamicGames.nb (also on Canvas under Files). It runs exactly the same procedure—solve the last period first, substitute the answer back with $\mathbf{/.}$, then optimize—on the Stackelberg model we did in class, first with two firms and then with three. The steps below are those same moves applied to Mark’s potatoes, with periods in place of firms. Pay particular attention there to why the order of the substitutions matters: you will need it in step (1).

  1. If we choose $\mathbf{c[3]}$ and $\mathbf{s[3]}$ to max $\mathbf{U[3]}$ subject to $\mathbf{c[3]+s[3]=2*s[2]}$, we know by your reasoning in PS 02 that $$\mathbf{sol[3] = \{\,c[3] \to k[3],\; s[3] \to 0\,\}}.$$ The utility in period 2 is $\mathbf{0.8^2*Sqrt[c[2]]+U[3]}$. Use the replacement rule $\mathbf{/.}$ and $\mathbf{sol[3]}$ and the budget equation for period 2 $$\mathbf{budget[2] = \{\,c[2] \to 2*s[1] - s[2]\,\}}$$ above to write/define $\mathbf{U[2]}$ = an expression that depends on $\mathbf{s[2]}$ and the sunk (at period 2) $\mathbf{s[1]}$. Hint: Use $\mathbf{/.}$ twice.
  2. Notice that $\mathbf{s[1]}$ is sunk, apply Recipe #0 to the objective function $\mathbf{U[2]}$ to obtain the optimal $\mathbf{s[2]}$ (as a function of $\mathbf{s[1]}$).
  3. The utility in period 1 is $\mathbf{0.8*Sqrt[c[1]]+U[2]}$. Proceed as in step (1)—substitute the optimal $\mathbf{s[2]}$ you found in (2) together with the period-1 budget equation—to write $\mathbf{U[1]}$ as a function of $\mathbf{s[0]}$ and $\mathbf{s[1]}$ alone.
  4. Notice that $\mathbf{s[0]}$ is sunk, apply Recipe #0 to the objective function $\mathbf{U[1]}$ to obtain the optimal $\mathbf{s[1]}$ (as a function of $\mathbf{s[0]}$).
  5. The utility in period 0 is $\mathbf{Sqrt[c[0]]+U[1]}$. Be careful here: the period-0 budget equation is $$\mathbf{c[0]+s[0]=4},$$ not $\mathbf{2*s[-1]}$—there is no period before $0$, and the 4 potatoes are Mark’s initial endowment $k_0=4$. So the replacement rule is $\mathbf{budget[0] = \{\,c[0] \to 4 - s[0]\,\}}$.
    • Substitute the optimal $\mathbf{s[1]}$ from (4) and $\mathbf{budget[0]}$ to write $\mathbf{U[0]}$ as a function of $\mathbf{s[0]}$ alone.
    • Nothing is sunk at period 0: apply Recipe #0 to $\mathbf{U[0]}$ to obtain the optimal $\mathbf{s[0]}$—this time a number, not a function.
← Constrained Optimization Time Preferences →