cs460 spring 2011

36
CS460 Spring 2011 Review of Search

Upload: emory

Post on 22-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

CS460 Spring 2011. Review of Search. Overview. Uninformed search Informed search Local search Adversarial search. Search Problem Formulation. One possible heuristic evaluation function for a state would be the amount of time required - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS460 Spring 2011

CS460Spring 2011

Review of Search

Page 2: CS460 Spring 2011

Overview

• Uninformed search• Informed search• Local search• Adversarial search

Page 3: CS460 Spring 2011

Search Problem Formulation

Page 4: CS460 Spring 2011
Page 5: CS460 Spring 2011
Page 6: CS460 Spring 2011
Page 7: CS460 Spring 2011
Page 8: CS460 Spring 2011

One possible heuristic evaluation function for a state would be the amount of time required for the robot to go back to the lander from the location of the state; this is clearly admissible. What would be a more powerful, but still admissible, heuristic for this problem? (don’t worryabout whether it is consistent or not).

Page 9: CS460 Spring 2011

One possible stronger heuristic is the maximum, over uncollected rocks r, of the time takento go from current location to r, plus the time taken to get from r to the lander.

Page 10: CS460 Spring 2011

Prob1: Uninformed Tree

Page 11: CS460 Spring 2011
Page 12: CS460 Spring 2011
Page 13: CS460 Spring 2011

Prob 2: Informed (heuristic) Graph

Page 14: CS460 Spring 2011
Page 15: CS460 Spring 2011
Page 16: CS460 Spring 2011
Page 17: CS460 Spring 2011
Page 18: CS460 Spring 2011
Page 19: CS460 Spring 2011
Page 20: CS460 Spring 2011
Page 21: CS460 Spring 2011

“Expanded” List• Path length is additive

– Shortest path from S to G via X = shortest path from S to G + shortest path from X to G

• So, we only need to keep around the single best path from S to any state X, when , in a priority queue Q.

• If we find a new path to a state that is already in Q, then we can discard the longer one

• So, once we expand one path to state X, we don’t need to consider (extend) any other paths to X. We can keep a list of these states. Call it Expanded List. If the state of the search node we pull off of Q is in the Expanded List, we discard the node. When we use the Expanded List this way, we call it ‘strict”.

Page 22: CS460 Spring 2011

Non-strict Expanded List

• When using a heuristic, as in A*, we don’t know for sure whether we have a node with a shortest path, we are partly guessing

• So, discarding the next node on Q might risk losing optimal path

• Non-strict: if the path length from the new node is < path length from node already on expanded list, then replace the old node with the new node.

Page 23: CS460 Spring 2011
Page 24: CS460 Spring 2011

Adversarial (game) search

Page 25: CS460 Spring 2011
Page 26: CS460 Spring 2011
Page 27: CS460 Spring 2011
Page 28: CS460 Spring 2011

Complexity Calculation

Problem 3.5 from textbook (3rd ed). N n queens, Assume each action incrementally adds one queen to the state. The state space has cube root of n-factorial or more states.

Page 29: CS460 Spring 2011
Page 30: CS460 Spring 2011

Another Search Problem formulation

• 3.3 from text. In traveling from one Romanian city to another, let us say two friends have to get together, and at each stop, we have to wait till the other friend gets to his next stop. Let D(I,j) be the straight-line distance between cities I and j.

• Refer to the text, 3.3 a,b, c,d

Page 31: CS460 Spring 2011
Page 32: CS460 Spring 2011

5.3 from textbook. Pursuit-evasion game.

Page 33: CS460 Spring 2011
Page 34: CS460 Spring 2011
Page 35: CS460 Spring 2011
Page 36: CS460 Spring 2011