CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009.

Slides:



Advertisements
Similar presentations
CPSC 322, Lecture 7Slide 1 Heuristic Search Computer Science cpsc322, Lecture 7 (Textbook Chpt 3.5) January, 19, 2009.
Advertisements

Review: Search problem formulation
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 14, 2012.
Heuristic Search Jim Little UBC CS 322 – Search 4 September 17, 2014 Textbook §
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 11, 2013.
Traveling Salesperson Problem
Solving Problem by Searching
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
CSC 423 ARTIFICIAL INTELLIGENCE
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) January, 28, 2008.
Slide 1 Heuristic Search: BestFS and A * Jim Little UBC CS 322 – Search 5 September 19, 2014 Textbook § 3.6.
Slide 1 Search: Advanced Topics Jim Little UBC CS 322 – Search 5 September 22, 2014 Textbook § 3.6.
State Space Search Algorithms CSE 472 Introduction to Artificial Intelligence Autumn 2003.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
CPSC 322 Introduction to Artificial Intelligence October 27, 2004.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) January, 12, 2009.
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) January, 25, 2010.
Search: Representation and General Search Procedure CPSC 322 – Search 1 January 12, 2011 Textbook § 3.0 –
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010.
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.3 [P]: Searching Fall 2009 Marco Valtorta.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Find a Path s A D B E C F G Heuristically Informed Methods  Which node do I expand next?  What information can I use to guide this.
Uninformed Search (cont.)
Multiple Path Pruning, Iterative Deepening CPSC 322 – Search 7 Textbook § January 26, 2011.
Problem Solving and Search Andrea Danyluk September 11, 2013.
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.6) Sept, 23, 2013.
Computer Science CPSC 322 Lecture 4 Search: Intro (textbook Ch: ) 1.
Computer Science CPSC 322 Lecture Heuristic Search (Ch: 3.6, 3.6.1) Slide 1.
Computer Science CPSC 322 Lecture A* and Search Refinements (Ch 3.6.1, 3.7.1, 3.7.2) Slide 1.
Computer Science CPSC 322 Lecture 9 (Ch , 3.7.6) Slide 1.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
Informed Search Strategies Lecture # 8 & 9. Outline 2 Best-first search Greedy best-first search A * search Heuristics.
For Monday Read chapter 4, section 1 No homework..
Search with Costs and Heuristic Search 1 CPSC 322 – Search 3 January 17, 2011 Textbook §3.5.3, Taught by: Mike Chiang.
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
Heuristic Search: A* 1 CPSC 322 – Search 4 January 19, 2011 Textbook §3.6 Taught by: Vasanth.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
CSC3203: AI for Games Informed search (1) Patrick Olivier
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Slides by: Eric Ringger, adapted from slides by Stuart Russell of UC Berkeley. CS 312: Algorithm Design & Analysis Lecture #36: Best-first State- space.
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.6) Sept, 21, 2010.
CPSC 322, Lecture 6Slide 1 Uniformed Search (cont.) Computer Science cpsc322, Lecture 6 (Textbook finish 3.5) Sept, 17, 2012.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 12, 2012.
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
Chapter 3.5 and 3.6 Heuristic Search Continued. Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
Artificial Intelligence Lecture No. 8 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
For Monday Read chapter 4 exercise 1 No homework.
CPSC 322, Lecture 7Slide 1 Heuristic Search Computer Science cpsc322, Lecture 7 (Textbook Chpt 3.6) Sept, 20, 2013.
Computer Science CPSC 322 Lecture 6 Analysis of A*, Search Refinements (Ch ) Slide 1.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Computer Science CPSC 322 Lecture 5 Heuristic Search and A* (Ch: 3.6, 3.6.1) Slide 1.
Computer Science cpsc322, Lecture 7
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Heuristic Search: BestFS and A* Computer Science cpsc322, Lecture 8
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Artificial Intelligence
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Iterative Deepening CPSC 322 – Search 6 Textbook § 3.7.3
Iterative Deepening and Branch & Bound
Presentation transcript:

CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009

CPSC 322, Lecture 7Slide 2 Course Announcements Posted on WebCT Second Practice Exercise (uninformed Search) Assignment 1 DEPARTMENT OF COMPUTER SCIENCE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Distinguished Lecture Series Speaker: Michael Littman Rutgers University Date: Thursday, January 22, 2009 Time: 3:30 - 4:50pm Venue: Hugh Dempster Pavilion Room 310 Title: Efficiently Learning to Behave Efficiently

CPSC 322, Lecture 8Slide 3 Lecture Overview Recap Heuristic Function Best First Search A*

CPSC 322, Lecture 6Slide 4 Admissible heuristic for Vacuum world? states? Where it is dirty and robot location actions? Left, Right, Suck Possible goal test? no dirt at all locations

CPSC 322, Lecture 8Slide 5 Lecture Overview Recap Heuristic Function Best First Search A*

CPSC 322, Lecture 7Slide 6 Best-First Search Idea: select the path whose end is closest to a goal according to the heuristic function. Best-First search selects a path on the frontier with minimal h-value (for the end node). It treats the frontier as a priority queue ordered by h. (similar to ?) This is a greedy approach: it always takes the path which appears locally best

CPSC 322, Lecture 7Slide 7 Analysis of Best-First Search Complete no: a low heuristic value can mean that a cycle gets followed forever. Optimal: no (why not?) Time complexity is O(b m ) Space complexity is O(b m )

CPSC 322, Lecture 8Slide 8 Lecture Overview Recap Heuristic Function Best First Search A* Search Strategy

CPSC 322, Lecture 8Slide 9 A * is a mix of: lowest-cost-first and best-first search A * treats the frontier as a priority queue ordered by f(p)= It always selects the node on the frontier with the ………….. estimated …………….distance. A * Search Algorithm

CPSC 322, Lecture 8Slide 10 Analysis of A * Let's assume that arc costs are strictly positive. Time complexity is O(b m ) the heuristic could be completely uninformative and the edge costs could all be the same, meaning that A * does the same thing as BFS Space complexity is O(b m ) like BFS, A * maintains a frontier which grows with the size of the tree Completeness: yes. Optimality: yes.

CPSC 322, Lecture 8Slide 11 Optimality of A * If A * returns a solution, that solution is guaranteed to be optimal, as long as When the branching factor is finite arc costs are strictly positive h(n) is an underestimate of the length of the shortest path from n to a goal node, and is non-negative Theorem If A * selects a path p, p is the shortest (i.e., lowest-cost) path.

CPSC 322, Lecture 8Slide 12 Why is A * optimal? Assume for contradiction that some other path p' is actually the shortest path to a goal Consider the moment when p is chosen from the frontier. Some part of path p' will also be on the frontier; let's call this partial path p''. p p' p''

CPSC 322, Lecture 8Slide 13 Why is A * optimal? (cont’) Because p was expanded before p'', Because p is a goal, Thus Because h is admissible, cost(p'') + h(p'')  cost(p') for any path p' to a goal that extends p'' Thus for any other path p' to a goal. This contradicts our assumption that p' is the shortest path. p p' p''

CPSC 322, Lecture 8Slide 14 Optimal efficiency of A * In fact, we can prove something even stronger about A * : in a sense (given the particular heuristic that is available) no search algorithm could do better! Optimal Efficiency: Among all optimal algorithms that start from the same start node and use the same heuristic h, A * expands the minimal number of paths.

CPSC 322, Lecture 9Slide 15 Why is A * optimally efficient? Theorem: A * is optimally efficient. Let f* be the cost of the shortest path to a goal. Consider any algorithm A' the same start node as A *, uses the same heuristic fails to expand some path p' expanded by A *,for which f(p') < f*. Assume that A' is optimal. p p'

CPSC 322, Lecture 9Slide 16 Why is A * optimally efficient? (cont’) Consider a different search problem identical to the original on which h returns the same estimate for each path except that p' has a child path p'' which is a goal node, and the true cost of the path to p'' is f(p'). that is, the edge from p' to p'' has a cost of h(p'): the heuristic is exactly right about the cost of getting from p' to a goal. p'' p p'

CPSC 322, Lecture 9Slide 17 Why is A * optimally efficient? (cont’) A' would behave identically on this new problem. The only difference between the new problem and the original problem is beyond path p', which A' does not expand. Cost of the path to p'' is lower than cost of the path found by A'. This violates our assumption that A' is optimal. p'' p p'

CPSC 322, Lecture 7Slide 18 Learning Goals for today’s class Define/read/write/trace/debug different search algorithms With / Without cost Informed / Uninformed Formally prove A* optimality. Define optimally efficient and formally prove that A* is optimally efficient

CPSC 322, Lecture 8Slide 19 Next class Finish Search (finish Chpt 3) Branch-and-Bound A* enhancements Non-heuristic Pruning Backward Search Dynamic Programming