CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Artificial Intelligence Presentation
An Introduction to Artificial Intelligence
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 14, 2012.
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.
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Search Strategies Reading: Russell’s Chapter 3 1.
Artificial Intelligence (CS 461D)
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) January, 28, 2008.
Slide 1 Finish Search Jim Little UBC CS 322 – Search 7 September 24, 2014 Textbook §3.6.
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.
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.
Review: Search problem formulation
Searching the search space graph
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.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.8) February, 02, 2009.
1 Solving Problems by Searching. 2 Terminology State State Space Initial State Goal Test Action Step Cost Path Cost State Change Function State-Space.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009.
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
Uninformed Search (cont.)
Multiple Path Pruning, Iterative Deepening CPSC 322 – Search 7 Textbook § January 26, 2011.
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 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.
Branch & Bound, CSP: Intro CPSC 322 – CSP 1 Textbook § & January 28, 2011.
Computer Science CPSC 322 Lecture 9 (Ch , 3.7.6) Slide 1.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
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.
Lecture 3: Uninformed Search
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Advanced Artificial Intelligence Lecture 2: Search.
Artificial Intelligence for Games Informed Search (2) Patrick Olivier
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
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.
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
Fahiem Bacchus © 2005 University of Toronto 1 CSC384: Intro to Artificial Intelligence Search II ● Announcements.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) Sep, 26, 2010.
For Monday Read chapter 4 exercise 1 No homework.
Computer Science CPSC 322 Lecture 6 Analysis of A*, Search Refinements (Ch ) Slide 1.
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Search: Advanced Topics Computer Science cpsc322, Lecture 9
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Branch & Bound, Summary of Advanced Topics
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSCE 580 Artificial Intelligence Ch.3 [P]: Searching
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
EA C461 – Artificial Intelligence
Computer Science cpsc322, Lecture 10
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Iterative Deepening CPSC 322 – Search 6 Textbook § 3.7.3
Iterative Deepening and Branch & Bound
CS 416 Artificial Intelligence
Presentation transcript:

CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010

CPSC 322, Lecture 7Slide 2 Course Announcements Posted on WebCT Answers for Second Practice Exercise (uninformed Search) Third Practice Exercise : Heuristic Search

CPSC 322, Lecture 9Slide 3 Lecture Overview Recap A* (applications…) Branch & Bound A * tricks Other Pruning Dynamic Programming

Sample A* applications An Efficient A* Search Algorithm For Statistical Machine Translation The Generalized A* Architecture. Journal of Artificial Intelligence Research (2007) Machine Vision … Here we consider a new compositional model for finding salient curves. Factored A*search for models over sequences and trees International Conference on AI. 2003…. It starts saying… The primary challenge when using A* search is to find heuristic functions that simultaneously are admissible, close to actual completion costs, and efficient to calculate… applied to NLP and BioInformatics CPSC 322, Lecture 9Slide 4

CPSC 322, Lecture 9Slide 5 Lecture Overview Recap A* (applications…) Branch & Bound A * tricks Other Pruning Dynamic Programming

CPSC 322, Lecture 9Slide 6 Branch-and-Bound Search What is the biggest advantage of A*? What is the biggest problem with A*? Possible Solution:

CPSC 322, Lecture 9Slide 7 Branch-and-Bound Search Algorithm Follow exactly the same search path as depth-first search treat the frontier as a stack: expand the most-recently added path first the order in which neighbors are expanded can be governed by some arbitrary node-ordering heuristic

CPSC 322, Lecture 9Slide 8 Branch-and-Bound Search Algorithm Keep track of a lower bound and upper bound on solution cost at each path lower bound: LB(p) = f(p) = cost(p) + h(p) upper bound: UB = cost of the best solution found so far. if no solution has been found yet, set the upper bound to . When a path p is selected for expansion: if LB(p)  UB, remove p from frontier without expanding it (pruning) else expand p, adding all of its neighbors to the frontier

CPSC 322, Lecture 9Slide 9 Branch-and-Bound Analysis Completeness: no, for the same reasons that DFS isn't complete however, for many problems of interest there are no infinite paths and no cycles hence, for many problems B&B is complete Time complexity: O(b m ) Space complexity:….. Branch & Bound has the same space complexity as…. this is a big improvement over …………..! Optimality: ……...

CPSC 322, Lecture 9Slide 10 Lecture Overview Recap A* Branch & Bound A * tricks Pruning Cycles and Repeated States Dynamic Programming

CPSC 322, Lecture 9Slide 11 Other A * Enhancements The main problem with A * is that it uses exponential space. Branch and bound was one way around this problem. Are there others? ……. Memory-bounded A *

CPSC 322, Lecture 9Slide 12 (Heuristic) Iterative Deepening – IDA* B & B can still get stuck in infinite (extremely long) paths Search depth-first, but to a fixed depth if you don't find a solution, increase the depth tolerance and try again depth is measured in……………… Counter-intuitively, the asymptotic complexity is not changed, even though we visit paths multiple times (go back to slides on uninformed ID)

CPSC 322, Lecture 9Slide 13 Memory-bounded A * Iterative deepening A* and B & B use a tiny amount of memory what if we've got more memory to use? keep as much of the fringe in memory as we can if we have to delete something: delete the worst paths (with …………………………..) ``back them up'' to a common ancestor p pnpn p1p1

CPSC 322, Lecture 9Slide 14 Lecture Overview Recap A* Branch & Bound A * tricks Pruning Cycles and Repeated States Dynamic Programming

CPSC 322, Lecture 10Slide 15 Cycle Checking You can prune a path that ends in a node already on the path. This pruning cannot remove an optimal solution. The time is ………………… in path length.

CPSC 322, Lecture 10Slide 16 Repeated States / Multiple Paths Failure to detect repeated states can turn a linear problem into an exponential one!

CPSC 322, Lecture 10Slide 17 Multiple-Path Pruning You can prune a path to node n that you have already found a path to (if the new path is longer – more costly).

CPSC 322, Lecture 10Slide 18 Multiple-Path Pruning & Optimal Solutions Problem: what if a subsequent path to n is shorter than the first path to n ? You can remove all paths from the frontier that use the longer path. (as these can’t be optimal)

CPSC 322, Lecture 10Slide 19 Multiple-Path Pruning & Optimal Solutions Problem: what if a subsequent path to n is shorter than the first path to n ? You can change the initial segment of the paths on the frontier to use the shorter path.

Pruning Cycles CPSC 322, Lecture 10Slide 20 Repeated States Example

CPSC 322, Lecture 9Slide 21 Lecture Overview Recap A* Branch & Bound A * tricks Pruning Cycles and Repeated States Dynamic Programming

CPSC 322, Lecture 9Slide 22 Idea: for statically stored graphs, build a table of dist(n) the actual distance of the shortest path from node n to a goal. This is the perfect…….. This can be built backwards from the goal: Dynamic Programming a b c g gbcagbca 2 d 1 2

CPSC 322, Lecture 9Slide 23 But there are at least two main problems: You need enough space to store the graph. The dist function needs to be recomputed for each goal Dynamic Programming This can be used locally to determine what to do. From each node n go to its neighbor which minimizes a b c g d

CPSC 322, Lecture 7Slide 24 Learning Goals for today’s class Define/read/write/trace/debug different search algorithms With / Without cost Informed / Uninformed Pruning cycles and Repeated States

CPSC 322, Lecture 9Slide 25 Next class Recap Search Start Constraint Satisfaction Problems (CSP) Chp 4.