- Learn
- Computer Science & IT
- Computer Science
- Artificial Intelligence
- Adversarial Search
Games and Adversarial Search
IntermediateLesson 4 of 10 in Artificial Intelligence Course
What you will learn
- Formulate a turn-taking game precisely, classify it by the properties that decide which search method fits, and represent its possible plays as a game tree.
- Formulate a game and classify its typeWrite down the parts that define a game, and tell deterministic, stochastic, perfect-information, imperfect-information, zero-sum and general-sum games apart.
- Build and read a game treeDraw the tree of moves for a game, use plies, depth and branching factor correctly, and estimate how large a full game tree becomes.
- Formulate a game and classify its type
- Compute minimax values to find the best move against an opponent who plays perfectly, implement the algorithm, and extend the idea to games with several players and their own utilities.
- Compute minimax values and the minimax decisionBack up values from the leaves of a game tree to find each position's minimax value and the move that MAX should play.
- Implement minimax searchTurn the minimax definition into a recursive depth-first algorithm, state its time and space cost, and avoid the usual implementation errors.
- Search games with several players and their own utilitiesUse utility vectors to choose moves when more than two players take part or when the players' interests are not strictly opposed.
- Compute minimax values and the minimax decision
- Skip parts of the game tree that cannot change the decision, trace alpha-beta by hand, and order moves so that pruning saves as much work as possible.
- Trace alpha-beta pruningKeep track of alpha and beta while searching, recognize when a subtree can be pruned, and explain why the result matches minimax.
- Order moves to make pruning effectiveExplain how move order decides how much alpha-beta saves, and use ordering heuristics, iterative deepening and transposition tables.
- Trace alpha-beta pruning
- Stop the search before the end of the game, estimate the value of unfinished positions with an evaluation function, and handle the errors that a depth limit introduces.
- Design an evaluation functionBuild an evaluation function from features of a position, compute it for concrete positions, and check that it meets the requirements of a good evaluation.
- Cut off search safelyReplace the terminal test by a cutoff test, search deeper within a time limit, and recognize and reduce the horizon effect and other errors of a depth limit.
- Design an evaluation function
- Add chance nodes to game trees, compute expectiminimax and expectimax values, and design evaluation functions that keep their meaning when outcomes are averaged.
- Search trees with chance nodesModel dice rolls and random opponents with chance nodes, compute expectiminimax values step by step, and know when pruning is still possible.
- Scale evaluations and choose between minimax and expectimaxExplain why expected values need correctly scaled evaluations, test which transformations preserve decisions, and choose an opponent model that fits the situation.
- Search trees with chance nodes
- Estimate move values from simulated games, balance exploring new moves against exploiting good ones with UCB1, and judge when Monte Carlo tree search or alpha-beta suits a game better.
- Run the four phases of Monte Carlo tree searchGrow a search tree by selection, expansion, simulation and back-propagation, update visit and win counts, and choose the final move.
- Balance exploration and exploitation with UCB1Apply the UCB1 formula during selection, compute it for concrete counts, and see how the exploration constant changes the choice.
- Compare MCTS with alpha-beta and choose a methodWeigh the strengths and weaknesses of alpha-beta and Monte Carlo tree search, link them to landmark game programs, and choose a method from a game's properties.
- Run the four phases of Monte Carlo tree search
Adversarial Search study guide
1Turn a game into a search problem
A program needs a precise description of a game before it can choose a move. The description must say who acts, what can happen next, and how a finished game is scored. The game tree then lays out the possible continuations. Reading that tree means keeping track of turns, depth, and repeated positions, while remembering that an opponent controls some of the branches.
1.1 States, rules, and players
A game search starts with a state: enough information to determine what can happen next. In tic-tac-toe, that means the board and the player to move. The board alone is incomplete because the next mark changes with the turn.
Define the six parts
A game model supplies:
- An initial state, .
- A function, , naming the player who acts in state .
- The legal moves, .
- A transition model, , giving the state after action .
- A terminal test, , detecting the end of play.
- A utility function, , giving player a numeric payoff in a terminal state.
For tic-tac-toe, start with an empty 3-by-3 board and X to move. An action chooses an empty square. The transition places the current player's mark and changes the turn. Play ends as soon as someone makes a row, column, or diagonal of three, or the full board gives a draw. From X's view, score a win as +1, a draw as 0, and a loss as −1. The terminal test must run before another mark is placed: play does not continue after a win.
Classify the game along separate axes
| Property | Meaning | Example |
|---|---|---|
| Deterministic | A state and move determine the next state without a random event. | Chess |
| Stochastic | Random events help determine what happens. | Backgammon |
| Perfect information | Every player can observe the full game state. | Go |
| Imperfect information | Some relevant state is hidden. | Poker |
| Two-player or multiplayer | The number of players determines how many interests must be modeled. | Chess or a three-player game |
| Zero-sum or general-sum | Interests are strictly opposed, or players can gain together. | Win/loss play or shared rewards |
These axes are independent. Dice make backgammon stochastic even though its board is visible. Hidden cards concern information, not whether an action itself is random. In a hidden-information game, a player reasons about the possible states consistent with its observations, called a belief state.
Keep the payoff viewpoint fixed
In a two-player zero-sum game, one player's gain is the other's loss. Constant-sum scores behave the same way: win 1, loss 0, and draw ½ each always total 1. One number is enough to express the opposition. Call the player who wants it larger MAX, and the player who wants it smaller MIN. These are roles; MAX need not always be White or X.
An ordinary search can choose every action along a path. A game-playing agent must respond to moves it does not control. Its solution is a strategy, specifying what to do in each situation it might face. A plan that works only if the opponent makes a helpful reply is not enough.
Key Takeaways
- Record the player to move as part of the state.
- Define legal actions, transitions, termination, and utilities before searching.
- Chance and hidden information are separate properties.
- MAX and MIN compare one utility measured from MAX's viewpoint.
- A strategy must handle the opponent's possible replies.
1.2 Read the size and shape of a game tree
A game tree starts at the current state. Each outgoing edge represents one legal move, and its child is the resulting state. Label each nonterminal node with the player who acts there. In a two-player alternating game, MAX and MIN levels alternate.
Count individual turns
One ply is one move by one player. In chess, a full move usually includes one turn by White and one by Black, so it spans two plies. A depth-4 search from White's turn reaches positions after White, Black, White, and Black have acted. Count edges from the root, whose depth is zero.
Let be the branching factor and the maximum depth. A uniform tree has nodes at depth and leaves. Its total number of nodes is:
For , the deepest levels dominate, giving exponential growth. With four moves per position, depth 3 has 64 leaves; depth 4 has 256. One extra ply multiplies the leaf count by four, not by one.
Separate games from positions
Tic-tac-toe has at most orders for filling the board. Many orders would continue after an earlier win and are not complete legal games. Stopping immediately at wins gives 255,168 complete games: 131,184 X wins, 77,904 O wins, and 46,080 draws. Across legal play there are only 5,478 distinct board positions, including the empty board.
The gap comes partly from transpositions: different move orders reaching the same state. X can play one corner, O the center, and X the opposite corner, or X can play those two corners in the reverse order. Both paths end at the same board and turn. A tree keeps both paths; a game graph can store their shared state once. Reusing work requires identifying complete states, not just visually similar boards.
See why full search breaks down
Chess is often modeled with about 35 legal moves per position and a 100-ply game, or 50 moves by each player. This gives the rough scale:
Real branches end at different depths and have different numbers of moves, but this estimate already explains why enumerating an entire chess game tree is impractical. On an empty 19-by-19 Go board, the first stone alone has 361 possible points.
The search tree is what an algorithm actually generates. Plain minimax generates the full game tree below the state for a finite game it searches to completion. Pruning, depth limits, and selective simulation generate less. A cutoff leaf can therefore be an unfinished position, even though a full game-tree leaf is terminal.
Picture a strategy inside the tree
A strategy subtree for MAX keeps one selected edge at each MAX node and every legal edge at each MIN node. MAX chooses its own action but must retain a response to any opponent move. A single root-to-leaf path describes only one possible play. It cannot show that the chosen plan survives the other replies.
Key Takeaways
- A ply is one player's move; root depth is zero.
- A uniform tree has about b to the power m leaves.
- Transpositions repeat states reached through different move orders.
- A strategy keeps a response to every opponent reply.
2Choose moves against an opponent
The best-looking finish may be unreachable because an opponent can choose a different reply. Minimax works backward from outcomes to find what each player can enforce. Its recursive form turns that reasoning into a program. When players have different interests, the same backward process must carry a payoff for each player and use the preference of whoever acts next.
2.1 Back up minimax values
Minimax chooses the best result MAX can secure against optimal opposition. Every leaf utility is measured for MAX. A large number favors MAX even when the node being evaluated belongs to MIN.
Work from the leaves toward the root
At a terminal node, return its utility. At a MAX node, return the largest child value. At a MIN node, return the smallest. Continue until the root receives a value:
A child value already summarizes optimal continuation from that child. This is why a parent compares the returned values instead of reopening every leaf below them. The recursion works through any number of alternating levels.
Trace a two-ply decision
MAX has three moves, each leading to a MIN node:
| MAX's move | MIN's available terminal utilities | Backed-up value |
|---|---|---|
| A | 4, 9, 6 | 4 |
| B | 2, 15, 13 | 2 |
| C | 5, 8, 10 | 5 |
First take the minimum within each row. MIN can make A worth 4, B worth 2, and C worth 5. Then MAX takes the maximum of those three results:
The minimax value is 5. The minimax decision is the move to C. One is a number describing the position; the other is an action the program can play.
The largest leaf, 15, lies under B, but MAX does not control the reply that reaches it. MIN would select 2. Averaging B's leaves gives 10, which also looks attractive, but averaging models a random choice with suitable probabilities. Optimal opposition calls for a minimum.
Read the principal variation
The principal variation is the line followed when the players choose optimal moves. Here MAX plays C and MIN chooses its leaf worth 5. In a deeper tree, follow the chosen maximum or minimum at each level. The terminal utility on that line matches the root value. If several moves tie, more than one optimal line can exist.
Understand the guarantee
For a finite deterministic two-player zero-sum game with perfect information, following the minimax strategy guarantees at least the root value. An optimal opponent holds MAX to that value. An opponent's mistake can allow a better result, so 5 is a floor, not a prediction that every game must end at exactly 5.
A program can exploit weakness while preserving that floor. If two moves both have minimax value 5, it can prefer the one with more opportunities for the opponent to make a mistake. Choosing a move with minimax value 2 because it contains a tempting 15 abandons the guarantee of 5. The difference is whether the move preserves the best worst-case value.
Key Takeaways
- Back up a minimum at MIN nodes and a maximum at MAX nodes.
- The minimax value is a number; the decision is a move.
- The largest leaf alone cannot identify the best move.
- A principal variation follows optimal choices at each level.
- Full minimax guarantees its value against optimal opposition.
- A weaker opponent can allow a result above that guarantee.
2.2 Write a recursive minimax program
The minimax definition is already a recursive program. A value function takes a state and returns a number. A search function compares the possible first moves and returns the action to play.
Separate move choice from value calculation
The following pseudocode assumes MAX acts at the root and turns alternate:
MINIMAX-SEARCH(s):
if Is-Terminal(s): return no action
bestMove = no action
bestValue = -infinity
for a in Actions(s):
value = MIN-VALUE(Result(s, a))
if value > bestValue:
bestValue = value
bestMove = a
return bestMove
MAX-VALUE(s):
if Is-Terminal(s): return Utility(s, MAX)
v = -infinity
for a in Actions(s):
v = max(v, MIN-VALUE(Result(s, a)))
return v
MIN-VALUE(s):
if Is-Terminal(s): return Utility(s, MAX)
v = +infinity
for a in Actions(s):
v = min(v, MAX-VALUE(Result(s, a)))
return v
Initialize MAX with negative infinity so that any child improves it; initialize MIN with positive infinity. Test termination before generating successors. A full tic-tac-toe board with no winning line is a draw, not a nonterminal position whose best move must be selected from an empty list.
Trace what recursion discovers
Consider this tic-tac-toe board, with X to move and a period for an empty square:
X O X
. O .
. . .
O threatens the middle column. If X plays anywhere except bottom-middle, O can win next turn. Those moves have value −1 for X. Playing bottom-middle blocks the immediate win and allows a draw with best play, giving value 0. The root returns bottom-middle. The algorithm needs no separate instruction naming this threat: the terminal outcomes determine the values.
Budget time and memory
Depth-first minimax examines nodes for branching factor and maximum depth . Storing all generated siblings at each active level needs memory. Generating successors one at a time reduces the active search storage to , apart from the state representation. Exponential time, not the recursion stack, is usually the main obstacle.
Preserve the scoring convention
In MAX/MIN code, every call returns MAX's utility. Do not flip its sign simply because MIN acts next. Negamax uses a different convention: each value is from the current player's viewpoint, so a child value is negated before the parent maximizes it:
For a game ending in fewer than 100 plies, timing can be included by scoring a MAX win at depth as , a loss as , and a draw as 0. Faster wins then score higher and delayed losses are less negative. The strict depth limit keeps every win positive and every loss negative.
For example, wins at plies 3 and 7 score 97 and 93, so the faster win is preferred. Losses at those depths score −97 and −93, making the later loss preferable while both remain worse than a draw.
Key Takeaways
- Test terminal states before expanding moves.
- Return actions from the search function and numbers from the value functions.
- Depth-first minimax takes exponential time.
- All MAX/MIN utilities keep MAX's viewpoint.
- Negamax changes viewpoint and negates each returned child value.
2.3 Carry a payoff for each player
A single MAX utility works when two players' interests are strictly opposed. With several players or overlapping interests, keep a utility vector. For players A, B, and C, the vector (1, 2, 6) gives their payoffs in that order.
Select by the active player's entry
At a node where C acts, compare the third entries of the child vectors. Return the entire vector of C's preferred child. At a B node, compare the second entries of those returned vectors; at an A node, compare the first.
Do not independently maximize each entry. If the available outcomes are (1, 2, 6) and (4, 2, 3), C chooses (1, 2, 6). The combination (4, 2, 6) is not an available outcome and cannot be backed up.
Work backward through three players
A moves first, then B, then C. Under A's left move, B chooses between two C nodes:
- The first has leaves (1, 2, 6) and (4, 2, 3). C chooses (1, 2, 6).
- The second has leaves (6, 1, 2) and (7, 4, 1). C chooses (6, 1, 2).
B compares second entries 2 and 1, so the left branch returns (1, 2, 6).
Under A's right move:
- C chooses (5, 4, 5) over (2, 5, 4), because 5 exceeds 4 in the third entry.
- C chooses (5, 2, 4) over (7, 7, 1), because 4 exceeds 1 in the third entry.
B compares second entries 4 and 2, so the right branch returns (5, 4, 5). Finally, A compares first entries 1 and 5 and chooses right. The root receives the whole vector (5, 4, 5).
State how ties are resolved
If C can choose (2, 3, 4) or (6, 1, 4), both give C 4. A's eventual payoff could be 2 or 6. A prediction needs a tie-breaking rule or a model of C's choice. Another player's indifference need not be harmless to the root player.
| Model | What each other player prefers |
|---|---|
| Utility-vector backup | A larger value in its own vector entry |
| Several MIN adversaries | A smaller value of MAX's single utility |
| Paranoid search | Every other player is modeled as part of a coalition against the root player |
If two pursuers both want MAX caught, a round has one MAX layer and a MIN layer for each pursuer. With two pursuers, one round is three plies. This model is different from three independent players pursuing their own rewards.
Allow interests to overlap
In a general-sum game, both players may prefer (100, 100) to lower joint payoffs. Players can also temporarily benefit from attacking a common leader. Such alliance-like behavior can follow from their own preferences and change when the position changes.
Ordinary alpha-beta cutoffs rely on opposed interests and do not transfer directly to utility vectors. The paranoid model restores a two-player opposition, permitting alpha-beta search, but can predict coordinated hostility that the other players would not actually choose.
Key Takeaways
- A utility vector keeps one payoff per player.
- The active player chooses by its own entry and returns the whole vector.
- Ties require a rule when tied choices affect other players differently.
- Multiple MIN layers fit adversaries sharing the goal of lowering MAX's utility.
- The paranoid model assumes a coalition against the root player.
3Skip branches that cannot change the choice
Minimax can spend most of its time confirming choices that a player would never allow. Alpha-beta carries bounds along the current path so it can stop those searches early. The move order determines how soon useful bounds appear. Iterative deepening and stored results help a program find that order and reuse earlier work without mistaking an unfinished estimate for an exact value.
3.1 Follow alpha and beta through the tree
Alpha-beta pruning gives the same root value as minimax on the same tree with the same leaf values. It saves work by proving that some branches cannot improve the choice. Tied optimal moves may be returned in a different order.
Pass a search window down the path
Two bounds describe choices available above the current node:
- is MAX's best available value along the path: MAX can already obtain at least this much.
- is MIN's best available value along the path: MIN can already hold MAX to at most this much.
Start the root with negative and positive infinity. Each recursive child receives the current bounds. They are local arguments, not global numbers shared across unrelated sibling searches.
At a MAX node, keep the largest child value seen. Stop when it reaches or exceeds beta: MIN above already has an alternative no larger than beta. Otherwise raise alpha when MAX finds an improvement. At a MIN node, keep the smallest child value seen. Stop when it reaches or falls below alpha: MAX above already has an alternative at least as good. Otherwise lower beta.
MAX-VALUE(s, alpha, beta):
if Is-Terminal(s): return Utility(s, MAX)
v = -infinity
for a in Actions(s):
v = max(v, MIN-VALUE(Result(s, a), alpha, beta))
if v >= beta: return v
alpha = max(alpha, v)
return v
MIN-VALUE(s, alpha, beta):
if Is-Terminal(s): return Utility(s, MAX)
v = +infinity
for a in Actions(s):
v = min(v, MAX-VALUE(Result(s, a), alpha, beta))
if v <= alpha: return v
beta = min(beta, v)
return v
The root compares actions and retains alpha between them:
ALPHA-BETA-SEARCH(s):
if Is-Terminal(s): return no action
alpha = -infinity
beta = +infinity
bestMove = no action
for a in Actions(s):
v = MIN-VALUE(Result(s, a), alpha, beta)
if v > alpha:
alpha = v
bestMove = a
return bestMove
Trace a MIN cutoff
Search the MIN branches A = (4, 9, 6), B = (2, 15, 13), and C = (5, 8, 10), left to right. A must examine all three leaves and returns 4. The root now has alpha 4. B's first leaf is 2. Its final minimum can only stay at 2 or fall, so B cannot beat A. Skip B's two remaining leaves. C examines all three leaves and returns 5. The root chooses C after examining seven of nine leaves.
Trace a MAX cutoff
Suppose a MIN parent already has a child worth 3, setting beta to 3. Its next MAX child finds a leaf worth 6. That child's value is at least 6, so MIN will prefer its existing 3. Skip the remaining children of that MAX node. The cutoff reasoning uses MIN's alternative, even though the current node is MAX.
A pruned MIN node can return an upper bound; a pruned MAX node can return a lower bound. Their exact values remain unknown. The completed root value is exact for the searched tree. Equality also permits a cutoff because a branch that can only tie cannot improve the current best value.
Key Takeaways
- Alpha is MAX's available lower bound; beta is MIN's available upper bound.
- MAX raises alpha and cuts off at beta.
- MIN lowers beta and cuts off at alpha.
- Pass bounds down as local arguments.
- A cutoff result can be a bound instead of an exact node value.
- Pruning preserves the root's minimax value, including cutoffs on equality.
3.2 Find useful bounds early and reuse searches
Alpha-beta saves the most work when strong moves are searched early. The values do not change with move order; the point at which the search can prove a cutoff does.
Compare two orders
For the three MIN branches A = (4, 9, 6), B = (2, 15, 13), and C = (5, 8, 10), starting with A examines seven leaves. Start with C instead. Its three leaves establish alpha 5. A then finds 4 immediately and cuts off; B finds 2 immediately and cuts off. Only five leaves are evaluated, and the answer remains C with value 5.
For a uniform tree with perfect ordering, the leaf count is:
This is about instead of minimax's . The effective branching factor falls to about , allowing roughly twice the depth for a comparable budget. With , perfect-ordering depth 8 evaluates 3,001,249 leaves; ordinary depth-4 minimax has 1,500,625 leaves. The comparison concerns scale, not identical runtime.
| Ordering | Approximate leaf cost |
|---|---|
| Perfect | |
| Random, for moderate branching factors | Roughly |
| Worst case |
In the worst order alpha-beta can examine every minimax leaf. Its extra bound checks add overhead even when they save no leaves.
Use inexpensive ordering clues
The exact best move is unknown before search. Programs use quick estimates. In chess they may try captures, then threats, then quiet moves. A killer move caused a cutoff elsewhere at the same search depth and is tried early in another position. These clues affect efficiency; they do not justify discarding the other legal moves.
Iterative deepening searches to depth 1, then 2, then 3, and so on. A strong move from the previous iteration becomes an early candidate in the next. The deepest completed result is also ready if time expires.
The repeated work has different costs depending on pruning. For unpruned uniform search with branching factor 35, all shallower iterations add about to the final search. For perfect-ordering alpha-beta, depths 1 through 7 together evaluate 1,677,159 leaves, about 56% of the depth-8 count. Better ordering can still make the overall process worthwhile.
Cache positions with their meaning
A transposition table stores results indexed by complete game state. If another move order reaches that state, the program can reuse a suitable entry. Store the searched depth and whether the result is exact, a lower bound, or an upper bound. A shallow entry does not replace a deeper search's required information. A bound may tighten a window or justify a cutoff, but must not be treated as an exact value.
Key Takeaways
- Move order changes alpha-beta's work, not its root value.
- Perfect ordering reduces the exponential cost to about b to the power m/2.
- Iterative deepening supplies a completed move and improves ordering.
- A transposition entry needs depth and an exact/lower/upper flag.
4Evaluate unfinished positions under a time limit
Large games force a search to stop while play is unfinished. An evaluation function gives those frontier positions usable scores, and the search backs them up through the players' choices. The stopping rule matters as much as the score: a position in the middle of a capture can look misleadingly strong. Selective extensions and exact lookups help a program spend its limited time where the result is most sensitive.
4.1 Build and interpret an evaluation function
An evaluation function estimates how favorable an unfinished position is for MAX. It makes depth-limited search possible: the frontier receives estimated values that can be backed up by minimax or alpha-beta.
Make scores useful to search
A good evaluator is fast, agrees with the ordering of real terminal outcomes, and correlates with success from nonterminal positions. Terminal states themselves should receive their exact utility. A MAX win must score above every nonterminal estimate, so that collecting pieces cannot become more attractive than winning.
One view of evaluation is to group positions by shared features. If such a group produces 72% wins, 8% draws, and 20% losses, with utilities 1, ½, and 0, its average utility is:
This interpretation depends on how positions and continuations were sampled. It is an estimate of outcome quality, not a proof of a forced win.
Add weighted features
A common design is a weighted sum:
Each feature measures a property of the position; each weight says how much it contributes. Differences between the sides keep the viewpoint clear. A positive material difference means MAX has more material.
Traditional chess values are pawn 1, knight 3, bishop 3, rook 5, and queen 9. The king is not assigned a capturable material value. Suppose MAX is White. White has a queen, two rooks, a bishop, and six pawns:
Black has two rooks, two knights, a bishop, and seven pawns:
The material feature is therefore . If White has 30 legal moves and Black 24, the mobility difference is 6. With material weight 1 and mobility weight 0.1:
That 2.6 is a feature score, not a 260% win probability. The weights define its scale.
Account for features that interact
A simple linear sum gives each feature a fixed contribution independent of the others. Real game value can depend on combinations: a pair of bishops can be worth more than the sum of their separate effects, and a pawn's importance can change in an endgame. Combined features, stage-dependent weights, or nonlinear evaluators can capture these effects. Weights may be selected by judgment or fitted to outcomes from recorded games.
More features also cost time. An elaborate evaluator that prevents an extra useful search ply can hurt the decision even if its individual estimates improve.
Match the scale to the backup rule
In deterministic minimax, consistent strictly increasing transformations preserve the ordering through maxima and minima. Squaring only positive scores, for example, keeps their order. Squaring arbitrary signed scores does not. At chance nodes, actual distances between utilities matter because the values are averaged. A score designed only to rank positions needs calibration before it can represent expected utility.
Key Takeaways
- Evaluate nonterminal frontier states and use exact utility at terminal states.
- A true win must outrank every nonterminal estimate.
- A weighted evaluator adds measured features multiplied by their weights.
- Feature scores need not be probabilities.
- Interactions can require combined features or changing weights.
- Chance nodes need utility values on a meaningful scale.
4.2 Choose where to stop and where to search deeper
Heuristic minimax stops before the game ends. Its answer is optimal for the searched tree with its assigned frontier scores. It can still choose a losing move in the real game when those estimates miss what happens next.
Distinguish terminal states from cutoffs
A terminal state has a known outcome. A depth cutoff leaves play unfinished and needs an estimate. Test them in that order:
H-MINIMAX(s, d):
if Is-Terminal(s): return Utility(s, MAX)
if Is-Cutoff(s, d): return Eval(s)
if To-Move(s) == MAX:
return max over a of H-MINIMAX(Result(s, a), d + 1)
return min over a of H-MINIMAX(Result(s, a), d + 1)
The cutoff commonly tests whether the depth has reached a limit. Alpha-beta can prune this same heuristic tree. Its pruning remains exact relative to those frontier values; it does not turn estimates into true game outcomes.
Under a time limit, iterative deepening retains the action from the deepest completed iteration. A partially searched deeper root can favor the first branch simply because its competitors have not been evaluated yet.
Finish a tactical exchange
A quiescent position is quiet enough that a short forced continuation is unlikely to swing its evaluation sharply. Quiescence search continues beyond the normal depth in unsettled positions, usually following captures until the exchange settles.
Suppose White's queen captures a pawn exactly at the depth limit. The material score improves by 1. But Black can recapture that queen on the next ply. The net material change is:
Stopping after the first capture reports +1; a short capture extension reveals −8. The issue is evaluating halfway through an exchange, not a failure of minimax's backup rule.
Recognize delayed losses
The horizon effect occurs when a program delays an unavoidable loss until it falls beyond the search depth. A trapped bishop may still be lost after several pawn checks. If search sees the checks but stops before the bishop capture, it may throw away pawns to hide that future loss.
A singular extension searches deeper along a move that stands clearly above its alternatives. Programs also extend forcing checks or recaptures. Extensions spend extra depth on selected lines; they require a budget so that a search can still finish.
| Technique | Basis for doing less or more work |
|---|---|
| Alpha-beta | A bound proves a branch cannot improve the decision. |
| Forward pruning | A heuristic predicts some moves are unimportant. |
| Quiescence or tactical extension | An unsettled or forcing line needs more depth. |
Forward pruning, such as retaining only the best few moves, can discard the winning move. Its savings do not carry alpha-beta's guarantee.
Replace search with exact stored knowledge
An opening book supplies studied early moves. Endgame tablebases work backward from known outcomes through retrograde analysis. Seven-piece chess tablebases include the two kings and supply exact results for their covered endgames. A lookup's rules and state information must match the game being played.
Key Takeaways
- Use exact utility for terminal states and evaluation for unfinished cutoffs.
- Play the best action from the deepest completed iteration.
- Quiescence search finishes tactical exchanges before evaluation.
- The horizon effect can reward wasteful delays of an unavoidable loss.
- Forward pruning can lose the best move; alpha-beta proves its cutoffs safe.
- Books and tablebases supply stored knowledge instead of fresh search.
5Back up random outcomes with probabilities
Some branches are chosen by a player; others are chosen by chance. The backup rule must follow that difference at every node. Weighted averages let a program handle dice or a model of unpredictable behavior, but they also make the numerical scale of the evaluator important. The right choice depends on both the game's rules and how accurately the program models its opponent.
5.1 Calculate values through chance nodes
A chance node represents a random event. Its branches list possible outcomes and their probabilities, which add up to 1. No player chooses its most favorable branch.
Use the rule belonging to each node
| Node | Backed-up value |
|---|---|
| Terminal | Its utility |
| MAX | The maximum child value |
| MIN | The minimum child value |
| Chance | The probability-weighted average of child values |
For outcomes , a chance node has value:
Expectiminimax combines all four rules. Expectimax uses MAX and chance when there is no minimizing player. A probability model of a random opponent can supply chance branches even in a game whose move rules are deterministic.
Work backward through both chance and opposition
MAX chooses L or R. Each move leads to a random event, followed by a MIN choice.
After L, a fair coin gives two MIN nodes. Their leaves are (3, 7) and (8, 4). MIN returns 3 and 4. The chance node then gives:
After R, probabilities 0.25 and 0.75 lead to MIN nodes with leaves (10, 1) and (6, 5). Their values are 1 and 5, so:
MAX chooses R because 4 exceeds 3.5. Averaging the raw terminal leaves first would let chance replace MIN's decision. Process each node after its children have been resolved.
Assign the correct probabilities
Two fair dice have 36 equally likely ordered outcomes. Backgammon groups reversed orders, such as 3–5 and 5–3, into the same roll. That gives 21 distinct rolls: six doubles with probability 1/36 each and 15 non-doubles with probability 1/18 each. The check is:
Giving all 21 rolls probability 1/21 would overcount doubles and undercount non-doubles. Equal-looking branches need not have equal probabilities.
If each decision stage has legal moves and a chance event with outcomes, searching such stages costs about . The depth convention must include how often chance occurs. With roughly 20 legal moves and 21 rolls, backgammon's added chance branches quickly limit exhaustive lookahead.
For example, two stages each containing 21 chance outcomes and 20 actions produce paths. Count the chance events separately from player plies when estimating that cost.
Prune only when unseen outcomes are bounded
A partial average is not a minimax bound. If utilities lie between 0 and 10 and the first of two equally likely outcomes is worth 2, the whole node lies between 1 and 6. In particular:
If MAX already has another move worth 7, this chance node cannot beat it and the remaining outcome can be skipped. Without a suitable bound on unseen values, an extreme outcome could still change the average enough to reverse the choice.
Key Takeaways
- Chance nodes return weighted averages, not maxima or minima.
- Resolve children before combining them at their parent.
- Check that chance probabilities sum to 1.
- Backgammon doubles and non-doubles have different probabilities.
- Chance branching multiplies search cost.
- Bounding unexamined outcomes can justify a chance-node cutoff.
5.2 Choose a utility scale and an opponent model
Minimax asks what result an opponent can enforce. Expectimax asks what average utility follows from a probability model. Their decisions can differ even on the same tree because they represent different behavior.
Compare optimal and random opposition
For MIN branches A = (4, 9, 6), B = (2, 15, 13), and C = (5, 8, 10), minimax chooses C with a guarantee of 5. If the opponent instead chooses each reply uniformly, the expected values are about 6.33, 10, and 7.67. Expectimax chooses B.
This is sensible under the uniform model, but a skilled adversary can answer B with 2. Expectimax is not assuming that the opponent minimizes an average. It is using the specified probabilities. With a correct model it maximizes expected utility; the worst-case protection is weaker than minimax's. It can tie minimax's average performance when both recommend the same move.
A tree can mix models. A hostile agent's node takes a minimum, while a random agent's node takes a weighted average. Use the rule for the agent acting at that node, not one rule for every non-MAX layer.
See why order alone is insufficient
Suppose move A gives 2 with probability 0.6 and 3 with probability 0.4. Move B gives 1 with probability 0.6 and 4 with probability 0.4:
A has the larger expectation. Now cube every terminal value. Their ranking stays the same, but the expectations become:
B now wins the comparison. Averaging transformed outcomes is different from transforming their average. Cubing amplifies the benefit of B's high outcome enough to change the decision.
Preserve decisions with the right transformations
| Backup rule | Transformation preserving decisions |
|---|---|
| Minimax | Any strictly increasing transformation applied consistently |
| Expected utility | A positive affine transformation, with |
A positive affine transformation multiplies every expectation by the same positive number and adds the same constant. Applying gives A a value of 29 and B a value of 27, keeping A preferred.
If A and B were MIN nodes, their values would be 2 and 1 before cubing and 8 and 1 afterward. Their ordering would be unchanged. Maxima and minima select a child value; averages combine the sizes of several values.
An evaluator used with chance should therefore estimate the intended expected utility on a consistent scale, such as win probability or a positive affine transformation of it. A nonlinear ranking score may be suitable for deterministic minimax while making the wrong risk trade-offs under chance.
Key Takeaways
- Choose minimax for optimal opposition and expectation for a probability model.
- A correct chance model optimizes average utility, with weaker worst-case protection.
- Strictly increasing transforms preserve minimax decisions.
- Positive affine transforms preserve expected-utility decisions.
- A nonlinear transform can change an average-based choice.
6Use simulations to guide a growing search tree
When the move space is huge, a program can estimate outcomes by simulating continuations and direct later work toward useful branches. Monte Carlo tree search stores those results in a growing tree. Its selection rule balances moves that already look strong with moves whose estimates remain uncertain. Choosing a final action requires judging the accumulated evidence, while recognizing the tactical replies that simulation may miss.
6.1 Run a Monte Carlo tree search iteration
Monte Carlo tree search, or MCTS, estimates moves from simulated games while building a tree that guides future simulations. A simulated continuation to the end is a playout or rollout. Its policy can select random legal moves or use inexpensive knowledge to produce more sensible play.
Store evidence at each node
Keep a visit count and a cumulative reward . In a two-player win/loss game, use wins for the player who made the move leading into node . A draw commonly adds half a win. Then estimates that mover's success rate.
The root has no incoming move. Its visits still count every iteration; root wins can be tracked from the root player's viewpoint if needed. Child scores, which drive selection, must consistently use the incoming mover's viewpoint.
Repeat the four phases
- Selection: From the root, follow a selection policy through existing children until reaching a terminal node or a node with an untried move.
- Expansion: If nonterminal, add one child for an untried legal move.
- Simulation: Run a playout from that child to a terminal outcome.
- Back-propagation: Update visits and rewards for nodes on the selected path.
If selection reaches a terminal node, skip expansion and simulation. Its known outcome can be backed up immediately. A playout's temporary continuation need not be stored as new tree nodes: ordinary expansion adds one child per iteration.
Trace a reward update
White acts at the root. Selection and expansion follow:
- n1, reached by White's move;
- n2, reached by Black's move;
- n3, reached by White's move.
The playout ends in a Black win. Increase visits by one at the root and at n1, n2, and n3. Increase wins at n2 only among these three child nodes, because n2's incoming mover was Black. White's child nodes receive no win increment. Under a root-player convention, the root's own win total also stays unchanged.
A draw would add 0.5 to each child's reward. Counting Black's win as a success at every node would make White select moves that help Black.
Let the tree become uneven
Repeated iterations concentrate simulations on promising or uncertain branches. Strong-looking moves tend to acquire larger subtrees, while poor moves receive less work. The search does not impose one fixed depth on every line. Once a legal move is available, it can stop at a time limit and use its accumulated statistics.
The final action is usually the root child with the most visits. A move with two wins from two simulations has a perfect observed rate but little evidence. A heavily visited move reflects much more of the search's scrutiny.
Pure Monte Carlo search gives root moves independent playouts without growing a decision tree. It can repeatedly miss one strong opponent reply because later play stays governed by the rollout policy. MCTS learns where to branch deeper as it accumulates evidence, though a rare tactical refutation may still take time to discover.
Key Takeaways
- MCTS stores visit counts and cumulative rewards in a growing tree.
- Use selection, expansion, simulation, and back-propagation.
- A selected terminal node needs only its known outcome backed up.
- Child rewards count success for the player who moved into that child.
- The final action is usually the most visited root child.
6.2 Balance known rewards with uncertain moves
MCTS must decide where another simulation is most useful. Exploitation revisits moves that already look strong. Exploration investigates moves with less evidence that might prove better. Always chasing the largest observed win rate can lock the search onto an early lucky result.
Calculate a UCB1 score
The upper confidence bound score for child is:
The first term is the observed win rate. The second is an exploration bonus. It grows as the parent accumulates visits and shrinks as the child receives more visits. The logarithm is natural. During selection, choose the child with the largest combined score.
Treat an unvisited child as having infinite priority instead of dividing by zero. Every legal move at a node is tried before selection repeatedly favors visited alternatives. MCTS using this selection rule is called UCT, upper confidence bounds applied to trees.
Compare three children
A parent has 50 visits. Its children have win/visit counts 21/30, 7/12, and 3/8. With and :
| Child | Win rate | Exploration bonus | Total |
|---|---|---|---|
| First | 0.700 | 0.511 | 1.211 |
| Second | 0.583 | 0.807 | 1.391 |
| Third | 0.375 | 0.989 | 1.364 |
The second child is selected. Its current win rate is below the first child's, but its uncertainty bonus is larger. The third is even less visited, yet its lower win rate leaves its total slightly below the second's.
With , the same totals become about 0.881, 0.869, and 0.725. Selection now favors the first child. No outcomes changed; the program changed how strongly it rewards uncertainty.
Interpret the exploration constant
A larger positive puts more weight on exploration. Setting it to zero removes the bonus and chooses solely by observed mean. The bandit formulation with rewards between 0 and 1 motivates in this form of the equation; practical game programs tune the constant. Changing the reward scale also changes the balance with the exploration term.
At each parent, its children record wins for the player choosing there. This makes maximizing UCB1 sensible at both players' turns. Storing only White wins throughout the tree while maximizing every score would make Black favor White's success.
Separate search priority from move quality
UCB1 chooses where to spend the next simulation. A large uncertainty bonus can make a weakly sampled move worth investigating. At the end of search, choose the most visited root child, not the highest current UCB1 score. Under the finite-game conditions of UCT and continued exploration, unlimited search converges toward minimax behavior; a finite budget still leaves sampling uncertainty.
Key Takeaways
- UCB1 adds observed mean reward to an exploration bonus.
- Larger C encourages more exploration.
- Unvisited children receive priority without division by zero.
- Selection maximizes the active player's expected success.
- UCB1 selects simulations; final move choice usually uses visits.
- Finite simulation counts leave uncertainty even when the rule is correct.
6.3 Choose search methods for different games
A search method fits the size of the move space, the quality of available evaluation, and the kind of uncertainty in the game. The same time budget can produce very different decisions depending on what the method investigates.
Compare tactical coverage and simulation
| Game feature | Useful approach | Reason |
|---|---|---|
| Moderate branching, strong evaluator, sharp tactics | Alpha-beta with move ordering | It checks the relevant replies within its depth. |
| Huge branching or weak hand-written evaluation | MCTS | Simulations guide effort toward promising parts of the tree. |
| Chance with a manageable shallow tree | Expectiminimax or expectimax | Explicit probabilities can be backed up directly. |
| Many chance outcomes | MCTS with chance sampling | Sampling estimates expectations without listing every outcome per iteration. |
| Independent player preferences | Utility vectors | One scalar cannot represent every player's interest. |
Alpha-beta can find a single tactical refutation within its search depth. MCTS may initially prefer a move that wins most random playouts but loses to one precise reply. As its tree grows, it can discover that reply, but a short simulation budget may miss it. A high rollout win rate is therefore not a worst-case guarantee.
Connect methods to landmark programs
In 1997 IBM's Deep Blue used alpha-beta search, specialized hardware, and chess evaluation to defeat world champion Garry Kasparov 3½–2½ over six games. Its success showed how much strong search and game-specific evaluation could achieve together.
Go made that combination harder. An empty 19-by-19 board offers 361 stone placements, and judging a position by simple features is difficult. MCTS became a strong approach because it could estimate outcomes through play and grow a selective tree without requiring a hand-written static evaluator.
AlphaGo combined MCTS with neural networks suggesting moves and assessing positions. Its 2016 Nature description preceded its 4–1 victory over Lee Sedol in March 2016. AlphaZero later used neural-network evaluation in place of random playouts and achieved superhuman play in chess, shogi, and Go. These programs show that a search framework can use different sources of position values.
Distinguish strong play from solving a game
A program can beat a champion without proving the value of the initial position. In 2007 Jonathan Schaeffer's team used search and large endgame databases to establish that checkers is a draw with perfect play. Solving the game establishes an outcome against every possible opposing strategy, not just the opponents tested in matches.
Match the method to the model
In a stochastic game, sample random outcomes according to their actual probabilities during tree traversal and rollouts. An event with probability 0.8 should occur about four times as often as one with probability 0.2 over many samples. This estimates the same weighted expectation that explicit chance backup computes.
Every approach still depends on correct rules and state transitions. Depth-limited alpha-beta depends on its evaluator; MCTS depends on its simulation or evaluation policy and finite sample budget. Modeling a hostile opponent as random can be costly whichever search machinery is used to compute that model's answer.
Key Takeaways
- Alpha-beta is strong for tactics within a manageable search depth.
- MCTS suits large branching factors and difficult evaluation design.
- A rollout average can miss a rare decisive refutation.
- Chance sampling must follow the event probabilities.
- Champion-level play and a proof that a game is solved are different achievements.
- Learned evaluation can be combined with either search framework.
Adversarial Search examples
1Model the rules and draw possible play
11 steps
- 1IntroductionStart with a game the program can inspect
A game-playing program needs rules it can apply to a state. It must know whose turn it is, which actions are legal, what each action changes, and when to score an outcome.
Once those parts are explicit, a game tree can show the continuations. Some branches belong to the program; others belong to its opponent. That difference changes what counts as a usable plan.
- 2ExampleSpecify tic-tac-toe
Use a 3-by-3 board and the player to move as the state. Begin with an empty board and X to move.
An action picks an empty square. The transition puts the current mark there and changes turns. A line of three ends play immediately; a full board without a line gives a draw. Score terminal outcomes for X as +1, 0, or −1. These rules supply the six parts a search program needs.
- 3Key InsightKeep randomness separate from hidden state
A visible board can still have random events: backgammon adds dice rolls. A game can instead hide part of its state, as poker hides cards.
These are separate classification axes. Chance determines how outcomes are generated; information determines what a player can observe. The number of players and whether their payoffs are strictly opposed are additional choices in the model.
- 4ChallengeClassify a new game
A two-player token game has a fully visible state. Before each turn, a spinner determines which moves are allowed. Each terminal outcome gives one player 1 and the other 0. How do chance, information, and payoff structure classify it?
---reveal---
It is stochastic, has perfect information, and is constant-sum with strictly opposed interests. The spinner adds chance without hiding the state; the fixed total payoff allows a MAX/MIN model.
- 5ExplanationCount plies from the root
Put the current position at depth zero. Each edge adds one ply: one action by one player. In alternating play, depth 1 follows MAX's action and depth 2 follows MIN's reply.
A full chess move usually includes both turns. A search reaching two full moves by each player therefore has depth 4, not depth 2. Labeling the turns prevents depth and backup rules from drifting apart.
- 6ExampleGrow a small uniform tree
Imagine three legal actions at every nonterminal node. Depth 1 has 3 positions, depth 2 has 9, and depth 3 has 27 leaves.
Every new ply multiplies the number of paths. The real game can have early endings and changing move counts, but the uniform estimate makes the cost of depth visible before an algorithm is chosen.
- 7ConnectionRecognize repeated states
X can play one corner, O the center, and X the opposite corner. Reversing the order of X's two corners reaches the same board with the same player next.
The tree contains two paths to one state. This is a transposition. A graph or a cache can share that state's result, provided the key includes the turn and every other part of the rules that changes future play.
- 8ChallengeFind the tree size and the depth
An alternating game offers two actions at each node. Search covers two turns by MAX and two by MIN. What depth and leaf count does the uniform tree have?
---reveal---
It has depth 4 plies and leaves. Each player acts twice, so there are four individual actions along each path. Counting depth 2 would include only one turn per player.
- 9Key InsightA strategy keeps the replies
A single path describes one complete play, but an opponent may choose another branch. A MAX strategy therefore keeps one selected action at each MAX node and every legal reply at each MIN node.
MAX's later action can depend on the reply it actually sees. The strategy may contain many paths even though it fixes MAX's behavior in every reachable situation.
- 10ChallengeRepair a fragile plan
A program stores a planned first move and one expected opponent reply, followed by a winning continuation. Its game model lists three possible opponent replies. What must change in the plan before it describes a complete strategy?
---reveal---
The program needs an action rule after each possible reply and after later opponent choices. Knowing one winning line is insufficient because the opponent controls which of those reply branches occurs.
- 11RecapFrom rules to a usable search space
A complete state and rule model determine the possible continuations. Classify chance, visibility, players, and payoffs before assigning node rules.
Read depth in individual plies, estimate branching growth, and recognize transpositions as repeated states. A strategy chooses the player's actions while retaining responses to every opponent reply; the tree makes those responsibilities visible.
2Back up outcomes to find a move
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionReason backward from outcomes
- 2ExampleStart with the opponent's replies
- 3ExampleMake the root decision
- 4ChallengeBack up a fresh tree
- 5ExplanationGive recursive calls one job
- 6TipHandle the end before the next move
- 7ChallengeConvert a negamax return
- 8ExplanationReturn the whole utility vector
- 9ExampleResolve the deepest player first
- 10ChallengeUse another player's tie rule
- 11ConnectionChoose the right opponent model
- 12ChallengeCombine vector choices at the root
- 13RecapUse the preference of whoever acts
3Trace pruning and improve the search order
12 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionProve that a branch cannot help
- 2ExplanationKeep the bounds attached to the path
- 3ExampleEstablish an alternative for MAX
- 4ExampleStop a MIN branch
- 5ChallengeFind the opposite cutoff
- 6Key InsightA bound is sufficient for rejection
- 7ExampleSearch the strongest root branch first
- 8ExplanationGet ordering clues cheaply
- 9ChallengeInterpret a cached bound
- 10ConnectionRead the best-case cost
- 11ChallengeCombine ordering with a cutoff count
- 12RecapPrune from evidence and store its meaning
4Evaluate a frontier without hiding the next reply
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionGive unfinished positions a score
- 2ExplanationMeasure features from one viewpoint
- 3ExampleCount chess material
- 4ExampleAdd a mobility contribution
- 5ChallengeCompute another feature score
- 6ExplanationCheck termination before the depth limit
- 7ExampleNotice a misleading capture
- 8ExampleFinish the exchange
- 9ChallengeEvaluate a new exchange
- 10Key InsightSeparate an extension from unsafe pruning
- 11ChallengeUse a completed search result
- 12ConnectionUse stored game knowledge
- 13RecapSpend depth where the score can swing
5Compute expectations and test the model
12 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionLet each kind of node act differently
- 2ExplanationUse a weighted average at chance
- 3ExampleResolve MIN below the coin flip
- 4ExampleCompare the second root action
- 5ChallengeCombine a new pair of node types
- 6TipDo not assume distinct rolls are equally likely
- 7ExplanationChoose how to model the opponent
- 8ExampleChange the scale without changing ranks
- 9ChallengeTest a transformation
- 10Key InsightUse bounds before skipping chance outcomes
- 11ChallengeFind the effect of a wrong opponent model
- 12RecapMatch the average to the decision
6Grow a simulation tree and choose where to search
16 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionBuild evidence while building the tree
- 2ExplanationRecord visits and incoming-mover rewards
- 3ExplanationFollow four phases
- 4ExampleFollow the player attached to each child
- 5ChallengeUpdate a different result
- 6ExplanationAdd a bonus for uncertainty
- 7ExampleCompute the first candidate
- 8ExampleCompare the remaining candidates
- 9ChallengeChange the balance
- 10Key InsightEnd search with accumulated support
- 11ConnectionWatch for a rare refutation
- 12ExampleSee what hybrid programs changed
- 13ChallengeChoose for a new game
- 14TipSample chance with its actual weights
- 15ChallengeSeparate trial priority from move choice
- 16RecapKeep evidence, exploration, and play distinct
Adversarial Search practice questions
Set 1: Apply backups and check search assumptions10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Model games and trace basic decisions10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Combine search values with limited evidence10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Trace deeper consequences and compare models10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Diagnose search failures and transfer the methods10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Alpha
Alpha-beta pruning
Argmax
B
Back-propagation
Belief state
Beta
Branching factor
C
Chance node
Chance sampling
Cutoff bound
D
Depth-first search
Deterministic game
E
Endgame tablebase
Evaluation function
Expansion
Expected utility
Expectimax
Expectiminimax
Exploitation
Exploration
F
Feature
Feature interaction
Forward pruning
G
Game state
Game tree
General-sum game
H
Heuristic minimax
Horizon effect
I
Imperfect information
Iterative deepening
K
Killer-move heuristic
M
Minimax
Minimax decision
Minimax value
Mobility
Monte Carlo tree search
Move ordering
N
Negamax
Neural evaluation
O
Opening book
Opponent model
P
Paranoid assumption
Perfect information
Playout
Playout policy
Ply
Positive affine transformation
Principal variation
Q
Quiescence search
R
Recursive base case
Retrograde analysis
S
Search tree
Selection
Singular extension
Solved game
Stochastic game
Strategy
Strictly increasing transformation
T
Tactical refutation
Terminal test
Tie-breaking rule
Transition model
Transposition
Transposition table
U
UCB1
UCT
Utility
Utility vector
V
Visit count
W
Weight
Z
Zero-sum game
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.