Chapter 3

Adversarial search

Use minimax for a deterministic, alternating, two-player, zero-sum game with perfect information. All node values refer to MAX's utility. MIN therefore selects the smallest child value; utilities do not change sign simply because the turn changes.

3.1 Minimax backup

Past papers · DA 2024–2026 (3 papers): 1 question, 1 mark

At a nonterminal depth cutoff, substitute a heuristic evaluation for the unavailable terminal utility. The resulting value is for the truncated tree and need not equal the true game value. The horizon effect hides important consequences just beyond the cutoff; extending unstable tactical positions is a common remedy. A strictly increasing transformation of all terminal utilities preserves deterministic minimax choices, including ties.

3.2 Alpha–beta pruning

Past papers · DA 2024–2026 (3 papers): 2 questions, 3 marks

Alpha–beta returns the same root minimax value while omitting subtrees that cannot improve an ancestor's decision. Visit children in the specified order. Pass inherited bounds down the current path; an unrelated branch does not contribute an arbitrary bound.

Original alpha–beta trace: the final leaf is skipped after the right MIN node sees 3.Original alpha–beta trace: the final leaf is skipped after the right MIN node sees 3.

3.3 Game-tree effort and move ordering

For favourable pruning, try strong moves first at MAX and weak moves first at MIN. In practice evaluation functions and previous iterations supply this ordering; “perfect ordering” is an analytical best case.

3.4 Chance nodes

A random outcome is neither a MAX choice nor a MIN choice. Use expectimax when chance replaces the opponent, or expectiminimax when MAX, MIN and chance nodes all occur. Use the probabilities specified by the model; do not assume equal probabilities without evidence.

Ordinary alpha–beta cutoffs do not directly apply to a partly evaluated chance node: unexamined outcomes can change its average. Known utility bounds can support separate expectation bounds.

Last-minute recall

  • Minimax values always use one player's utility scale.
  • MAX takes a maximum; MIN takes a minimum; chance takes an expectation.
  • Back up values before selecting the root action.
  • Initialise alpha to negative infinity and beta to positive infinity.
  • Alpha increases; beta decreases within a call.
  • Prune when alpha is at least beta, including equality for value preservation.
  • Good ordering saves work; it does not alter the minimax value.
  • A depth-cutoff evaluation is an estimate, not a terminal payoff.
  • Best-case alpha–beta leaf counts require perfect ordering.

Revise offline: the whole Artificial Intelligence handbook as one PDF

37 pages · 1.8 MBFree to read online. Sign in to download the PDF.We save the handbook, version and request time in My downloads. Privacy policy

All chapters · Corrections