Skip to content
ml-recall

Topic notes

Multi-Agent Systems

Systems of interacting agents — agent types and emergence, multi-agent reinforcement learning and self-play, game theory (dominance, Nash and correlated equilibria) and adversarial search.

4-min read AI-checked

Practise 45 questions Take a test

Key ideas

Agents. An agent is an entity that lives in an environment, perceives it and acts on it1. Reactive agents have simple request–response behaviour; deliberative (cognitive) agents reason and plan, e.g. with the belief–desire–intention (BDI) architecture1.

Emergence. In flocking each bird sees only its neighbours and follows three local rules — alignment (match their heading), cohesion (move towards their centre), separation (avoid crowding) — yet a realistic flock appears with no central controller1. Typical uses: game NPCs, crowds in films, epidemic and traffic simulation1.

Kinds of interaction. Cooperative: agents maximise a common reward. Competitive (zero-sum): each maximises its own reward, which is the opponent's loss. Mixed: both at once.

Multi-agent RL.

Self-play trains an agent against earlier copies of its own policy, so the opponent stays at about its level2. Keeping few, slowly changing opponents is stable but risks overfitting to them; a larger, more varied pool gives a more general policy2. Progress is measured with Elo, not reward: points won equal points lost, and an upset moves more points than an expected result2.

Game theory (simultaneous moves, payoff tables).

Adversarial search (two players, alternate moves): minimax, made faster by alpha–beta, which returns the same value and move; good move ordering prunes more, and the best case evaluates about bd/2b^{d/2} leaves5. Progressive (iterative) deepening returns the minimax value for each depth and supplies a usually good order for the next one5 — usually, because shallow values only estimate deeper ones.

Formulas

EA=11+10(RB−RA)/400,RA′=RA+K (SA−EA)E_A=\frac{1}{1+10^{(R_B-R_A)/400}},\qquad R_A'=R_A+K\,(S_A-E_A)

Expected payoff of mixed strategies xx (row) and yy (column) with payoff matrix AA: x⊤A y=∑i,jxi yj aijx^\top A\,y=\sum_{i,j}x_i\,y_j\,a_{ij}8. Entropy-regularised best response (multiplicative weights / Hedge): maximising ⟨G,x⟩−1η∑ixilog⁡xi\langle G,x\rangle-\tfrac1\eta\sum_i x_i\log x_i over the simplex gives xi∝exp⁡(η Gi)x_i\propto\exp(\eta\,G_i), a softmax of the cumulative utilities GiG_i (set the gradient of the Lagrangian to zero).

Worked example

Payoffs (Row, Column): (U, L) = (3, 0), (U, R) = (0, 2), (D, L) = (0, 1), (D, R) = (1, 0). Each cell has a player who wants to deviate, so there is no pure equilibrium. Row plays U with probability pp that makes Column indifferent: 1−p=2p⇒p=1/31-p=2p\Rightarrow p=1/3. Column plays L with qq that makes Row indifferent: 3q=1−q⇒q=1/43q=1-q\Rightarrow q=1/4. Equilibrium payoffs: Row 3/43/4, Column 2/32/3.

Common pitfalls

References

  1. AI for Beginners — Lesson: Multi-Agent Systems — introduction (agent types); Flocking; Deliberative Agents
  2. Hugging Face Deep Reinforcement Learning Course — Unit 7, Self-Play: What is Self-Play?; Self-Play in MLAgents; The ELO Score to evaluate our agent
  3. Wikipedia: Nash equilibrium — Definitions; Existence; Rationality; Computing Nash equilibria
  4. Wikipedia: Correlated equilibrium — Formal definition; An example; Learning correlated equilibria
  5. Wikipedia: Alpha–beta pruning — Core idea; Improvements over naive minimax
  6. Rashid et al., QMIX — Monotonic Value Function Factorisation for Deep Multi-Agent Reinforcement Learning (ICML 2018) — Sec. 2 Related Work; Sec. 3.3 Independent Q-Learning; Sec. 3.4 Value Decomposition Networks; Sec. 4 QMIX
  7. Wikipedia: Strategic dominance — Dominance and Nash equilibria; Iterated elimination of strictly dominated strategies
  8. Wikipedia: Minimax theorem — Introduction; Bilinear functions and zero-sum games