Evaluating a Game Tree with the Minimax Algorithm
Problem Setup
Scenario:MAX must choose between two moves, A and B. After MAX chooses, MIN selects the outcome that gives MAX the lower score.
Given:A game tree with terminal scores at the leaf nodes. The root is a MAX node, A and B are MIN nodes, and C, D, E, and F are MAX nodes. We evaluate the tree from the leaves upward.
Task:Use Minimax to evaluate each branch, pass the resulting values back to the root, and determine which move MAX should choose.
Need a quick refresher? Review Minimax theory
Game Tree
Each leaf shows a possible utility score for MAX. The tree represents the choices available to both players, with higher scores favoring MAX and lower scores favoring MIN.
Step-by-Step Resolution
Follow each node's calculation as values are passed back up the tree. The highlighted node shows which result is being evaluated.
Evaluating Node: C
Position:Level 2 (Bottom-most evaluating layer)|Layer Type:MAX
Child Node Evaluations
Evaluating Node: D
Position:Level 2 (Bottom-most evaluating layer)|Layer Type:MAX
Child Node Evaluations
Evaluating Node: A
Position:Level 1 (Intermediate Layer)|Layer Type:MIN
Child Node Evaluations
Evaluating Node: E
Position:Level 2 (Bottom-most evaluating layer)|Layer Type:MAX
Child Node Evaluations
Evaluating Node: F
Position:Level 2 (Bottom-most evaluating layer)|Layer Type:MAX
Child Node Evaluations
Evaluating Node: B
Position:Level 1 (Intermediate Layer)|Layer Type:MIN
Child Node Evaluations
Evaluating Node: Root
Position:Level 0 (Root Node)|Layer Type:MAX
Child Node Evaluations
Final Answer
The root compares the final values from branches A and B:
Optimal move:B
Optimal utility value:7
Choosing B gives MAX a guaranteed utility of 7 under optimal play, even when MIN selects the least favorable outcome. Choosing A would guarantee only 6.
Exam Takeaway
- Work backward from terminal utilities: Evaluate the deepest internal nodes first, then use their results to calculate the next level. Do not choose a root move simply because one of its leaves has the highest score.
- Apply the rule of the current node, not its parent: MAX nodes select the highest child value, while MIN nodes select the lowest. A common exam mistake is applying the same operation at every level.
- The root value assumes optimal play by both players: The final minimax value reflects the outcome MAX can guarantee against an opponent who also chooses optimally. Standard Minimax evaluates every relevant leaf; it does not prune branches.