PYTHON
Free Section Starter Challenge
25 min
7. Minimax Decision Trees for Two-Player Games
Overview: Determine optimal moves in zero-sum games by maximizing player score while minimizing opponent gains.
Concept & Syntax Guide
In a two-player zero-sum game (e.g. Chess or Tic-Tac-Toe), MAX aims to maximize utility while MIN aims to minimize MAXs score. Minimax recursively evaluates tree depth, selecting $\max$ at MAX nodes and $\min$ at MIN nodes.
Hands-On Practice Exercise
Evaluate Minimax Decision Tree
Compute the minimax value at the root of a depth-2 game tree where terminal leaf values are [3, 5, 2, 7].
Target Output:
Optimal Minimax Value for MAX: 7
Need a hint? Click here to reveal
Hint: Check syntax carefully and make sure your code contains:
Optimal Minimax Value for MAX: 7
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10