Presentation is loading. Please wait.

Presentation is loading. Please wait.

DCP 1172, Homework 2 1 Homework 2 for DCP-1172 (2004.10.26) This time, we have 3 different homework assignments.  Homework assignment 2-1 (50%, Ch3 &

Similar presentations


Presentation on theme: "DCP 1172, Homework 2 1 Homework 2 for DCP-1172 (2004.10.26) This time, we have 3 different homework assignments.  Homework assignment 2-1 (50%, Ch3 &"— Presentation transcript:

1 DCP 1172, Homework 2 1 Homework 2 for DCP-1172 (2004.10.26) This time, we have 3 different homework assignments.  Homework assignment 2-1 (50%, Ch3 & Ch4.)  Homework assignment 2-2 (25%, Ch5.)  Homework assignment 2-3 (25%, Ch6.)  It is due on Nov. 12.

2 DCP 1172, Homework 2 2 Homework 2-1 : Search Algorithms (AIMA-ch3&4) The following figure shows a portion of a partially expanded search tree. Each arc between nodes is labeled with the cost of the corresponding operator, and the leaves are labeled with the value of the heuristic function, h. Which node (use the node’s letter) will be expanded next by each of the following search algorithms? (a) Depth-first search (b) Breadth-first search (c) Uniform-cost search (d) Greedy search (e) A* search 5 D 5 A C 5 4 19 6 3 h=15 B FGE h=8h=12h=10 h=18 H h=20 h=14

3 DCP 1172, Homework 2 3 Homework 2-2a: Constraint Satisfaction Problems (AIMA-ch5, Ex.5-13) Consider the following logic puzzle: In five houses, each with a different color, live 5 persons of different nationalities, each of whom prefer a different brand of cigarette, a different drink, and a different pet. Give the following facts, the question to answer is: “Where does the zebra live, and in which house do they drink water “ ▪ The Englishman lives in the red house. ▪ The Spaniard owns the dog. ▪ The Norwegian lives in the first house on the left. ▪ Kools are smoked in the yellow house. ▪ The man who smokes Chesterfields lives in the house next to the man with the fox. ▪ The Norwegian lives next to the blue house.

4 DCP 1172, Homework 2 4 Homework 2-2b: Constraint Satisfaction Problems (cont., AIMA-ch5, Ex.5-13) ▪ The Winston smoker owns snails. ▪ The Lucky Strike smoker drinks orange juice. ▪ The Ukrainian drinks tea. ▪ The Japanese smokes Parliaments. ▪ Kools are smoked I the house next to the house where the horse is kept. ▪ Coffee is drunk in the green house. ▪ The Green house is immediately to the right (your right) of the ivory house. ▪ Milk is drunk in the middle house. Discuss different representations of the problem as a CSP. Why would one prefer one representation over another ?

5 DCP 1172, Homework 2 5 Homework 2-3 : Adversarial Search (AIMA-ch6) (a) Compute the backed-up values computed by the minimax algorithm. Show your answer by writing values at the appropriate nodes in the above tree. (b) Compute the backed-up values computed by the alpha-beta algorithm. What nodes will not be examined by the alpha-beta pruning algorithm? (c) What move should Max choose once the values have been backed-up all the way? A B C D E FG HIJ K LMNOPQRSTUVWYX 2385760152842 10 Max Min Consider the following game tree in which the evaluation function values are shown below each leaf node. Assume that the root node corresponds to the maximizing player. Assume the search always visits children left-to-right.

6 DCP 1172, Homework 2 6 Answer Sections Homework 2-1 Page 7-26 Homework 2-2 Homework 2-3

7 DCP 1172, Homework 2 7 HW#2-1: Depth-first search Node queue:initialization #statedepthpath costparent # 1A00--

8 DCP 1172, Homework 2 8 HW#2-1: Depth-first search Node queue:add successors to queue front; empty queue from top #statedepthpath costparent # 2B131 3C1191 4D151 1A00--

9 DCP 1172, Homework 2 9 HW#2-1: Depth-first search Node queue:add successors to queue front; empty queue from top #statedepthpath costparent # 5E272 6F282 7G282 8H292 2B131 3C1191 4D151 1A00--

10 DCP 1172, Homework 2 10 HW#2-1: Depth-first search Node queue:add successors to queue front; empty queue from top #statedepthpath costparent # 5E272 6F282 7G282 8H292 2B131 3C1191 4D151 1A00--

11 DCP 1172, Homework 2 11 HW#2-1: Breadth-first search Node queue:initialization #statedepthpath costparent # 1A00--

12 DCP 1172, Homework 2 12 HW#2-1: Breadth-first search Node queue:add successors to queue end; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3C1191 4D151

13 DCP 1172, Homework 2 13 HW#2-1: Breadth-first search Node queue:add successors to queue end; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3C1191 4D151 5E272 6F282 7G282 8H292

14 DCP 1172, Homework 2 14 HW#2-1: Breadth-first search Node queue:add successors to queue end; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3C1191 4D151 5E272 6F282 7G282 8H292

15 DCP 1172, Homework 2 15 HW#2-1: Uniform-cost search Node queue:initialization #statedepthpath costparent # 1A00--

16 DCP 1172, Homework 2 16 HW#2-1: Uniform-cost search Node queue:add successors to queue so that entire queue is sorted by path cost so far; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3D151 4C1191

17 DCP 1172, Homework 2 17 HW#2-1: Uniform-cost search Node queue:add successors to queue so that entire queue is sorted by path cost so far; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3D151 5E272 6F282 7G282 8H292 4C1191

18 DCP 1172, Homework 2 18 HW#2-1: Uniform-cost search Node queue:add successors to queue so that entire queue is sorted by path cost so far; empty queue from top #statedepthpath costparent # 1A00-- 2B131 3D151 5E272 6F282 7G282 8H292 4C1191

19 DCP 1172, Homework 2 19 HW#2-1: Greedy search Node queue:initialization #statedepthpathcosttotalparent # costto goalcost 1A002020--

20 DCP 1172, Homework 2 20 HW#2-1: Greedy search Node queue:Add successors to queue, sorted by cost to goal. #statedepthpathcosttotalparent # costto goalcost 1A002020-- 2B1314171 3D1515201 4C11918371 Sort key

21 DCP 1172, Homework 2 21 HW#2-1: Greedy search Node queue:Add successors to queue, sorted by cost to goal. #statedepthpathcosttotalparent # costto goalcost 1A002020-- 2B1314171 5G288162 7E2710172 6H2910192 8F2812202 3D1515201 4C11918371

22 DCP 1172, Homework 2 22 HW#2-1: Greedy search Node queue:Add successors to queue, sorted by cost to goal. #statedepthpathcosttotalparent # costto goalcost 1A002020-- 2B1314171 5G288162 7E2710172 6H2910192 8F2812202 3D1515201 4C11918371

23 DCP 1172, Homework 2 23 HW#2-1: A* search Node queue:initialization #statedepthpathcosttotalparent # costto goalcost 1A002020--

24 DCP 1172, Homework 2 24 HW#2-1: A* search Node queue:Add successors to queue, sorted by total cost. #statedepthpathcosttotalparent # costto goalcost 1A002020-- 2B1314171 3D1515201 4C11918371 Sort key

25 DCP 1172, Homework 2 25 HW#2-1: A* search Node queue:Add successors to queue front, sorted by total cost. #statedepthpathcosttotalparent # costto goalcost 1A002020-- 2B1314171 5G288162 6E2710172 7H2910192 3D1515201 8F2812202 4C11918371

26 DCP 1172, Homework 2 26 HW#2-1: A* search Node queue:Add successors to queue front, sorted by total cost. #statedepthpathcosttotalparent # costto goalcost 1A002020-- 2B1314171 5G288162 6E2710172 7H2910192 3D1515201 8F2812202 4C11918371


Download ppt "DCP 1172, Homework 2 1 Homework 2 for DCP-1172 (2004.10.26) This time, we have 3 different homework assignments.  Homework assignment 2-1 (50%, Ch3 &"

Similar presentations


Ads by Google