{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS 188 - Spring 2010 - Abbeel - Midterm 1 (solution)

CS 188 - Spring 2010 - Abbeel - Midterm 1 (solution) - CS...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 188 Spring 2010 Introduction to Artificial Intelligence Midterm Exam Solutions Q1. [15 pts] Search Traces Each of the trees (G1 through G5) was generated by searching the graph (below, left) with a graph search algorithm. Assume children of a node are visited in alphabetical order. Each tree shows only the nodes that have been expanded . Numbers next to nodes indicate the relevant “score” used by the algorithm’s priority queue. The start state is A, and the goal state is G. For each tree, indicate: 1. Whether it was generated with depth first search, breadth first search, uniform cost search, or A * search. Algorithms may appear more than once. 2. If the algorithm uses a heuristic function, say whether we used H1 = { h ( A ) = 3, h ( B ) = 6, h ( C ) = 4, h ( D ) = 3 } H2 = { h ( A ) = 3, h ( B ) = 3, h ( C ) = 0, h ( D ) = 1 } 3. For all algorithms, say whether the result was an optimal path (assuming we want to minimize sum of link costs). If the result was not optimal, state why the algorithm found a suboptimal path. Please fill in your answers on the next page. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
(a) [3 pts] G1 : 1. Algorithm: Breadth-First search 2. Heuristic (if any): None 3. Did it find least-cost path? If not, why? No. Breadth-first search will only find a path with the minimum number of edges. It does not consider edge cost at all. (b) [3 pts] G2 : 1. Algorithm: A * search 2. Heuristic (if any): H1 3. Did it find least-cost path? If not, why? No. A * search is only guaranteed to find an optimal solution if the heuristic is admissible. H 1 is not admissible. (c) [3 pts] G3 : 1. Algorithm: Depth-First Search 2. Heuristic (if any): None 3. Did it find least-cost path? If not, why? No. Depth first search simply finds any solution - there are no guarantees of optimality. (d) [3 pts] G4 : 1. Algorithm: A * search 2. Heuristic (if any): H2 3. Did it find least-cost path? If not, why? Yes. H2 is an admissible heuristic; therefore, A * finds the optimal solution. (e) [3 pts] G5 : 1. Algorithm: Uniform Cost Search 2. Heuristic (if any): None 3. Did it find least-cost path? If not, why? Yes. Uniform cost search is guaranteed to find a shortest-cost path. 2
Background image of page 2
Q2. [16 pts] Multiple-choice and short-answer questions In the following problems please choose all the answers that apply, if any. You may circle more than one answer. You may also circle no answers (none of the above) (a) [2 pts] Consider two consistent heuristics, H 1 and H 2 , in an A * search seeking to minimize path costs in a graph. Assume ties don’t occur in the priority queue. If H 1 ( s ) H 2 ( s ) for all s, then (i) A * search using H 1 will find a lower cost path than A * search using H 2 . (ii) A * search using H 2 will find a lower cost path than A * search using H 1 . (iii) A * search using H 1 will not expand more nodes than A * search using H 2 . (iv) A * search using H 2 will not expand more nodes than A * search using H 1 . (iv). Since H 2 is less optimistic, it returns values closer to the real cost to go, and thereby better guides the search. Heuristics do not affect the length of the path found – A * will eventually find the optimal path for an admissible heuristic.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}