Chapter 13: Learning and Adaptation
Multiple Choice · Learning Models
Question 1
In the multi-armed bandit problem, what does the player observe in each round?
C is correct. In the multi-armed bandit one arm is pulled per round and only that arm's reward is seen; what the other arms would have paid that round is unknown (partial feedback). That is why exploration is needed: no information can be gathered about an arm that is never tried. B, seeing the payoff of every action, is Hedge's full-information setting. A is the information fictitious play looks at, and D is the information replicator dynamics looks at.
Multiple Choice · Learning Models
Question 2
In which class of games does best-response dynamics always stop at a pure Nash equilibrium?
A is correct. In a potential game every profitable unilateral deviation strictly increases a common potential function. Because the game is finite, the potential cannot increase forever; the dynamics stop at a profile where nobody wants to deviate, that is, at a pure Nash equilibrium (Monderer–Shapley, 1996). D is wrong: Matching Pennies is a finite game but has no pure equilibrium, so the dynamics cycle. Since Matching Pennies is also zero-sum, B is wrong too; C is the cycle itself.
Multiple Choice · Best-Response Dynamics
Question 3
How does best-response dynamics behave in Matching Pennies?
D is correct. The Matcher wants the same face, the Mismatcher a different one. At (H,H) the Mismatcher switches to T → (H,T); the Matcher switches to T → (T,T); the Mismatcher switches to H → (T,H); the Matcher switches to H → (H,H) again. Because there is no pure equilibrium, in every profile some player is unhappy and the dynamics enter an endless cycle; so A and C are wrong. B is wrong too: the dynamics keep jumping between pure profiles; it is the frequencies of fictitious play that approach the mixed equilibrium.
Multiple Choice · Best-Response Dynamics
Question 4
In fictitious play, what does a player best-respond to?
B is correct. In fictitious play the player treats the opponent as a mixed strategy that plays according to the frequencies of their past actions and best-responds to it. For example, if the opponent played T in 5 of 7 rounds, the player assumes they play (2/7, 5/7). A, responding only to the last action, is best-response dynamics. In C the player looks at their own history, but a best response is computed against the opponent's behavior. In D there is no learning at all.
Multiple Choice · Fictitious Play
Question 5
For which of the following is convergence of fictitious-play frequencies to equilibrium NOT guaranteed?
D is correct. Convergence of fictitious-play frequencies to equilibrium is proven for two-player zero-sum games (Robinson, 1951), 2×2 games (Miyasawa, 1961) and potential games (Monderer–Shapley, 1996). Shapley (1964), however, built a general-sum 3×3 game in which the actions rotate in ever-longer cycles and the frequencies approach no equilibrium. A, B and C are classes with a convergence guarantee.
Multiple Choice · Hedge and Equilibrium
Question 6
If all players use a no-regret algorithm such as Hedge, what does the time average of play approach?
A is correct. If every player's external regret satisfies RT/T → 0, the time average of the profiles played approaches a coarse correlated equilibrium (CCE): nobody can gain on average by switching to “always play a′”. D (correlated equilibrium) requires a stronger condition: small internal (swap) regret. B is wrong: a pure Nash equilibrium may not exist (Matching Pennies). C is wrong too: a CCE need not be Pareto optimal.
Multiple Choice · Hedge and UCB
Question 7
With payoffs in [0, 1] and n actions, which bound is obtained if Hedge uses η = √(ln n / T)?
C is correct. Hedge's general bound is RT ≤ (ln n)/η + ηT; the first term grows when η is small, the second when η is large. With η = √(ln n / T) both terms equal √(T ln n), so RT ≤ 2√(T ln n). For example, for n = 3 and T = 10,000 the bound is ≈ 2·√10,986 ≈ 210, only 0.021 per round. A ((ln n)/η) and D (ηT) are each only one part of the bound; B (T/2) is the worst-case regret of following the leader.
Multiple Choice · Bandits and Q-Learning
Question 8
If ε is kept constant, how does the regret of the ε-greedy algorithm grow with T?
A is correct. With constant ε the algorithm pulls a random arm with probability ε in every round; some of these rounds go to bad arms, and each round adds a constant expected loss. Over T rounds this loss accumulates and the regret grows linearly (≈ c·T). In a 5000-round comparison, ε-greedy with 10% exploration grows linearly while UCB1 grows logarithmically (B) (Auer et al., 2002). Logarithmic regret requires ε to shrink over time; C and D cannot be obtained with a constant ε.
Multiple Choice · Multi-Agent Learning and Evolution
Question 9
Why do single-agent Q-learning guarantees fail in a multi-agent environment?
D is correct. The convergence proof of single-agent Q-learning assumes a stationary environment, where transitions and rewards do not change over time. In a multi-agent setting the outcomes an agent sees depend on the other agents' policies; as they learn, the environment stops being stationary and an action that was good yesterday may be bad today. A is wrong: there is a reward signal; B is wrong: the number of states can be finite; C (γ < 1) is a standard assumption that helps convergence. Self-play (AlphaZero) is one way to manage this problem.
Multiple Choice · Axelrod's Tournament
Question 10
In a 10-round match, how many points does Tit-for-Tat score against Always Defect (temptation 5, mutual cooperation 3, mutual defection 1, sucker 0)?
C is correct. TFT cooperates in the first round and Always Defect defects: TFT gets 0 (sucker), the opponent gets 5 (temptation). In the next 9 rounds TFT copies the opponent's last move (defection) and mutual defection continues: 1 per round, 9·1 = 9 in total. TFT scores 0 + 9 = 9, Always Defect 5 + 9 = 14 (D). B (10) counts the first round as 1 as well; A assumes TFT never retaliates.
Classic Question · Best-Response Dynamics
Question 11: Best-Response Dynamics
The game is below (row payoff, column payoff). The starting profile is (A, Z); first the row player, then the column player, in turn best-respond to the opponent's current action. Run the dynamics step by step: where does it stop? What are the game's pure Nash equilibria? What would happen if it started from (C, X)?
| X | Y | Z | |
|---|---|---|---|
| A | (5, 5) | (0, 1) | (3, 3) |
| B | (3, 1) | (3, 5) | (4, 3) |
| C | (2, 2) | (5, 5) | (1, 0) |
Show answer
- Row, against Z: u1 = 3, 4, 1 → B. Profile (B, Z).
- Column, against B: u2 = 1, 5, 3 → Y. Profile (B, Y).
- Row, against Y: u1 = 0, 3, 5 → C. Profile (C, Y).
- Column, against C: u2 = 2, 5, 0 → already Y; the row does not leave C either → the dynamics stop at (C, Y).
Pure Nash equilibria: (A, X) and (C, Y); in both, each payoff is the largest in its own column/row. From (C, X): the row, against X, gets 5, 3, 2 → A; the column, against A, gets 5, 1, 3 → X → it stops at (A, X). The equilibrium reached depends on the starting point.
Classic Question · Fictitious Play
Question 12: Fictitious Play
Fictitious play in Matching Pennies: the Matcher matches the majority in the opponent's history, the Mismatcher plays the opposite of the majority in the opponent's history; if the counts are equal, both simply play H. In round 1 the Matcher plays T and the Mismatcher plays H. Write out the first 6 rounds as a table; after round 6, what is each player's share of H?
Show answer
| t | Mat. sees Mis. H/T | Matcher | Mis. sees Mat. H/T | Mismatcher | winner | Mat. H share | Mis. H share |
|---|---|---|---|---|---|---|---|
| 1 | — | T | — | H | Mis. | 0 | 1 |
| 2 | 1 / 0 | H | 0 / 1 | H | Mat. | 1/2 | 1 |
| 3 | 2 / 0 | H | 1 / 1 (tie) | H | Mat. | 2/3 | 1 |
| 4 | 3 / 0 | H | 2 / 1 | T | Mis. | 3/4 | 3/4 |
| 5 | 3 / 1 | H | 3 / 1 | T | Mis. | 4/5 | 3/5 |
| 6 | 3 / 2 | H | 4 / 1 | T | Mis. | 5/6 | 1/2 |
After round 6 the Matcher's share of H is 5/6 ≈ 0.83 and the Mismatcher's is 1/2. In round 7 the Mismatcher's counters are tied at 3/3, so the Matcher plays H again; the actions change in ever-longer cycles, and in the long run the frequencies approach (½, ½).
Classic Question · External Regret
Question 13: Follow the Leader and Regret
Two actions A, B; the payoffs are in the table. “Follow the leader” picks, in each round, the action with the larger total so far (A on a tie). Find the algorithm's total payoff and its external regret. What is the expected regret of a random player who plays (½, ½) in every round?
| t | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| g(A) | 0 | 1 | 0 | 1 | 0 |
| g(B) | 0.5 | 0 | 1 | 0 | 1 |
Show answer
| t | previous A / B | choice | payoff |
|---|---|---|---|
| 1 | 0 / 0 | A | 0 |
| 2 | 0 / 0.5 | B | 0 |
| 3 | 1 / 0.5 | A | 0 |
| 4 | 1 / 1.5 | B | 0 |
| 5 | 2 / 1.5 | A | 0 |
The leader is exactly the wrong action every round: the algorithm scores 0. Fixed actions: A = 2, B = 2.5 → R5 = 2.5 − 0 = 2.5 (½ per round; grows linearly with T).
Random player: 0.25 + 0.5 + 0.5 + 0.5 + 0.5 = 2.25 → regret 2.5 − 2.25 = 0.25. A deterministic rule is exploited; playing a mixed strategy (Hedge) prevents this.
Classic Question · Hedge
Question 14: Three Rounds of Hedge
Three actions A, B, C; Hedge with η = ln 2 and initial weights 1. Payoffs: round 1 g = (1, 0, 1), round 2 g = (0, 1, 1), round 3 g = (1, 0, 0). Compute each round's probabilities, the expected payoff, and the external regret after three rounds.
Since η = ln 2, eη·g = 2g: the weight of an action with payoff 1 doubles.
Show answer
| t | w | p | Σ p·g |
|---|---|---|---|
| 1 | (1, 1, 1) | (1/3, 1/3, 1/3) | 2/3 |
| 2 | (2, 1, 2) | (2/5, 1/5, 2/5) | 3/5 |
| 3 | (2, 2, 4) | (1/4, 1/4, 1/2) | 1/4 |
The algorithm's total: 2/3 + 3/5 + 1/4 = 91/60 ≈ 1.52. Final weights (4, 2, 4).
Totals of the fixed actions: A = 2, B = 1, C = 2 → the best is 2. External regret R3 = 2 − 91/60 = 29/60 ≈ 0.48. In round 3, C was given the highest probability (1/2) but A won: Hedge adapts to the past and does not know the future.
Classic Question · Multi-Armed Bandit
Question 15: UCB1 and Bandit Regret
Three arms, true means μ = (0.3, 0.5, 0.7). In the first 8 rounds the arms were pulled N = (2, 4, 2) times, with estimates Q = (0.5, 0.75, 0).
(a) Which arm does UCB1 (UCB = Q + √(2 ln t / N)) choose at t = 9?
(b) What is the regret of the first 8 rounds, R = T·μ* − Σ μat?
(c) With the same Q, with what probability does ε-greedy with ε = 0.1 choose each arm (exploration picks each of the three arms with equal probability)?
Show answer
(a) 2 ln 9 ≈ 4.394. Bonuses: N = 2 → √2.197 ≈ 1.48; N = 4 → √1.099 ≈ 1.05.
| arm | Q | bonus | UCB |
|---|---|---|---|
| 0 | 0.5 | 1.48 | 1.98 |
| 1 | 0.75 | 1.05 | 1.80 |
| 2 | 0 | 1.48 | 1.48 |
UCB1 chooses arm 0: not arm 1, which has the highest estimate, but arm 0, whose bonus is large because it was tried little (N = 2); arm 2, which gets the same bonus, falls behind because its estimate is 0.
(b) 8·0.7 − (2·0.3 + 4·0.5 + 2·0.7) = 5.6 − 4.0 = 1.6.
(c) Greedy arm 1: 0.9 + 0.1/3 = 14/15 ≈ 0.933; arm 0 and arm 2: 0.1/3 = 1/30 ≈ 0.033.
Classic Question · Three Episodes of Q-Learning
Question 16: Three Episodes of Q-Learning
Chain s0 → s1 → s2 → s3; s3 is the goal and the transition from s2 to s3 has reward r = 10, all other transitions r = 0. In each episode the agent starts at s0 and always goes “right”. α = 0.5, γ = 0.8, all Q start at 0, and max Q = 0 at the goal. With Q(s, a) ← Q + α[r + γ·max Q(s′, ·) − Q], what are Q(s0, right), Q(s1, right), Q(s2, right) after three episodes?
Show answer
| episode | Q(s0, right) | Q(s1, right) | Q(s2, right) |
|---|---|---|---|
| 1 | 0 + 0.5·(0 + 0.8·0 − 0) = 0 | 0 | 0 + 0.5·(10 − 0) = 5 |
| 2 | 0 + 0.5·(0.8·0 − 0) = 0 | 0 + 0.5·(0.8·5 − 0) = 2 | 5 + 0.5·(10 − 5) = 7.5 |
| 3 | 0 + 0.5·(0.8·2 − 0) = 0.8 | 2 + 0.5·(0.8·7.5 − 2) = 4 | 7.5 + 0.5·(10 − 7.5) = 8.75 |
Within an episode the updates are made in the order s0, s1, s2; when s1 is updated, Q(s2) still has that episode's old value. The reward propagates back one step per episode: it reaches s0 only in the 3rd episode. With endless repetition the values converge to 10, 8, 6.4 (powers of γ).
Classic Question · Replicator Dynamics
Question 17: Replicator Dynamics
Hawk–Dove: resource V = 6, fight cost C = 10, baseline fitness 3. Payoffs: two hawks fight and each gets (V − C)/2; a hawk against a dove gets V, a dove against a hawk gets 0; two doves share and each gets V/2. (a) Write the payoff table and fH, fD when the hawk share is x. (b) What is the rest point (ESS) x*? (c) Starting from x = 0.5, compute the hawk share one generation later with the discrete replicator x′ = x·fH/f̄.
Show answer
(a) HH = (V − C)/2 = −2, HD = V = 6, DH = 0, DD = V/2 = 3. fH = 3 − 2x + 6(1 − x) = 9 − 8x; fD = 3 + 3(1 − x) = 6 − 3x.
(b) 9 − 8x = 6 − 3x → x* = 3/5 = 0.6 = V/C. Check: at x = 0.6, fH = fD = 4.2.
(c) x = 0.5: fH = 5, fD = 4.5, f̄ = 0.5·5 + 0.5·4.5 = 4.75. x′ = 0.5·5/4.75 = 10/19 ≈ 0.526. Hawks increase because they earn more than the average, and move toward x* = 0.6 (the next generation ≈ 0.546).
Classic Question · The Repeated Prisoner's Dilemma
Question 18: The Repeated Prisoner's Dilemma
Payoffs: temptation 6, mutual cooperation 4, mutual defection 1, sucker 0. (a) What is the smallest δ for which cooperation is an equilibrium under the grim trigger strategy? (b) In a 7-round match, how many points do Tit-for-Tat and Suspicious TFT score? (c) In a 7-round match, how many points do Grim and Suspicious TFT score?
Show answer
(a) 4/(1 − δ) ≥ 6 + δ·1/(1 − δ) ⇔ 4 ≥ 6(1 − δ) + δ ⇔ 5δ ≥ 2 ⇔ δ ≥ (6 − 4)/(6 − 1) = 2/5.
(b) TFT opens with C, Suspicious TFT opens with D; after that each copies the opponent's last move, and C/D swap places:
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | Σ | |
|---|---|---|---|---|---|---|---|---|
| TFT | C 0 | D 6 | C 0 | D 6 | C 0 | D 6 | C 0 | 18 |
| STFT | D 6 | C 0 | D 6 | C 0 | D 6 | C 0 | D 6 | 24 |
(c) Round 1: Grim C, STFT D → 0–6. Round 2: Grim D (does not forgive), STFT copies C → 6–0. Rounds 3–7: both D → 1–1 each round. Total 11–11; mutual cooperation (7·4 = 28) is never established.
Classic Question · ESS Check
Question 19: ESS Check
Hawk–Dove: resource V = 6, fight cost C = 10. Payoffs (row player): u(H, H) = (V − C)/2 = −2, u(H, D) = 6, u(D, H) = 0, u(D, D) = 3.
Strategy x is an ESS against mutant y ⇔ u(x, x) > u(y, x) or [u(x, x) = u(y, x) and u(x, y) > u(y, y)].
(a) Is pure Dove an ESS? (b) Is pure Hawk an ESS? (c) Does the mixed x* (hawk probability V/C) satisfy the ESS condition against mutants H and D? (d) What if V = 10, C = 6?
Show answer
(a) u(D, D) = 3 < u(H, D) = 6: a hawk mutant invades → not an ESS.
(b) u(H, H) = −2 < u(D, H) = 0: a dove mutant invades → not an ESS.
(c) x* = 6/10 = 0.6. At the mixed equilibrium every mutant gets the same payoff against x*: u(H, x*) = u(D, x*) = u(x*, x*) = 1.2. Second condition: u(x*, H) = 0.6·(−2) = −1.2 > u(H, H) = −2 ✓; u(x*, D) = 0.6·6 + 0.4·3 = 4.8 > u(D, D) = 3 ✓ → ESS.
(d) V > C: u(H, H) = 2 > u(D, H) = 0 → pure Hawk is an ESS; if fighting is cheaper than the resource, everyone becomes a hawk.
Classic Question · A Noisy Match
Question 20: A Noisy Match
Prisoner's Dilemma payoffs (C: cooperate, D: defect): CC (3, 3), CD (0, 5), DC (5, 0), DD (1, 1). In an 8-round match player A mistakenly plays D instead of C in round 3; there is no other error.
(a) If two TFTs play, what are the move sequences and scores? (b) If two Win-Stay, Lose-Shift players play (WSLS: if you got 3 or 5, repeat the move; if you got 0 or 1, switch; in the erroneous round the move actually played counts; C in round 1)? (c) Compare with the error-free match (24 – 24).
Show answer
(a) A: C C D C D C D C, B: C C C D C D C D. After round 3 the two TFTs echo each other: 21 – 21.
(b) Round 3 DC: A got 5, stays with D; B got 0, switches to D. Round 4 DD: both got 1 and return to C. After that always CC. A: C C D D C C C C, B: C C C D C C C C → 24 – 19.
(c) Totals: error-free 48, TFT 42, WSLS 43. In TFT a single error starts a retaliation cycle that lasts to the end of the match; WSLS returns to cooperation within two rounds. That is why in noisy settings WSLS and generous TFT can do better than TFT.
Multiple Choice · Thompson and EXP3
Question 21
Which statement is true about Thompson sampling and EXP3?
B is correct: Thompson sampling keeps a prior distribution over each arm's mean, updates it with observations, in each round draws a sample from this posterior, and plays the arm with the largest sample; an uncertain arm is explored automatically because it sometimes gives a high sample. EXP3 is the version of Hedge that sees only the reward of the pulled arm; even when rewards are chosen by a malicious adversary, its regret grows more slowly than T, so the regret per round goes to zero. A is wrong: in a bandit only the pulled arm's reward is seen. C is wrong: Thompson samples randomly. D is wrong: EXP3 is designed precisely for the adversarial case.
Classic Question · Correlated Equilibrium
Question 22: Chicken and the Traffic Light
Chicken (row, column): (Swerve, Swerve) = (6, 6), (Swerve, Straight) = (2, 7), (Straight, Swerve) = (7, 2), (Straight, Straight) = (0, 0). (a) A traffic light recommends (Swerve, Straight) or (Straight, Swerve) with probability ½ each: is it a correlated equilibrium (CE), and what is the expected payoff? (b) Is the distribution that recommends (Swerve, Swerve), (Swerve, Straight), (Straight, Swerve) with probability 1/3 each a CE, and what is the payoff? (c) Test the CCE condition in both. Why do CE and CCE not differ in a 2×2 game?
Show answer
(a) Recommendation “Swerve”: the other is surely Straight; obey 2, deviate 0 ✓. “Straight”: the other is surely Swerve; obey 7, deviate 6 ✓. CE, payoff 4.5.
(b) “Swerve”: the other is Swerve / Straight half and half; obey (6 + 2)/2 = 4, deviate (7 + 0)/2 = 3.5 ✓. “Straight”: obey 7, deviate 6 ✓. CE, payoff (6 + 2 + 7)/3 = 5 (mixed Nash: 14/3).
(c) Light: always Swerve 4, always Straight 3.5 ≤ 4.5 ✓. Triple: always Swerve and always Straight 14/3 ≤ 5 ✓: both are CCE.
“Always Straight” makes a difference only when Swerve is recommended; so the CCE condition is the same as the CE condition “Straight when told Swerve”. Telling them apart needs at least three actions.
Multiple Choice · CE versus CCE
Question 23
Rock–Paper–Scissors (winner +1, loser −1, tie 0). A recommendation device draws (Rock, Rock), (Paper, Paper), (Scissors, Scissors) with probability 1/3 each and tells each player only their own action. Which is true?
The correct answer is B. Obeying always gives 0. CCE: a player who commits to a fixed action faces an opponent playing Rock, Paper, Scissors with probability 1/3 each; the expected payoff is 1/3·(+1 + 0 − 1) = 0, so no gain: a CCE. CE: a player who sees “Rock” knows the other was also told Rock; switching to Paper gives +1 > 0: not a CE. A misses the deviation that depends on the recommendation. C is impossible: every CE is a CCE. D is wrong: always Rock gives 0 too.