SlideShare a Scribd company logo
1 of 16
ARTIFICIAL INTELLIGENCE
PANKAJ DEBBARMA
Deptt. of CSE, TIT, Narsingarh
Game Playing
CONTENTS
Game Playing
• Means-Ends Analysis
• Ways to play
• Game trees
• Game Tree and Heuristic
Evaluation
• Minimax Evaluation of
Game Trees
• Minimax with Alpha-
Beta Pruning
• Game tree numericals
Means-Ends Analysis
• One of the earliest AI systems was the General Problem Solver
(GPS) of Newell and Simon (1963). GPS used a technique for
problem solving and planning called Means-Ends Analysis.
Very loosely the means-ends analysis algorithm is:
1. Until the goal is reached or no more procedures are available:
– Describe the current state, the goal state and the differences between
the two.
– Use the difference the describe a procedure that will hopefully get
nearer to goal.
– Use the procedure and update current state.
2. If goal is reached then success otherwise fail.
Distances Airplane Train Car Taxi Bus Walk
More than 5000 km Yes
100 km – 5000 km Yes Yes Yes Yes
3 km – 100 km Yes Yes Yes Yes
Less than 3 km Yes Yes Yes
Means-Ends Analysis
Searching
The table below lists the states in a search domain, along with the
transitions available from that state. For this question, assume that the
start state is always A and the goal state is always K.
a) Assuming that there is a cost of 1 (unit cost)
to move from one state to another, draw a
diagram in the space below that illustrates
the search tree of explored states, given a
breadth-first search.
b) The heuristic values for each state are shown
above. Given these values, draw a diagram in
the space below that illustrates the search
tree of explored states, given an A* search
(the path cost is still a unit cost). Indicate the
calculated cost at each node in the tree.
Ways to Play
• Analysis
Strategy Move
Tactics
• If-then-else
• Look ahead and evaluate
• British Museum algorithm
Game Trees
• Game playing introduces an additional challenge:
– an adversary who is trying to impede your
advancement.
– combinatorial explosion.
• Apply a heuristic evaluation of game positions.
Game Tree and Heuristic Evaluation
• The X player would pursue those moves with the
highest evaluation (that is 2 in this game) and avoid
those game states that evaluate to 0 (or worse).
Minimax Evaluation of Game Trees
Minimax Evaluation of Game Trees
Show the backed-up values for the nodes in the following
game tree and show the branches that are pruned by alpha-
beta pruning. For each branch pruned, write down the
condition that is used to do the pruning. Follow the
convention to examine the branches in the tree from left to
right.
Minimax with Alpha-Beta Pruning
Minimax with Alpha-Beta Pruning
The game tree below illustrates a game position.
It is Max's turn to move.
Game Tree
1. Evaluate and fill the heuristic values for all the empty states in the game tree above.
Assume that the minimax algorithm is being used, according to the labels on the right.
2. Indicate which states will not be explored if alpha-beta pruning is used. Circle all
unvisited subtrees, and indicate next to them whether alpha-pruning or beta-pruning
was used by writing ‘α’ or ‘β’ next to the state. Assume exploration from left to right.
A game is being played on a more complicated board. A partial game tree is
drawn, and leaf nodes have been scored using an (unknown) evaluation
function e. a) In the dashed boxes, fill in the
values of all internal nodes using
the minimax algorithm.
b) Cross o any nodes that are not
evaluated when using alpha-beta
pruning (assuming the standard
left-to-right traversal of the tree).
Game
Tree
AI-08 Game Playing.pptx

More Related Content

What's hot

UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
JenishaR1
 
Ai 03 solving_problems_by_searching
Ai 03 solving_problems_by_searchingAi 03 solving_problems_by_searching
Ai 03 solving_problems_by_searching
Mohammed Romi
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
Luigi Ceccaroni
 
Ch2 3-informed (heuristic) search
Ch2 3-informed (heuristic) searchCh2 3-informed (heuristic) search
Ch2 3-informed (heuristic) search
chandsek666
 

What's hot (20)

Structure of agents
Structure of agentsStructure of agents
Structure of agents
 
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdfAI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
Intelligent agent
Intelligent agentIntelligent agent
Intelligent agent
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 
Intelligent agent
Intelligent agent Intelligent agent
Intelligent agent
 
Lecture 2 agent and environment
Lecture 2   agent and environmentLecture 2   agent and environment
Lecture 2 agent and environment
 
Ai 03 solving_problems_by_searching
Ai 03 solving_problems_by_searchingAi 03 solving_problems_by_searching
Ai 03 solving_problems_by_searching
 
3 problem-solving-
3 problem-solving-3 problem-solving-
3 problem-solving-
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
 
AI
AIAI
AI
 
Ch2 properties of the task environment
Ch2 properties of the task environmentCh2 properties of the task environment
Ch2 properties of the task environment
 
AI Lecture 2 (intelligent agents)
AI Lecture 2 (intelligent agents)AI Lecture 2 (intelligent agents)
AI Lecture 2 (intelligent agents)
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Ch2 3-informed (heuristic) search
Ch2 3-informed (heuristic) searchCh2 3-informed (heuristic) search
Ch2 3-informed (heuristic) search
 
State space search
State space searchState space search
State space search
 
Introduction of Artificial Intelligence
Introduction of Artificial IntelligenceIntroduction of Artificial Intelligence
Introduction of Artificial Intelligence
 
Planning
PlanningPlanning
Planning
 

Similar to AI-08 Game Playing.pptx

ch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.pptch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.ppt
SanGeet25
 
cs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.pptcs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.ppt
Samiksha880257
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 

Similar to AI-08 Game Playing.pptx (20)

AI Lesson 08
AI Lesson 08AI Lesson 08
AI Lesson 08
 
Two player games
Two player gamesTwo player games
Two player games
 
Games.4
Games.4Games.4
Games.4
 
adversial search.pptx
adversial search.pptxadversial search.pptx
adversial search.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
 
ch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.pptch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.ppt
 
AI subject - Game Theory and cps ppt pptx
AI subject  - Game Theory and cps ppt pptxAI subject  - Game Theory and cps ppt pptx
AI subject - Game Theory and cps ppt pptx
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Game playing.ppt
Game playing.pptGame playing.ppt
Game playing.ppt
 
It is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topicsIt is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topics
 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
 
Unit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptUnit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).ppt
 
cs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.pptcs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.ppt
 
AI_unit3.pptx
AI_unit3.pptxAI_unit3.pptx
AI_unit3.pptx
 
GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.ppt
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
AI Lesson 07
AI Lesson 07AI Lesson 07
AI Lesson 07
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
cai
caicai
cai
 
1.game
1.game1.game
1.game
 

More from Pankaj Debbarma

More from Pankaj Debbarma (11)

AI-09 Logic in AI
AI-09 Logic in AIAI-09 Logic in AI
AI-09 Logic in AI
 
OS-02 Segmentation.pptx
OS-02 Segmentation.pptxOS-02 Segmentation.pptx
OS-02 Segmentation.pptx
 
OS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptxOS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptx
 
CP02-Structure and Union.pptx
CP02-Structure and Union.pptxCP02-Structure and Union.pptx
CP02-Structure and Union.pptx
 
CP01.pptx
CP01.pptxCP01.pptx
CP01.pptx
 
Computer Graphics & Visualization - 06
Computer Graphics & Visualization - 06Computer Graphics & Visualization - 06
Computer Graphics & Visualization - 06
 
HTTP and Email
HTTP and EmailHTTP and Email
HTTP and Email
 
Ppt World Wide Web
Ppt World Wide WebPpt World Wide Web
Ppt World Wide Web
 
Ppt congestion control
Ppt congestion controlPpt congestion control
Ppt congestion control
 
NETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical AddressingNETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical Addressing
 
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTPTRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
 

Recently uploaded

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Recently uploaded (20)

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
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.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
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
(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...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
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...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
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
 

AI-08 Game Playing.pptx

  • 1. ARTIFICIAL INTELLIGENCE PANKAJ DEBBARMA Deptt. of CSE, TIT, Narsingarh Game Playing
  • 2. CONTENTS Game Playing • Means-Ends Analysis • Ways to play • Game trees • Game Tree and Heuristic Evaluation • Minimax Evaluation of Game Trees • Minimax with Alpha- Beta Pruning • Game tree numericals
  • 3. Means-Ends Analysis • One of the earliest AI systems was the General Problem Solver (GPS) of Newell and Simon (1963). GPS used a technique for problem solving and planning called Means-Ends Analysis. Very loosely the means-ends analysis algorithm is: 1. Until the goal is reached or no more procedures are available: – Describe the current state, the goal state and the differences between the two. – Use the difference the describe a procedure that will hopefully get nearer to goal. – Use the procedure and update current state. 2. If goal is reached then success otherwise fail.
  • 4. Distances Airplane Train Car Taxi Bus Walk More than 5000 km Yes 100 km – 5000 km Yes Yes Yes Yes 3 km – 100 km Yes Yes Yes Yes Less than 3 km Yes Yes Yes
  • 6. Searching The table below lists the states in a search domain, along with the transitions available from that state. For this question, assume that the start state is always A and the goal state is always K. a) Assuming that there is a cost of 1 (unit cost) to move from one state to another, draw a diagram in the space below that illustrates the search tree of explored states, given a breadth-first search. b) The heuristic values for each state are shown above. Given these values, draw a diagram in the space below that illustrates the search tree of explored states, given an A* search (the path cost is still a unit cost). Indicate the calculated cost at each node in the tree.
  • 7. Ways to Play • Analysis Strategy Move Tactics • If-then-else • Look ahead and evaluate • British Museum algorithm
  • 8. Game Trees • Game playing introduces an additional challenge: – an adversary who is trying to impede your advancement. – combinatorial explosion. • Apply a heuristic evaluation of game positions.
  • 9. Game Tree and Heuristic Evaluation • The X player would pursue those moves with the highest evaluation (that is 2 in this game) and avoid those game states that evaluate to 0 (or worse).
  • 10. Minimax Evaluation of Game Trees
  • 11. Minimax Evaluation of Game Trees Show the backed-up values for the nodes in the following game tree and show the branches that are pruned by alpha- beta pruning. For each branch pruned, write down the condition that is used to do the pruning. Follow the convention to examine the branches in the tree from left to right.
  • 13. Minimax with Alpha-Beta Pruning The game tree below illustrates a game position. It is Max's turn to move.
  • 14. Game Tree 1. Evaluate and fill the heuristic values for all the empty states in the game tree above. Assume that the minimax algorithm is being used, according to the labels on the right. 2. Indicate which states will not be explored if alpha-beta pruning is used. Circle all unvisited subtrees, and indicate next to them whether alpha-pruning or beta-pruning was used by writing ‘α’ or ‘β’ next to the state. Assume exploration from left to right.
  • 15. A game is being played on a more complicated board. A partial game tree is drawn, and leaf nodes have been scored using an (unknown) evaluation function e. a) In the dashed boxes, fill in the values of all internal nodes using the minimax algorithm. b) Cross o any nodes that are not evaluated when using alpha-beta pruning (assuming the standard left-to-right traversal of the tree). Game Tree