MINMAX ALGORITHM
BY
NAME: SURYAKUMARAN M
ROLL.NO: 24CSER025
UNIT.NO: 2
SUBJECT: FOUNDATION OF ARTIFICIAL INTELLIGENCE
WHAT IS MINMAX ?
 The MinMax algorithm, also known as minimax, is
a backtracking algorithm used in decision
making, game theory and artificial intelligence
(AI). It is used to find the optimal move for a player,
assuming that the opponent is also playing optimally.
 The algorithm is mostly employed for game play,
such as chess, checkers, tic-tac-toe, go, and other
two-player games
WORKING OF MIN-MAX PROCESS IN AI
 The Min-Max algorithm is a decision-making process used in
artificial intelligence for two-player games. It involves two
players: the maximizer and the minimizer, each aiming to
optimize their own outcomes.
Maximizing Player (Max):
 Aims to maximize their score or utility value.
 Chooses the move that leads to the highest possible utility
value, assuming the opponent will play optimally.
Cond…
Minimizing Player (Min):
 Aims to minimize the maximizes score or utility
value.
 Selects the move that results in the lowest possible
utility value for the maximize, assuming the
opponent will play optimally.
EXAMPLE OF MIN-MAX IN ACTION
 Consider a simplified version of a game where each
player can choose between two moves at each turn.
Here’s a basic game tree:
Max
/ 
Min Min
/  / 
+1 -10 +1
Cond..
 At the leaf nodes, the utility values are +1, -1, 0, and
+1.
 The minimizing player will choose the minimum
values from the child nodes: -1 (left subtree) and 0
(right subtree).
 The maximizing player will then choose the
maximum value between -1 and 0, which is 0.
ALPHA-BETA PRUNING OPTIMIZATION
IN MINI-MAX ALGORITHM
 Alpha-beta pruning enhances the Min-Max algorithm
by eliminating branches that do not affect the final
decision.
 Alpha (α): The best value that the maximizing player
can guarantee so far.
 Beta (β): The best value that the minimizing player
can guarantee so far.
During the search:
 If alpha geq beta, prune the remaining branches.
STRENGTHS OF THE MIN-MAX ALGORITHM
Optimal Decision Making:
 The Min-Max algorithm ensures optimal
decision making by considering all
possible moves and their outcomes. It
provides a strategic advantage by
predicting the opponent’s best responses
and choosing moves that maximize the
player’s benefit.
Cond..
Simplicity and Clarity:
 The Min-Max algorithm is conceptually
simple and easy to understand. Its
straightforward approach of evaluating
and propagating utility values through a
game tree makes it an accessible and
widely taught algorithm in AI.
WEAKNESSES OF THE MIN-MAX
ALGORITHM
Computational Complexity:
 The primary drawback of the Min-Max
algorithm is its computational complexity.
As the depth and branching factor of the
game tree increase, the number of nodes
to be evaluated grows exponentially. This
makes it computationally expensive and
impractical for games with deep and
complex trees, like Go.
Cond…
Depth Limitations:
 To manage computational demands, the
Min-Max algorithm often limits the depth
of the game tree. However, this can lead
to suboptimal decisions if critical moves lie
beyond the chosen depth. Balancing depth
and computational feasibility is a
significant challenge.
Cond…
Handling of Uncertain Environments:
 The Min-Max algorithm assumes
deterministic outcomes for each move,
which may not be realistic in uncertain or
probabilistic environments. Real-world
scenarios often involve uncertainty and
incomplete information, requiring
modifications to the basic Min-Max
approach.
CONCLUSION
 In summary, the minimax algorithm helps
the AI make optimal decisions by
considering the best and worst possible
outcomes for each move, assuming both
players play perfectly.
THANK YOU

MINMAX ALGORITHM in machine learning.pptx

  • 1.
    MINMAX ALGORITHM BY NAME: SURYAKUMARANM ROLL.NO: 24CSER025 UNIT.NO: 2 SUBJECT: FOUNDATION OF ARTIFICIAL INTELLIGENCE
  • 2.
    WHAT IS MINMAX?  The MinMax algorithm, also known as minimax, is a backtracking algorithm used in decision making, game theory and artificial intelligence (AI). It is used to find the optimal move for a player, assuming that the opponent is also playing optimally.  The algorithm is mostly employed for game play, such as chess, checkers, tic-tac-toe, go, and other two-player games
  • 3.
    WORKING OF MIN-MAXPROCESS IN AI  The Min-Max algorithm is a decision-making process used in artificial intelligence for two-player games. It involves two players: the maximizer and the minimizer, each aiming to optimize their own outcomes. Maximizing Player (Max):  Aims to maximize their score or utility value.  Chooses the move that leads to the highest possible utility value, assuming the opponent will play optimally.
  • 4.
    Cond… Minimizing Player (Min): Aims to minimize the maximizes score or utility value.  Selects the move that results in the lowest possible utility value for the maximize, assuming the opponent will play optimally.
  • 5.
    EXAMPLE OF MIN-MAXIN ACTION  Consider a simplified version of a game where each player can choose between two moves at each turn. Here’s a basic game tree: Max / Min Min / / +1 -10 +1
  • 6.
    Cond..  At theleaf nodes, the utility values are +1, -1, 0, and +1.  The minimizing player will choose the minimum values from the child nodes: -1 (left subtree) and 0 (right subtree).  The maximizing player will then choose the maximum value between -1 and 0, which is 0.
  • 7.
    ALPHA-BETA PRUNING OPTIMIZATION INMINI-MAX ALGORITHM  Alpha-beta pruning enhances the Min-Max algorithm by eliminating branches that do not affect the final decision.  Alpha (α): The best value that the maximizing player can guarantee so far.  Beta (β): The best value that the minimizing player can guarantee so far. During the search:  If alpha geq beta, prune the remaining branches.
  • 8.
    STRENGTHS OF THEMIN-MAX ALGORITHM Optimal Decision Making:  The Min-Max algorithm ensures optimal decision making by considering all possible moves and their outcomes. It provides a strategic advantage by predicting the opponent’s best responses and choosing moves that maximize the player’s benefit.
  • 9.
    Cond.. Simplicity and Clarity: The Min-Max algorithm is conceptually simple and easy to understand. Its straightforward approach of evaluating and propagating utility values through a game tree makes it an accessible and widely taught algorithm in AI.
  • 10.
    WEAKNESSES OF THEMIN-MAX ALGORITHM Computational Complexity:  The primary drawback of the Min-Max algorithm is its computational complexity. As the depth and branching factor of the game tree increase, the number of nodes to be evaluated grows exponentially. This makes it computationally expensive and impractical for games with deep and complex trees, like Go.
  • 11.
    Cond… Depth Limitations:  Tomanage computational demands, the Min-Max algorithm often limits the depth of the game tree. However, this can lead to suboptimal decisions if critical moves lie beyond the chosen depth. Balancing depth and computational feasibility is a significant challenge.
  • 12.
    Cond… Handling of UncertainEnvironments:  The Min-Max algorithm assumes deterministic outcomes for each move, which may not be realistic in uncertain or probabilistic environments. Real-world scenarios often involve uncertainty and incomplete information, requiring modifications to the basic Min-Max approach.
  • 13.
    CONCLUSION  In summary,the minimax algorithm helps the AI make optimal decisions by considering the best and worst possible outcomes for each move, assuming both players play perfectly.
  • 14.