AGAI-L06a: From Deep MARL to Reasoning

In short

How do you learn a huge two-player zero-sum game like Go, where the only reward is win or lose at the end? Plain Monte Carlo tree search judges positions by random rollouts, a weak signal that assumes a random opponent. AlphaGo guides the search with two networks: a policy network that says which moves to explore and a value network that scores new positions. AlphaGo Zero learns both from self-play alone, and AlphaZero runs the same method on several games. Self-play needs symmetric roles; otherwise policies are trained against populations of other policies. PSRO does this with a meta-game, a normal-form game whose actions are the policies in the current populations; AlphaStar’s league works like PSRO. The lecture ends by linking RL to LLMs and agentic AI.

Feeds mock question 28 (the PSRO meta-game). MCTS and self-play themselves are explained in Lecture 5.

Why plain MCTS struggles in Go

The setting is a two-player zero-sum board game with a sparse reward, a huge branching factor and a long horizon. MCTS (selection, expansion, backpropagation, with the average outcome through ; see Lecture 5) needs a way to judge a position it has just reached. In Go the usual ways fail:

  • Heuristics that score positions require manual annotation by experts.
  • Random rollouts give a weak signal about which lines are promising: a random game from a position says little about who wins under good play.
  • Random rollouts assume random opponents. A move that wins against random replies can lose against a strong player.

The fix: learn the two things MCTS needs, which moves are worth exploring (a policy) and how good a position is (a value).

AlphaGo: search guided by two networks

AlphaGo is “guided MCTS” with two networks:

  • Policy network : which moves are promising? It guides node selection, so the search explores few of the many legal moves.
  • Value network : what are the chances of winning from this position? It evaluates newly expanded nodes, so the search gets a learned estimate of a new position instead of relying on random rollouts alone.

How they are trained:

AlphaGo's training

  1. Policy, copy the experts: supervised, reproduce expert moves with a cross-entropy loss, .
  2. Policy, improve by self-play with REINFORCE: , with the outcome of the self-play game (win or loss).
  3. Value, predict the winner: squared error on the self-play outcomes, .

Stage 2 is REINFORCE with a sparse reward: the only reward comes at the end, so every move of a won game becomes more likely and every move of a lost game less likely. The opponent is the policy itself, so it improves against ever-stronger play, which answers the “random opponent” problem.

AlphaGo Zero and AlphaZero: no human games

AlphaGo Zero learns entirely through self-play, with no human game examples: it starts from a random policy instead of one trained on expert data, so stage 1 disappears. Self-play is possible because the same policy can be used from the perspective of both agents (the board shown from the side of the player to move). Search and network improve each other (detail from outside the course material): MCTS guided by the network picks better moves than the network alone, the network is trained towards the search’s choices and the game outcomes, and the next search starts from a stronger guide. See AlphaGo Zero.

AlphaZero applies the same learning and search method to different games (chess, shogi, Go). The only game-specific part is the engine for each game’s legal moves, transitions and end conditions, which MCTS needs to simulate.

When self-play is not enough: populations of policies

AlphaZero is self-play in a zero-sum game with a homogeneous population: one policy plays both sides. That assumes the two agents have symmetric roles, which is not always the case. When players have different roles, actions or observations, one policy cannot play both sides.

Population-based training tests one policy against a population of other policies, and the policies in a population can represent agents with different roles, actions and observations:

  1. Initialise one population for each agent (for example with uniform policies).
  2. Evaluate the current policies against the policies in the other populations.
  3. Modify existing policies, by random changes or by copying the parameters of the best performers. Repeat.

This echoes the population dynamics of week 1: what does well against the current populations spreads, as in replicator dynamics.

A second reason for populations (from outside the course material): plain self-play only ever faces its latest self. In games with non-transitive strategies, like rock-paper-scissors, it can cycle and forget how to beat old strategies; a population keeps them.

PSRO: populations plus a meta-game

Policy Space Response Oracles (PSRO) also keeps populations of policies, and adds a meta-game over them.

Meta-game

A simplified normal-form game that represents a more complex interaction between complex policies.

  • Actions in the meta-game = policies in the current populations
  • Payoffs between actions = average returns between those policies

Each cell holds every agent’s average return when those two policies play each other, estimated by simulating many episodes of the real game. The real game can be huge; the meta-game has one row or column per stored policy.

PSRO repeats:

  1. Start with random policies.
  2. Construct the meta-game from the current populations (1 policy = 1 action).
  3. Use a meta-solver to rank the policies, for example a Nash equilibrium of the meta-game. This gives a probability distribution over each agent’s population (the meta-solution).
  4. Sample policies for the other agents from the meta-solution.
  5. Train a new policy for agent against them with single-agent RL in the real game, and add it to the population.

The new policy is an approximate best response to the meta-solution; the “oracle” is the RL algorithm that produces it. Each generation the meta-game gains a row and a column, whose payoffs must be simulated before the next solve.

PSRO on rock-paper-scissors (example from outside the course material)

Both players start with {Rock}. The meta-solution is “always Rock”, so the best response is Paper: {Rock, Paper}. Now the solution is “always Paper”, best response Scissors: {Rock, Paper, Scissors}. The meta-game is now the full game, its Nash equilibrium mixes all three at 1/3, and nothing beats that mixture. Self-play against its latest self would cycle Rock, Paper, Scissors forever; PSRO stops because each new policy must beat a mixture of the earlier ones.

AlphaStar: a PSRO-like league

AlphaStar (StarCraft II) is the example of self-play with heterogeneous populations: population-based training in a league that works like PSRO. (Outside the course material: StarCraft players choose different races and see only part of the map, so roles are asymmetric, which is why one self-play policy is not enough.)

How the methods compare

MethodStarts fromTrains againstRoles
AlphaGoexpert movesitself (REINFORCE)symmetric
AlphaGo Zerorandom policyitselfsymmetric
AlphaZerorandom policyitself, several gamessymmetric
Population-based traininge.g. uniform policiesother populationsany
PSROrandom policiesmeta-solution mixtureany
AlphaStarnot covereda PSRO-like leagueasymmetric

From RL to agentic AI

The course then moves from RL to agentic AI, and the lecture links the two in three ways.

  • RL versus LLMs. AlphaGo has two systems: System 1, the policy network (intuition, immediate action), and System 2, the long-horizon search. Current LLMs are argued to be System 1 only: they generate the next token without search.
  • RL plus LLMs. Text generation as RL: the state is the prompt plus the tokens so far, the action is the next token, the reward is high if the completed response is good, the policy is the learned . Improving the policy with a policy gradient method (GRPO, close to PPO) means better reasoning.
  • Same challenges. Agents acting for different users, even when each is well aligned to its own user, have objectives that are neither identical nor completely opposed: mixed-motive settings, with room for mutual gain and for conflict (social dilemmas), the same problems as in MARL and Assignment 1.

What to be able to answer

  • Why plain MCTS is weak in Go, and which AlphaGo network fixes what (selection against evaluation of new nodes).
  • How each network is trained, in words; what AlphaGo Zero drops and what AlphaZero generalises.
  • What self-play assumes, and why populations are used instead.
  • The PSRO meta-game (actions, payoffs), its steps, and what the meta-solver and the oracle do (mock Q28).

Exam questions

Flashcards