0% found this document useful (0 votes)
82 views11 pages

Minmax Algorithm

The MinMax algorithm is a recursive algorithm used in decision making and game theory to find the optimal move for a player assuming the opponent also plays optimally. It searches through the game tree using recursion to evaluate each possible move. The algorithm assigns MAX to one player who aims to maximize their score, and MIN to the other player who aims to minimize the opponent's score. It recursively evaluates each branch until reaching terminal nodes, then backtracks to determine the best move. The MinMax algorithm with alpha-beta pruning adds alpha and beta values to cutoff search branches where alpha is greater than or equal to beta.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views11 pages

Minmax Algorithm

The MinMax algorithm is a recursive algorithm used in decision making and game theory to find the optimal move for a player assuming the opponent also plays optimally. It searches through the game tree using recursion to evaluate each possible move. The algorithm assigns MAX to one player who aims to maximize their score, and MIN to the other player who aims to minimize the opponent's score. It recursively evaluates each branch until reaching terminal nodes, then backtracks to determine the best move. The MinMax algorithm with alpha-beta pruning adds alpha and beta values to cutoff search branches where alpha is greater than or equal to beta.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

MINMAX ALGORITHM

MIN-MAX ALGORITHM
• Mini-max algorithm is a recursive or backtracking algorithm which is used in decision-
making and game theory. It provides an optimal move for the player assuming that
opponent is also playing optimally.
• Mini-Max algorithm uses recursion to search through the game-tree.
• Min-Max algorithm is mostly used for game playing in AI. Such as Chess, Checkers, tic-tac-
toe, go, and various tow-players game. This Algorithm computes the minimax decision for
the current state.
• In this algorithm two players play the game, one is called MAX and other is called MIN.
• Both the players fight it as the opponent player gets the minimum benefit while they get
the maximum benefit.
• Both Players of the game are opponent of each other, where MAX will select the maximized
value and MIN will select the minimized value.
• The minimax algorithm performs a depth-first search algorithm for the exploration of the
complete game tree.
• The minimax algorithm proceeds all the way down to the terminal node of the tree, then
backtrack the tree as the recursion.
EXAMPLE
7 Max

5 7 Min

5 9 7 8 Max

5 3 6 9 2 7 4 8

Terminal
Example
Exampl
MIN-MAX ALGORITHM
with alpha beta cut off.
• α>=β   (then we apply the cut off condition)
Min-Max algorithm with alpha beta cut off

• Set value of α -∞
• Set the value of β ∞
• α>=β   (then we apply the cut off condition)
Cut off condition  α>=β
Example
α = 7
Max
β =∞

α = 7
α = -∞ β =∞
β =7 Min

α = 7
α =8 β =∞
α = 7 β =8
5 8 α = 7
β =∞ α = 7
α = -∞ α = -∞ β =5 β = 11
α = -∞
β =5 α = 5 β =8 β =8
β =7 5 11 M
5 7 8 8

10 5 7 11 9 8 12 8 5 12 11 12
Max = - ∞ or 3

α = 3
β =∞

α = -∞ α = 3
β =3 β =2

Min β = 2, ∞

You might also like