Search: Advanced Topics Computer Science cpsc322, Lecture 9

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 14, 2012.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
1 Blind (Uninformed) Search (Where we systematically explore alternatives) R&N: Chap. 3, Sect. 3.3–5.
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
Slide 1 Finish Search Jim Little UBC CS 322 – Search 7 September 24, 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 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010.
UnInformed Search What to do when you don’t know anything.
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.
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009.
Uninformed Search (cont.)
Multiple Path Pruning, Iterative Deepening CPSC 322 – Search 7 Textbook § January 26, 2011.
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.
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
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
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.
Computer Science CPSC 322 Lecture 6 Analysis of A*, Search Refinements (Ch ) Slide 1.
Artificial Intelligence Solving problems by searching.
Computer Science CPSC 322 Lecture 5 Heuristic Search and A* (Ch: 3.6, 3.6.1) Slide 1.
Lecture 3: Uninformed Search
Computer Science cpsc322, Lecture 7
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
BackTracking CS255.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Branch & Bound, Summary of Advanced Topics
Computer Science cpsc322, Lecture 13
Last time: Problem-Solving
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Uninformed Search Chapter 3.4.
Artificial Intelligence (CS 370D)
Artificial Intelligence Problem solving by searching CSC 361
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Uninformed Search Introduction to Artificial Intelligence
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Artificial Intelligence
Russell and Norvig: Chapter 3, Sections 3.4 – 3.6
Computer Science cpsc322, Lecture 13
Computer Science cpsc322, Lecture 2
CS 188: Artificial Intelligence Fall 2008
What to do when you don’t know anything know nothing
EA C461 – Artificial Intelligence
COMP 8620 Advanced Topics in AI
Searching for Solutions
Principles of Computing – UFCFA3-30-1
Computer Science cpsc322, Lecture 10
Artificial Intelligence
Problem Spaces & Search
Iterative Deepening CPSC 322 – Search 6 Textbook § 3.7.3
Minimax strategies, alpha beta pruning
Problem Spaces & Search
Iterative Deepening and Branch & Bound
UNINFORMED SEARCH -BFS -DFS -DFIS - Bidirectional
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #2
CS 416 Artificial Intelligence
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Minimax strategies, alpha beta pruning
Presentation transcript:

Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) Sept, 24, 2010 Lecture 9 CPSC 322, Lecture 9

Recap A* Branch & Bound A* tricks Other Pruning Lecture Overview CPSC 322, Lecture 9

Branch-and-Bound Search What is the biggest advantage of A*? What is the biggest problem with A*? Possible Solution: A search strategy often not covered in AI, but widely used in practice Uses a heuristic function: like A*, can avoid expanding some unnecessary paths Depth-first: modest memory demands in fact, some people see ``branch and bound'' as a broad family that includes A* these people would use the term ``depth-first branch and bound'‘ CPSC 322, Lecture 9

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 Branch and bound (BB) is a general algorithm for finding optimal solutions of various optimization problems, especially in discrete and combinatorial optimization. It consists of a systematic enumeration of all candidate solutions, where large subsets of fruitless candidates are discarded en masse, by using upper and lower estimated bounds of the quantity being optimized. CPSC 322, Lecture 9

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 9

Branch-and-Bound Analysis Complete ? Optimal ? Space complexity? Time complexity? yes no It depends yes no It depends O(bm) O(mb) O(bm) O(b+m)

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(bm) Space complexity:….. Branch & Bound has the same space complexity as…. this is a big improvement over …………..! Optimality: ……... Particularly applicable when there are many paths to the goal CPSC 322, Lecture 9

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

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 9

(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……………… Then update with the ………………….. that passed the previous bound depth is measured in f value At each iteration the cutoff value is the smallest f-cost of any node that exceeded the cutoff at the previous iteration Ok with unit cost, difficulties with real-valued costs CPSC 322, Lecture 9

Analysis of Iterative Deepening A* (IDA*) Complete and optimal: Space complexity: Time complexity: yes no It depends O(bm) O(mb) O(bm) O(b+m) O(bm) O(mb) O(bm) O(b+m)

(Heuristic) Iterative Deepening – IDA* Counter-intuitively, the asymptotic complexity is not changed, even though we visit paths multiple times (go back to slides on uninformed ID) depth is measured in f value At each iteration the cutoff value is the smallest f-cost of any node that exceeded the cutoff at the previous iteration Ok with unit cost, difficulties with real-valued costs CPSC 322, Lecture 9

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 The oldest if they all have the same f-value h(p)=min( (cost(pi) – cost(p)) + h(pi) ) underestimate! p1 pn CPSC 322, Lecture 9

MBA*: Compute New h(p) p p1 pn CPSC 322, Lecture 9 The oldest if they all have the same f-value h(p)=min( (cost(pi) – cost(p)) + h(pi) ) underestimate! CPSC 322, Lecture 9

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 min max p The oldest if they all have the same f-value h(p)=min( (cost(pi) – cost(p)) + h(pi) ) underestimate! max min p1 pn CPSC 322, Lecture 9

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

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. Using depth-first methods, with the graph explicitly stored, this can be done in constant time.?? CPSC 322, Lecture 10

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

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). This entails storing all nodes you have found paths to. Multiple-path pruning subsumes cycle check. CPSC 322, Lecture 10

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) You’ll have to regenerated them CPSC 322, Lecture 10

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. Can be computationally costly CPSC 322, Lecture 10

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 7

Next class Dynamic Programming Recap Search Start Constraint Satisfaction Problems (CSP) Chp 4. Start working on assignment-1 ! CPSC 322, Lecture 9