Tutorial - 1 Course: CS60045 Pallab Dasgupta Professor,

Slides:



Advertisements
Similar presentations
And-Or Graphs CSCE 580 Spr03 Instructor: Marco Valtorta Hrishikesh J. Goradia Seang-Chan Ryu.
Advertisements

Games & Adversarial Search
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
This time: Outline Game playing The minimax algorithm
CS 561, Sessions Administrativia Assignment 1 due tuesday 9/24/2002 BEFORE midnight Midterm exam 10/10/2002.
Using Search in Problem Solving
Game Playing CSC361 AI CSC361: Game Playing.
Min-Max Trees Based on slides by: Rob Powers Ian Gent Yishay Mansour.
How computers play games with you CS161, Spring ‘03 Nathan Sturtevant.
Alpha-Beta Search. 2 Two-player games The object of a search is to find a path from the starting position to a goal position In a puzzle-type problem,
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Minimax.
Game Playing.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
Chapter 6 Adversarial Search. Adversarial Search Problem Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test.
Problem Reduction Search: AND/OR Graphs & Game Trees Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
For Friday Finish chapter 6 Program 1, Milestone 1 due.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Hamiltonian Cycles Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Trees Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT
Adversarial Search 2 (Game Playing)
Search: Games & Adversarial Search Artificial Intelligence CMSC January 28, 2003.
Adversarial Search and Game-Playing
Announcements Homework 1 Full assignment posted..
Last time: search strategies
Iterative Deepening A*
PENGANTAR INTELIJENSIA BUATAN (64A614)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Deadlock-free Packet Switching
Tutorial - Propositional Logic
Artificial Intelligence (CS 370D)
Expectimax Lirong Xia. Expectimax Lirong Xia Project 2 MAX player: Pacman Question 1-3: Multiple MIN players: ghosts Extend classical minimax search.
Dakota Ewigman Jacob Zimmermann
Games & Adversarial Search
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Announcements Homework 3 due today (grace period through Friday)
Alpha-Beta Search.
Games & Adversarial Search
Games & Adversarial Search
NIM - a two person game n objects are in one pile
CS 171 Discussion Session Week 3
Tree Searching.
Alpha-Beta Search.
Instructor: Vincent Conitzer
The Alpha-Beta Procedure
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Search and Game Playing
Alpha-Beta Search.
Expectimax Lirong Xia.
Minimax strategies, alpha beta pruning
Algorithms: Design and Analysis
Alpha-Beta Search.
Based on slides by: Rob Powers Ian Gent
Games & Adversarial Search
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Alpha-Beta Search.
CS60002: Distributed Systems
Games & Adversarial Search
Minimax strategies, alpha beta pruning
Games & Adversarial Search
Unit II Game Playing.
Presentation transcript:

Tutorial - 1 Course: CS60045 Pallab Dasgupta Professor, Dept. of Computer Sc & Engg

Apply DFBB on the following graph 1 A E 3 START 2 4 5 S -4 1 B D G GOAL 6 2 8 3 C

Solution C* = ∞ -> 6-> 3 OPEN CLOSED (S,0) (A,3)(B,6)(C,8) (E,4)(B,6)(C,8) (S,0)(A,3) (G,6)(D,9)(B,6)(C,8) (S,0)(A,3)(E,4) (D,9)(B,6)(C,8) (S,0)(A,3)(E,4)(G,6) (B,6)(C,8) (S,0)(A,3)(E,4)(G,6)(D,9) (D,2)(C,8) (S,0)(A,3)(E,4)(G,6)(B,6) (G,3)(C,8) (S,0)(A,3)(E,4)(B,6)(D,2) (C,8) (S,0)(A,3)(E,4)(B,6)(D,2)(G,3) (S,0)(A,3)(E,4)(B,6)(D,2)(G,3)(C,8) Terminate Note that the best cost is 6 here. Considering a strict less than comparison with the path cost will prune all entries in OPEN including (D,9),(B,6), (C,8) without further expansion.

Apply DFBB on the following graph 1 A E 3 -2 START 2 4 5 S -4 1 B D G GOAL 6 2 8 3 C

Solution C*=∞->6->3->1->…… OPEN CLOSED (S,0) (A,3)(B,6)(C,8) (E,4)(B,6)(C,8) (S,0)(A,3) (G,6)(D,9)(B,6)(C,8) (S,0)(A,3)(E,4) (D,9)(B,6)(C,8) (S,0)(A,3)(E,4)(G,6) (B,6)(C,8) (S,0)(A,3)(E,4)(G,6)(D,9) (D,2)(C,8) (S,0)(A,3)(E,4)(G,6)(B,6) (A,0)(G,3)(C,8) (S,0)(E,4)(B,6)(D,2) (B,4)(E,1)(G,3)(C,8) (S,0)(D,2)(A,0) (D,0)(E,1)(G,3)(C,8) (S,0)(A,0)(B,4) (A,-2)(G,1)(E,1)(C,8) (S,0)(B,4)(D,0) ……. ……..

Iterative Deepening Search B D C E F G H I J K GOAL INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Solution Depth(level) IDS A 1 A,B,C,D 2 A,B,E,C,F,G,D,H 3 A 1 A,B,C,D 2 A,B,E,C,F,G,D,H 3 A,B,E,C,F,G,I,D,H,J,K Advantages:- Always finds goal node Requires less memory Disadvantages:- 1)Visits same nodes again and again INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Perform BFS & DFS 6 1 5 4 2 7 3 8 10 9 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Solution – BFS Spanning Tree 1 4 2 3 5 7 8 10 9 6 1,4,2,3,5,8,7,10,9,6 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Solution – DFS Spanning Tree 1 4 3 10 2 9 8 7 1,4,3,10,9,2,8,7,5,6 5 6 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Sample problem on A* search Open = {D,G} {G} {D,E} {C,D} {S} {A,B} {F,G} {B,C} Closed = {S,A,B} {S,A,B,C,E} {S,A,B,C,E,D,F} {S,A} {S,A,B,C} {} {S} {S,A,B,C,E,D} S A C B D G E F START GOAL 2 3 1 6 4 3.5 Select : D Select : E Select : B Select : S Select : F Select : A Select : G GOAL TERMINATE Select : C Node g() f() S A B C D E F G 6 2 6 3 7 1 4 5 9 8 6 5 8.5 9.5 7 8 7 8 8 9 8 9

AO* : An Example AND NODE A OR NODE C B E F G H I L J K 18 16 14 10 7 START OR NODE 2 1 3 16 8 C 7 6 4 B SOLVED NODE 1 2 5 7 14 2 E F G H 7 9 1 I L J K 3 10 4 3

Adversarial Search 1. Find the value returned to the root node (i) without alpha-beta pruning and (ii) alpha-beta pruning. MAX MIN 4 8 9 3 2 -2 -1 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

V= 8 MAX MIN 4 8 9 3 2 -2 -1 V= 8 V= 2 V= 8 V= 9 V= 2 V= 9 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

4 8 9 3 2 -2 -1 V= 8 α= 8 β= ∞ 8 8 V= 2 α= 8 β= 8 V= 8 α=- ∞ β= 8 8 8 MAX MIN 4 8 9 3 2 -2 -1 8 8 V= 2 α= 8 β= 8 V= 8 α=- ∞ β= 8 8 8 8 V= 9 α=9 β=8 V= 2 α= 8 β= ∞ V= 8 α= 8 β= ∞ INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

2. The following game trees are for a three player game 2. The following game trees are for a three player game. The vector <x, y, z > in each terminal node represents the payoffs for Player-1, Player-2, and Player-3 respectively. The square nodes represent moves for Player-1, the circular nodes represent moves of Player-2 and the oval nodes represent moves for Player-3. a) The three player game may assume that the opponents are rational, that is, each player’s sole motive is to maximize the payoff of that player. Under this assumption, show the preferred choice of successor at each node by marking the relevant edges. P-1 P-2 P-3 <3,2,5> <2,2,6> <4,3,3> <4,4,2> <6,2,2> <3,3,4> <3,4,3> <5,3,2>

b) A more conservative approach for Player-1 is to choose the move without making the assumption of rational opponents. This situation allows Player-2 and Player-3 to conspire to minimize the payoff of Player-1. If this is the case, then show the preferred choice of successor at each node by marking the relevant edges. P-1 P-2 P-3 <3,2,5> <2,2,6> <4,3,3> <4,4,2> <6,2,2> <3,3,4> <3,4,3> <5,3,2> INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

c) Design a cut-off criterion similar to alpha-beta-pruning for the situation where Player-2 and Player-3 conspire against Player-1 to minimize the payoff for Player-1. Show the pruning on the following game tree. You don’t have to state the pruning criterion. P-1 P-2 P-3 <6,2,2> <3,3,4> <3,4,3> <5,3,2> <2,2,6> <3,2,5> <4,3,3> <4,4,2> INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

3. Perform alpha-beta pruning of the following tree. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR