SlideShare a Scribd company logo
1 of 22
AI3391 ARTIFICAL INTELLIGENCE
(II YEAR (III Sem))
Department of Artificial Intelligence and Data
Science
Session 15
by
Asst.Prof.M.Gokilavani
NIET
1/24/2024 Department of AI & DS 1
TEXTBOOK:
• Artificial Intelligence A modern Approach, Third
Edition, Stuart Russell and Peter Norvig, Pearson
Education.
REFERENCES:
• Artificial Intelligence, 3rd Edn, E. Rich and K.Knight
(TMH).
• Artificial Intelligence, 3rd Edn, Patrick Henny Winston,
Pearson Education.
• Artificial Intelligence, Shivani Goel, Pearson Education.
• Artificial Intelligence and Expert Systems- Patterson,
Pearson Education.
1/24/2024 Department of AI & DS 2
Topics covered in session 15
1/24/2024 Department of AI & DS 3
• Game theory
• optimal decision in games
• alpha beta Search
• Monte Carlo tree search
• stochastic games
• partially observed games
• Constraint satisfaction problem
• Constraint propagation
• Backtracking search for CSP
• Local search for CSP
• structure of CSP.
Types of algorithms in Adversarial
search
• Adversarial search is a game-playing technique
where the agents are surrounded by a competitive
environment.
• It is also obvious that the solution for the goal
state will be an optimal solution because the
player will try to win the game with the shortest
path and under limited time.
• There are following types of adversarial search:
– Min-max Algorithm
– Alpha-beta Pruning.
1/24/2024 4
Department of AI & DS
Mini-Max Algorithm
• In artificial intelligence, minimax is a decision-
making strategy under game theory, which is used to
minimize the losing chances in a game and to
maximize the winning chances.
• This strategy is also known as ‘Min-max,’ ’MM,’ or
‘Saddle point.’
1/24/2024 5
Department of AI & DS
Mini-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.
• Example : Chess, Checkers, tic-tac-toe
• In this algorithm two players play the game; one is called
MAX and other is called MIN.
1/24/2024 6
Department of AI & DS
Mini-Max Algorithm
• Both the players fight it as the opponent player gets the
minimum benefit while they get the maximum benefit.
• MIN: Decrease the chances of MAX to win the game.
• MAX: Increases his chances of winning the game.
• 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.
1/24/2024 7
Department of AI & DS
Working of Min-Max Algorithm
• MINIMAX algorithm is a backtracking algorithm where it
backtracks to pick the best move out of several choices.
• MINIMAX strategy follows the DFS (Depth-first
search) concept.
• Here, we have two players MIN and MAX, and the game is
played alternatively between them, i.e., when MAX made a
move, then the next turn is of MIN.
• It means the move made by MAX is fixed and, he cannot
change it.
• The same concept is followed in DFS strategy, i.e., we
follow the same path and cannot change in the middle.
• That’s why in MINIMAX algorithm, instead of BFS, we
follow DFS.
1/24/2024 8
Department of AI & DS
Working of Min-Max Algorithm
• Keep on generating the game tree/ search tree till a
limit d.
• Compute the move using a heuristic function.
• Propagate the values from the leaf node till the
current position following the minimax strategy.
• Make the best move from the choices.
1/24/2024 9
Department of AI & DS
Pseudocode for Minimax Algorithm
1/24/2024 Department of AI & DS 10
Step 1
• In the first step, the algorithm generates the
entire game-tree and apply the utility function
to get the utility values for the terminal states.
• In the below tree diagram, let's take A is the
initial state of the tree.
• Suppose maximizer takes first turn which has
worst-case initial value =- infinity, and
minimizer will take next turn which has worst-
case initial value = +infinity.
1/24/2024 Department of AI & DS 11
1/24/2024 Department of AI & DS 12
Step 2
• Now, first we find the utilities value for the
Maximizer, its initial value is -∞, so we will
compare each value in terminal state with initial
value of Maximizer and determines the higher
nodes values. It will find the maximum among the
all.
• For node D max(-1,- -∞) => max(-1,4)= 4
• For Node E max(2, -∞) => max(2, 6)= 6
• For Node F max(-3, -∞) => max(-3,-5) = -3
• For node G max(0, -∞) = max(0, 7) = 7
1/24/2024 Department of AI & DS 13
1/24/2024 Department of AI & DS 14
Step 3
• In the next step, it's a turn for minimizer, so it
will compare all nodes value with +∞ and will
find the 3rd layer node values.
• For node B= min(4,6) = 4
• For node C= min (-3, 7) = -3
1/24/2024 Department of AI & DS 15
1/24/2024 Department of AI & DS 16
Step 4
• Now it's a turn for Maximizer, and it will again
choose the maximum of all nodes value and
find the maximum value for the root node.
• In this game tree, there are only 4 layers, hence
we reach immediately to the root node, but in
real games, there will be more than 4 layers.
• For node A max(4, -3)= 4
1/24/2024 Department of AI & DS 17
1/24/2024 Department of AI & DS 18
Example 2
1/24/2024 Department of AI & DS 19
Solution
1/24/2024 Department of AI & DS 20
Limitation of the minimax Algorithm
• The main drawback of the minimax algorithm
is that it gets really slow for complex games
such as Chess, go, etc.
• This type of games has a huge branching
factor, and the player has lots of choices to
decide.
• This limitation of the minimax algorithm can
be improved from alpha-beta pruning.
1/24/2024 Department of AI & DS 21
Topics to be covered in next session 16
• Alpha–Beta Pruning
1/24/2024 Department of AI & DS 22
Thank you!!!

More Related Content

Similar to AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx

Adversarial search
Adversarial searchAdversarial search
Adversarial searchNilu Desai
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptSabrinaShanta2
 
Lecture 22 adversarial search
Lecture 22 adversarial searchLecture 22 adversarial search
Lecture 22 adversarial searchHema Kashyap
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxPriyadharshiniG41
 
AI3391 Artificial Intelligence Session 19 stochastics games.pptx
AI3391 Artificial Intelligence Session 19 stochastics games.pptxAI3391 Artificial Intelligence Session 19 stochastics games.pptx
AI3391 Artificial Intelligence Session 19 stochastics games.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptx
AI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptxAI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptx
AI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial Intelligence Session 20 partially observed games.pptx
AI3391 Artificial Intelligence Session 20 partially observed games.pptxAI3391 Artificial Intelligence Session 20 partially observed games.pptx
AI3391 Artificial Intelligence Session 20 partially observed games.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptx
AI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptxAI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptx
AI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptxAsst.prof M.Gokilavani
 
Unit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptUnit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptganesh15478
 
2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratchFEG
 
Game playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphGame playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphSyed Zaid Irshad
 

Similar to AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx (20)

Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Chess engine presentation
Chess engine presentationChess engine presentation
Chess engine presentation
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
 
484-7.ppt
484-7.ppt484-7.ppt
484-7.ppt
 
Capgemini 1
Capgemini 1Capgemini 1
Capgemini 1
 
Lecture 22 adversarial search
Lecture 22 adversarial searchLecture 22 adversarial search
Lecture 22 adversarial search
 
AI Lecture 5 (game playing)
AI Lecture 5 (game playing)AI Lecture 5 (game playing)
AI Lecture 5 (game playing)
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptx
 
adversial search.pptx
adversial search.pptxadversial search.pptx
adversial search.pptx
 
Two player games
Two player gamesTwo player games
Two player games
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
AI3391 Artificial Intelligence Session 19 stochastics games.pptx
AI3391 Artificial Intelligence Session 19 stochastics games.pptxAI3391 Artificial Intelligence Session 19 stochastics games.pptx
AI3391 Artificial Intelligence Session 19 stochastics games.pptx
 
AI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptx
AI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptxAI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptx
AI3391 Artificial Intelligence Session 17 imperfect real time decisions.pptx
 
Minimax
MinimaxMinimax
Minimax
 
1.game
1.game1.game
1.game
 
AI3391 Artificial Intelligence Session 20 partially observed games.pptx
AI3391 Artificial Intelligence Session 20 partially observed games.pptxAI3391 Artificial Intelligence Session 20 partially observed games.pptx
AI3391 Artificial Intelligence Session 20 partially observed games.pptx
 
AI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptx
AI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptxAI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptx
AI3391 Artificial intelligence Session 16 Alpha–Beta Pruning.pptx
 
Unit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptUnit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).ppt
 
2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch
 
Game playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphGame playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graph
 

More from Asst.prof M.Gokilavani

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
IT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfIT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfAsst.prof M.Gokilavani
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesAsst.prof M.Gokilavani
 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfAsst.prof M.Gokilavani
 
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfGE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfAsst.prof M.Gokilavani
 
GE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfGE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAsst.prof M.Gokilavani
 

More from Asst.prof M.Gokilavani (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
IT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfIT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdf
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notes
 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
 
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfGE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
 
GE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdfGE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdf
 
GE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfGE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdf
 
GE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _NotesGE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _Notes
 
GE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_NotesGE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_Notes
 
GE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_NotesGE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_Notes
 
GE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_NotesGE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_Notes
 
GE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_NotesGE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_Notes
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
 
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptx
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptx
 
AI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptx
 

Recently uploaded

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 

AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx

  • 1. AI3391 ARTIFICAL INTELLIGENCE (II YEAR (III Sem)) Department of Artificial Intelligence and Data Science Session 15 by Asst.Prof.M.Gokilavani NIET 1/24/2024 Department of AI & DS 1
  • 2. TEXTBOOK: • Artificial Intelligence A modern Approach, Third Edition, Stuart Russell and Peter Norvig, Pearson Education. REFERENCES: • Artificial Intelligence, 3rd Edn, E. Rich and K.Knight (TMH). • Artificial Intelligence, 3rd Edn, Patrick Henny Winston, Pearson Education. • Artificial Intelligence, Shivani Goel, Pearson Education. • Artificial Intelligence and Expert Systems- Patterson, Pearson Education. 1/24/2024 Department of AI & DS 2
  • 3. Topics covered in session 15 1/24/2024 Department of AI & DS 3 • Game theory • optimal decision in games • alpha beta Search • Monte Carlo tree search • stochastic games • partially observed games • Constraint satisfaction problem • Constraint propagation • Backtracking search for CSP • Local search for CSP • structure of CSP.
  • 4. Types of algorithms in Adversarial search • Adversarial search is a game-playing technique where the agents are surrounded by a competitive environment. • It is also obvious that the solution for the goal state will be an optimal solution because the player will try to win the game with the shortest path and under limited time. • There are following types of adversarial search: – Min-max Algorithm – Alpha-beta Pruning. 1/24/2024 4 Department of AI & DS
  • 5. Mini-Max Algorithm • In artificial intelligence, minimax is a decision- making strategy under game theory, which is used to minimize the losing chances in a game and to maximize the winning chances. • This strategy is also known as ‘Min-max,’ ’MM,’ or ‘Saddle point.’ 1/24/2024 5 Department of AI & DS
  • 6. Mini-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. • Example : Chess, Checkers, tic-tac-toe • In this algorithm two players play the game; one is called MAX and other is called MIN. 1/24/2024 6 Department of AI & DS
  • 7. Mini-Max Algorithm • Both the players fight it as the opponent player gets the minimum benefit while they get the maximum benefit. • MIN: Decrease the chances of MAX to win the game. • MAX: Increases his chances of winning the game. • 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. 1/24/2024 7 Department of AI & DS
  • 8. Working of Min-Max Algorithm • MINIMAX algorithm is a backtracking algorithm where it backtracks to pick the best move out of several choices. • MINIMAX strategy follows the DFS (Depth-first search) concept. • Here, we have two players MIN and MAX, and the game is played alternatively between them, i.e., when MAX made a move, then the next turn is of MIN. • It means the move made by MAX is fixed and, he cannot change it. • The same concept is followed in DFS strategy, i.e., we follow the same path and cannot change in the middle. • That’s why in MINIMAX algorithm, instead of BFS, we follow DFS. 1/24/2024 8 Department of AI & DS
  • 9. Working of Min-Max Algorithm • Keep on generating the game tree/ search tree till a limit d. • Compute the move using a heuristic function. • Propagate the values from the leaf node till the current position following the minimax strategy. • Make the best move from the choices. 1/24/2024 9 Department of AI & DS
  • 10. Pseudocode for Minimax Algorithm 1/24/2024 Department of AI & DS 10
  • 11. Step 1 • In the first step, the algorithm generates the entire game-tree and apply the utility function to get the utility values for the terminal states. • In the below tree diagram, let's take A is the initial state of the tree. • Suppose maximizer takes first turn which has worst-case initial value =- infinity, and minimizer will take next turn which has worst- case initial value = +infinity. 1/24/2024 Department of AI & DS 11
  • 13. Step 2 • Now, first we find the utilities value for the Maximizer, its initial value is -∞, so we will compare each value in terminal state with initial value of Maximizer and determines the higher nodes values. It will find the maximum among the all. • For node D max(-1,- -∞) => max(-1,4)= 4 • For Node E max(2, -∞) => max(2, 6)= 6 • For Node F max(-3, -∞) => max(-3,-5) = -3 • For node G max(0, -∞) = max(0, 7) = 7 1/24/2024 Department of AI & DS 13
  • 15. Step 3 • In the next step, it's a turn for minimizer, so it will compare all nodes value with +∞ and will find the 3rd layer node values. • For node B= min(4,6) = 4 • For node C= min (-3, 7) = -3 1/24/2024 Department of AI & DS 15
  • 17. Step 4 • Now it's a turn for Maximizer, and it will again choose the maximum of all nodes value and find the maximum value for the root node. • In this game tree, there are only 4 layers, hence we reach immediately to the root node, but in real games, there will be more than 4 layers. • For node A max(4, -3)= 4 1/24/2024 Department of AI & DS 17
  • 21. Limitation of the minimax Algorithm • The main drawback of the minimax algorithm is that it gets really slow for complex games such as Chess, go, etc. • This type of games has a huge branching factor, and the player has lots of choices to decide. • This limitation of the minimax algorithm can be improved from alpha-beta pruning. 1/24/2024 Department of AI & DS 21
  • 22. Topics to be covered in next session 16 • Alpha–Beta Pruning 1/24/2024 Department of AI & DS 22 Thank you!!!