0% found this document useful (0 votes)
7 views

L5 - SLM Notes (MiniMax Algorithm)

Uploaded by

riyasharmasophia
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)
7 views

L5 - SLM Notes (MiniMax Algorithm)

Uploaded by

riyasharmasophia
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/ 14

Statistical Machine Learning

TEXTBOOKS/LEARNING RESOURCES:
a) Masashi Sugiyama, Introduction to Statistical Machine Learning (1 st ed.), Morgan Kaufmann, 2017. ISBN 978-0128021217.
b) T. M. Mitchell, Machine Learning (1st ed.), McGraw Hill, 2017. ISBN 978-1259096952.

REFERENCE BOOKS/LEARNING RESOURCES:


a) Richard Golden, Statistical Machine Learning A Unified Framework (1 st ed.), unknown, 2020.
Dr. Tej Bahadur Chandra October 30, 2024 1
Minimax Algorithm

Dr. Tej Bahadur Chandra October 30, 2024 2


Minimax Algorithm

It is a recursive or backtracking algorithm which is used in decision-making and game theory


in AI. For example: Chess, Checkers, Ludo, etc.

 In this algorithm two players play the game, one is called MAX and other is called MIN.

Minimax  The maximizer tries to get the highest score possible while the minimizer tries to do the

Algorithm opposite and get the lowest score possible.

It provides an optimal move for the


MAX player assuming that opponent is MIN
also playing optimally.
Dr. Tej Bahadur Chandra October 30, 2024 3
Minimax Algorithm

Key Points:

Backtracking Algorithm

Best move strategy used


Minimax
Algorithm Max will try to maximize its utility (Best Move)

Min will try to minimize its utility (Worst Move)

Dr. Tej Bahadur Chandra October 30, 2024 4


Minimax Algorithm

Example: Maximizer Minimizer


Play best move Play worst
and maximize move and
Goal
the value. minimize the
value.

Minimax
Algorithm

Even though there is a value of 9 on


the right subtree, the minimizer will
never pick that. We must always
assume that our opponent plays
optimally. Dr. Tej Bahadur Chandra October 30, 2024 5
Minimax Algorithm

Working with four layers of game tree

Step-1: Generates the entire game-tree and apply the MAX

utility function to get the utility values for the


terminal states.
Minimax MIN

Algorithm

MAX

Terminal Nodes

Dr. Tej Bahadur Chandra October 30, 2024 6


Minimax Algorithm

Working with four layers of game tree

Step-2: First we find the utilities value for the MAX

Maximizer.

 For node D max(-1,8)= 8


Minimax  For Node E max(-3, -1)= -1
MIN

Algorithm  For Node F max(2,1) = 2

 For node G max(-3, 4) = 4


MAX 2 4
8 -1

Terminal Nodes

Dr. Tej Bahadur Chandra October 30, 2024 7


Minimax Algorithm

Working with four layers of game tree

Step-3: It's a turn for minimizer and it will select MAX

minimum value as an optimal move.

Minimax  For node B min(8,-1)= -1 MIN -1 2


Algorithm  For Node C min(2,4)= 2

MAX 2 4
8 -1

Terminal Nodes

Dr. Tej Bahadur Chandra October 30, 2024 8


Minimax Algorithm

Working with four layers of game tree

Step-4: It's a turn for Maximizer and it will select MAX 2


max value as an optimal move.

Minimax  For node A max(-1,2)= 2 MIN -1 2


Algorithm

MAX 2 4
8 -1

Terminal Nodes

Dr. Tej Bahadur Chandra October 30, 2024 9


Minimax Algorithm

Working with four layers of game tree

Step-5: So for the Node A, max value will be 2. MAX 2

Minimax MIN -1 2
Algorithm

MAX 2 4
8 -1

Terminal Nodes

Dr. Tej Bahadur Chandra October 30, 2024 10


Minimax Algorithm

 A thorough assessment of the search space is performed.

Advantages  Help in decision making in AI.

of  New and smart machines are developed with this algorithm.


Minimax
Algorithm  It is widely used in two player turn-based games such as Tic-Tac-Toe, Backgammon,
Mancala, Chess, etc.

Dr. Tej Bahadur Chandra October 30, 2024 11


Minimax Algorithm

 It works very slow for complex games such as Chess. This type of games has a huge
branching factor, and the player has lots of choices to decide.
Limitations
of  Evaluation and search of all possible nodes and branches degrades the performance and

Minimax efficiency of the engine.

Algorithm  If there is a restriction of time and space, it is not possible to explore the entire tree.

Dr. Tej Bahadur Chandra October 30, 2024 12


Further Readings:

• Minimax Algorithm in Game Playing | Artificial Intelligence, https://www.youtube.com/watch?v=Ntu8nNBL28o

• Mini-Max Algorithm in Artificial Intelligence, https://www.javatpoint.com/mini-max-algorithm-in-ai

• Minimax Algorithm in Game Theory, https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-1-introduction/

Dr. Tej Bahadur Chandra October 30, 2024 13


Further Readings:
 Maximum likelihood estimation,
https://towardsdatascience.com/probability-concepts-explained-maximum-likelihood-estimation-c7b4342fdbb
1

 Maximum Likelihood For the Normal Distribution, https://www.youtube.com/watch?v=Dn6b9fCIUpM

 Maximum Likelihood Estimation: What Does it Mean?


https://www.mygreatlearning.com/blog/maximum-likelihood-estimation/

Dr. Tej Bahadur Chandra October 30, 2024 14

You might also like