How It Works
Minimax with Alpha-Beta Pruning is a decision-making algorithm used in two-player games:
- The algorithm builds a game tree from the current state, alternating between maximizer (X) and minimizer (O) levels
- At terminal states or maximum depth, it evaluates the board using a heuristic function
- Values propagate upward: maximizers take the highest child value, minimizers take the lowest
- Alpha-Beta pruning optimizes the search by skipping branches that won't affect the final decision
- Alpha represents the minimum score the maximizer is guaranteed, beta is the maximum score the minimizer is guaranteed
Visualization Guide
- Blue nodes represent maximizer (X) levels, orange nodes represent minimizer (O) levels
- Red nodes show branches that were pruned by alpha-beta
- The green line shows the optimal path found by the algorithm
- Toggle alpha-beta pruning to see how it reduces the number of nodes evaluated
- Adjust the search depth to see more comprehensive game tree analysis