SlideShare une entreprise Scribd logo
1  sur  19
Adversarial Search
Min Max Search
Lecture-22
Hema Kashyap
1
Introduction
• The minimax algorithm is a way of finding an optimal move in a two
player game. In the search tree for a two-player game, there are two kinds
of nodes, nodes representing yourmoves and nodes representing your
opponent's moves. Nodes representing your moves are generally drawn as
squares (or possibly upward pointing triangles):
• Below given symbols are also called MAX nodes. The goal at a MAX node
is to maximize the value of the subtree rooted at that node. To do this, a
MAX node chooses the child with the greatest value, and that becomes the
value of the MAX node.
2
• Below given are called MIN nodes. The goal at a MIN node is to minimize
the value of the subtree rooted at that node. To do this, a MIN node chooses
the child with the smallest value, and that becomes the value of the MIN
node.
3
Min Max Algorithm
4
Example: tic-tac-toe
• e (evaluation function → integer) = number of
available rows, columns, diagonals for MAX -
number of available rows, columns, diagonals
for MIN
• MAX plays with “X” and desires maximizing e.
• MIN plays with “0” and desires minimizing e.
• Symmetries are taken into account.
• A depth limit is used (2, in the example).
5
Example: tic-tac-toe
6
Example: tic-tac-toe
7
Example: tic-tac-toe
8
Example
• To demonstrate the minimax algorithm, I'm going to use the following tree.
Note that it's typical for two player games to have different branching
factors at each node. The move I make could make restrictions on what
moves are possible for the other player, or possibly remove restrictions.
Note also that in this example, we're ignoring what the game or the probem
space are in order to focus on the algorithm.
9
Example
• So now you've seen the whole search tree. For the rest of the diagrams, I'll
only show the portion of the tree that we've already explored at that
particular time. Thus, when we start the problem, all minimax sees is the
start node:
10
Example
• It begins like a depth first search, generating the first child. Then we see
this:
11
Example
• So far we've really seen no
evaluation values. The way
minimax works is to go down a
specified number of full moves
(where one "full move" is actually
a move by you and a move by your
opponent), then calculate
evaluation values for states at that
depth. For this example, we're
going to go down one full move,
which is one more level. When we
generate the values for those nodes,
here is what we see:
12
Example
• Now we have the values of the
children of the min node, so it
can do its work. It chooses the
minimum of the two child node
values, which is 3. Now we
have this:
13
Example
• The max node at the top still
has two other children nodes
that we need to generate and
search. We go on and generate
the second node and generate its
child. Since there is only one
child, the min node must take
it's value, and we have this:
14
Example
• Finally, minimax generates the
third child of the top-level max
node, generates its children, and
evaluates them:
15
Example
• Now the third min node chooses the
minimum of it's child node values, 1, and
we have this:
16
Example
• Finally we have all of the values of
the children of the max node at the
top level, so it chooses the
maximum of them, 15, and we get
the final solution:
17
Analysis
• The minimax algorithm performs a complete
depth-first exploration of the game tree.
• In minimax, at each point in the process, only
the nodes along a path of the tree are
considered and kept in memory.
18
Analysis
• If the maximum depth of the tree is m, and
there are b legal moves at each point, then
the time complexity is O(bm).
• The space complexity is:
– O(bm) for an algorithm that generates all
successors at once
– O(m) if it generates successors one at a time.
19

Contenu connexe

Tendances

Tendances (20)

Artificial intelligence games
Artificial intelligence gamesArtificial intelligence games
Artificial intelligence games
 
Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )
 
AI Lesson 07
AI Lesson 07AI Lesson 07
AI Lesson 07
 
Two player games
Two player gamesTwo player games
Two player games
 
Games
GamesGames
Games
 
Chess engine presentation
Chess engine presentationChess engine presentation
Chess engine presentation
 
Game theory
Game theoryGame theory
Game theory
 
Game theory in network security
Game theory in network securityGame theory in network security
Game theory in network security
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Project on ai gaming
Project on ai gamingProject on ai gaming
Project on ai gaming
 
Game playing in artificial intelligent technique
Game playing in artificial intelligent technique Game playing in artificial intelligent technique
Game playing in artificial intelligent technique
 
Modeling of players_activity_michel pierfitte_ubisoft_septembre 2013
Modeling of players_activity_michel pierfitte_ubisoft_septembre 2013Modeling of players_activity_michel pierfitte_ubisoft_septembre 2013
Modeling of players_activity_michel pierfitte_ubisoft_septembre 2013
 
Innovative Combat By Stoutheart
Innovative Combat By StoutheartInnovative Combat By Stoutheart
Innovative Combat By Stoutheart
 
Capgemini 1
Capgemini 1Capgemini 1
Capgemini 1
 
Game Playing
Game Playing Game Playing
Game Playing
 
Fun Getting into Trouble
Fun Getting into TroubleFun Getting into Trouble
Fun Getting into Trouble
 
Game theory
Game theoryGame theory
Game theory
 
Badiya haihn
Badiya haihnBadiya haihn
Badiya haihn
 
Learning Through Gaming
Learning Through GamingLearning Through Gaming
Learning Through Gaming
 

Similaire à Lecture 22 adversarial search

AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15  Min Max Algorithm.pptxAI3391 Artificial intelligence Session 15  Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdfAI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdfAsst.prof M.Gokilavani
 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCEudayvanand
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxPriyadharshiniG41
 
MINI-MAX ALGORITHM.pptx
MINI-MAX ALGORITHM.pptxMINI-MAX ALGORITHM.pptx
MINI-MAX ALGORITHM.pptxNayanChandak1
 
Unit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptUnit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptganesh15478
 
Greedy algorithm pptxe file for computer
Greedy algorithm pptxe file for computerGreedy algorithm pptxe file for computer
Greedy algorithm pptxe file for computerkerimu1235
 
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"22bcs058
 
Practical AI for Business: Bandit Algorithms
Practical AI for Business: Bandit AlgorithmsPractical AI for Business: Bandit Algorithms
Practical AI for Business: Bandit AlgorithmsSC5.io
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptSabrinaShanta2
 
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
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AIvikas dhakane
 
Exploring Algorithms
Exploring AlgorithmsExploring Algorithms
Exploring AlgorithmsSri Prasanna
 

Similaire à Lecture 22 adversarial search (20)

AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15  Min Max Algorithm.pptxAI3391 Artificial intelligence Session 15  Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
 
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdfAI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
 
adversial search.pptx
adversial search.pptxadversial search.pptx
adversial search.pptx
 
cai
caicai
cai
 
Minimax
MinimaxMinimax
Minimax
 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptx
 
Unit3_1.pdf
Unit3_1.pdfUnit3_1.pdf
Unit3_1.pdf
 
MINI-MAX ALGORITHM.pptx
MINI-MAX ALGORITHM.pptxMINI-MAX ALGORITHM.pptx
MINI-MAX ALGORITHM.pptx
 
CNN.pptx
CNN.pptxCNN.pptx
CNN.pptx
 
Unit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptUnit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).ppt
 
Greedy algorithm pptxe file for computer
Greedy algorithm pptxe file for computerGreedy algorithm pptxe file for computer
Greedy algorithm pptxe file for computer
 
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
 
Practical AI for Business: Bandit Algorithms
Practical AI for Business: Bandit AlgorithmsPractical AI for Business: Bandit Algorithms
Practical AI for Business: Bandit Algorithms
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
 
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
 
AI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptxAI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptx
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 
Exploring Algorithms
Exploring AlgorithmsExploring Algorithms
Exploring Algorithms
 

Plus de Hema Kashyap

Lecture 30 introduction to logic
Lecture 30 introduction to logicLecture 30 introduction to logic
Lecture 30 introduction to logicHema Kashyap
 
Lecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-exampleLecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-exampleHema Kashyap
 
Lecture 28 genetic algorithm
Lecture 28 genetic algorithmLecture 28 genetic algorithm
Lecture 28 genetic algorithmHema Kashyap
 
Lecture 27 simulated annealing
Lecture 27 simulated annealingLecture 27 simulated annealing
Lecture 27 simulated annealingHema Kashyap
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam searchHema Kashyap
 
Lecture 25 hill climbing
Lecture 25 hill climbingLecture 25 hill climbing
Lecture 25 hill climbingHema Kashyap
 
Lecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmLecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmHema Kashyap
 
Lecture 23 alpha beta pruning
Lecture 23 alpha beta pruningLecture 23 alpha beta pruning
Lecture 23 alpha beta pruningHema Kashyap
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchHema Kashyap
 
Lecture 20 problem reduction search
Lecture 20 problem reduction searchLecture 20 problem reduction search
Lecture 20 problem reduction searchHema Kashyap
 
Lecture 19 sma star algorithm
Lecture 19 sma star algorithmLecture 19 sma star algorithm
Lecture 19 sma star algorithmHema Kashyap
 
Lecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithmLecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithmHema Kashyap
 
Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmHema Kashyap
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded searchHema Kashyap
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problemHema Kashyap
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmHema Kashyap
 
Lecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problemLecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problemHema Kashyap
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesHema Kashyap
 
Lecture 11 Informed Search
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed SearchHema Kashyap
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Hema Kashyap
 

Plus de Hema Kashyap (20)

Lecture 30 introduction to logic
Lecture 30 introduction to logicLecture 30 introduction to logic
Lecture 30 introduction to logic
 
Lecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-exampleLecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-example
 
Lecture 28 genetic algorithm
Lecture 28 genetic algorithmLecture 28 genetic algorithm
Lecture 28 genetic algorithm
 
Lecture 27 simulated annealing
Lecture 27 simulated annealingLecture 27 simulated annealing
Lecture 27 simulated annealing
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam search
 
Lecture 25 hill climbing
Lecture 25 hill climbingLecture 25 hill climbing
Lecture 25 hill climbing
 
Lecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmLecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithm
 
Lecture 23 alpha beta pruning
Lecture 23 alpha beta pruningLecture 23 alpha beta pruning
Lecture 23 alpha beta pruning
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star search
 
Lecture 20 problem reduction search
Lecture 20 problem reduction searchLecture 20 problem reduction search
Lecture 20 problem reduction search
 
Lecture 19 sma star algorithm
Lecture 19 sma star algorithmLecture 19 sma star algorithm
Lecture 19 sma star algorithm
 
Lecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithmLecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithm
 
Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithm
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded search
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problem
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
 
Lecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problemLecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problem
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
 
Lecture 11 Informed Search
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed Search
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..
 

Dernier

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 

Dernier (20)

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 

Lecture 22 adversarial search

  • 1. Adversarial Search Min Max Search Lecture-22 Hema Kashyap 1
  • 2. Introduction • The minimax algorithm is a way of finding an optimal move in a two player game. In the search tree for a two-player game, there are two kinds of nodes, nodes representing yourmoves and nodes representing your opponent's moves. Nodes representing your moves are generally drawn as squares (or possibly upward pointing triangles): • Below given symbols are also called MAX nodes. The goal at a MAX node is to maximize the value of the subtree rooted at that node. To do this, a MAX node chooses the child with the greatest value, and that becomes the value of the MAX node. 2
  • 3. • Below given are called MIN nodes. The goal at a MIN node is to minimize the value of the subtree rooted at that node. To do this, a MIN node chooses the child with the smallest value, and that becomes the value of the MIN node. 3
  • 5. Example: tic-tac-toe • e (evaluation function → integer) = number of available rows, columns, diagonals for MAX - number of available rows, columns, diagonals for MIN • MAX plays with “X” and desires maximizing e. • MIN plays with “0” and desires minimizing e. • Symmetries are taken into account. • A depth limit is used (2, in the example). 5
  • 9. Example • To demonstrate the minimax algorithm, I'm going to use the following tree. Note that it's typical for two player games to have different branching factors at each node. The move I make could make restrictions on what moves are possible for the other player, or possibly remove restrictions. Note also that in this example, we're ignoring what the game or the probem space are in order to focus on the algorithm. 9
  • 10. Example • So now you've seen the whole search tree. For the rest of the diagrams, I'll only show the portion of the tree that we've already explored at that particular time. Thus, when we start the problem, all minimax sees is the start node: 10
  • 11. Example • It begins like a depth first search, generating the first child. Then we see this: 11
  • 12. Example • So far we've really seen no evaluation values. The way minimax works is to go down a specified number of full moves (where one "full move" is actually a move by you and a move by your opponent), then calculate evaluation values for states at that depth. For this example, we're going to go down one full move, which is one more level. When we generate the values for those nodes, here is what we see: 12
  • 13. Example • Now we have the values of the children of the min node, so it can do its work. It chooses the minimum of the two child node values, which is 3. Now we have this: 13
  • 14. Example • The max node at the top still has two other children nodes that we need to generate and search. We go on and generate the second node and generate its child. Since there is only one child, the min node must take it's value, and we have this: 14
  • 15. Example • Finally, minimax generates the third child of the top-level max node, generates its children, and evaluates them: 15
  • 16. Example • Now the third min node chooses the minimum of it's child node values, 1, and we have this: 16
  • 17. Example • Finally we have all of the values of the children of the max node at the top level, so it chooses the maximum of them, 15, and we get the final solution: 17
  • 18. Analysis • The minimax algorithm performs a complete depth-first exploration of the game tree. • In minimax, at each point in the process, only the nodes along a path of the tree are considered and kept in memory. 18
  • 19. Analysis • If the maximum depth of the tree is m, and there are b legal moves at each point, then the time complexity is O(bm). • The space complexity is: – O(bm) for an algorithm that generates all successors at once – O(m) if it generates successors one at a time. 19