Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial - 1 Course: CS60045 Pallab Dasgupta Professor,

Similar presentations


Presentation on theme: "Tutorial - 1 Course: CS60045 Pallab Dasgupta Professor,"— Presentation transcript:

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

2 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

3 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.

4 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

5 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) ……. ……..

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

7 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

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

9 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

10 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

11 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

12 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

13 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

14 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

15 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

16 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>

17 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

18 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

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


Download ppt "Tutorial - 1 Course: CS60045 Pallab Dasgupta Professor,"

Similar presentations


Ads by Google