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

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 algorithms 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 (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 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 dont 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 ....
View Full Document

Page1 / 15

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

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online