Introducing Underestimates

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
Advertisements

Chapter 4: Informed Heuristic Search
Review: Search problem formulation
Notes Dijstra’s Algorithm Corrected syllabus.
Uninformed search strategies
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.
Traveling Salesperson Problem
Informed Search Methods How can we improve searching strategy by using intelligence? Map example: Heuristic: Expand those nodes closest in “as the crow.
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Review: Search problem formulation
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
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.
Search  Exhaustive/Blind Search Methods Depth First Search Breadth First Search  Heuristic Methods Hill Climbing Beam Search Best First Search…
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Informed Search Strategies
Graphs II Robin Burke GAM 376. Admin Skip the Lua topic.
Search: Heuristic &Optimal Artificial Intelligence CMSC January 16, 2003.
Informed State Space Search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
More advanced aspects of search Extensions of A*.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
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 (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
State space representations and search strategies - 2 Spring 2007, Juris Vīksna.
Searching for Solutions
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
CSCI 4310 Lecture 4: Search 2 – Including A*. Book Winston Chapters 4,5,6.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Traveling Salesperson Problem
Last time: search strategies
Last time: Problem-Solving
Search Methods – Lecture 5 Prof. Dieter Fensel (& James Scicluna)
Backtracking And Branch And Bound
Department of Computer Science
CSE (c) S. Tanimoto, 2002 Search Algorithms
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
Prof. Dechter ICS 270A Winter 2003
HW #1 Due 29/9/2008 Write Java Applet to solve Goats and Cabbage “Missionaries and cannibals” problem with the following search algorithms: Breadth first.
Problem Solving and Searching
What to do when you don’t know anything know nothing
Searching for Solutions
Problem Solving and Searching
Artificial Intelligence Chapter 9 Heuristic Search
Iterative Deepening CPSC 322 – Search 6 Textbook § 3.7.3
(1) Breadth-First Search  S Queue S
Heuristic Search Methods
HW 1: Warmup Missionaries and Cannibals
More advanced aspects of search
Iterative Deepening and Branch & Bound
UNINFORMED SEARCH -BFS -DFS -DFIS - Bidirectional
State-Space Searches.
Heaps By JJ Shepherd.
State-Space Searches.
Search.
HW 1: Warmup Missionaries and Cannibals
Search.
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
CSE (c) S. Tanimoto, 2004 Search Algorithms
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
State-Space Searches.
Basic Search Methods How to solve the control problem in production-rule systems? Basic techniques to find paths through state- nets. For the moment: -
Presentation transcript:

Introducing Underestimates OPTIMAL Search When cost of TRAVERSING the path should be minimized (even at expense of more complicated SEARCHING) : Uniform Cost Branch and Bound Introducing Underestimates Path Deletion A*

Re-introduce the costs of arcs in the NET B E C F G S 3 4 5 2 S A D B E C F G 3 2 4 5

Uniform cost algorithm = uniformed best-first 3 4 5 2 7 8 9 6 10 11 12 13 At each step, select the node with the lowest accumul-ated cost.

Uniform cost algorithm: 1. QUEUE <-- path only containing the root; 2. WHILE QUEUE is not empty AND goal is not reached DO remove the first path from the QUEUE; create new paths (to all children); reject the new paths with loops; add the new paths and sort the entire QUEUE; 3. IF goal reached THEN success; ELSE failure; (BY ACCUMULATED COST)

Problem: NOT always optimal! C 1 5 B 1 2 D 5 10 Uniform cost returns the path with cost 102, while there is a path with cost 25. G 100 E 5 15 F 5 20 5

The Branch-and-Bound principle Use any (complete) search method to find a path. Remove all partial paths that have an accumulated cost larger or equal than the found path. Continue search for the next path. Iterate. 3.5 S B D C G A 5 E 6 First goal reached 2 3 0.5 G X ignore

A weak integration of branch and bound in uniform cost: 100 B 5 S A C 1 2 102 Change the termination condition: only terminate when a path to a goal node HAS BECOME THE BEST PATH. F 5 D E 10 15 20 25

Optimal Uniform cost version: 1. QUEUE <-- path only containing the root; 2. WHILE QUEUE is not empty AND first path does not reach goal remove the first path from the QUEUE; create new paths (to all children); reject the new paths with loops; add the new paths and sort the entire QUEUE; 3. IF goal reached THEN success; ELSE failure; (by accumulated cost)

Example: 3 4 4 7 8 7 8 9 6 7 8 9 11 10 A D S S A D A B D S A B D D A E F 11 10

S A D B 8 E 9 F 11 10 B C E 11 12 S A D B E 9 F 11 10 C 12 D E 10 S A D B E F 11 10 C 12 A B 13 S A D B E F 11 10 C 12 13 E B F 15 14

S A D B E F 11 C 12 13 15 14 F G 13 Don’t stop yet! S A D B E F C 11 12 13 15 14 G B A C 15 S A D B E F C 13 15 14 G E F D 14 16 STOP!

Properties of extended uniform cost : Optimal path: If there exists a number  > 0, such that every arc has cost  , and if the branching factor is finite, Then extended uniform cost finds the optimal path (if one exists). Memory and speed: In the worst case, at least as bad as for breadth-first: needs additional sorting step after each path- expansion ! How to improve ?

Extension with heuristic estimates: Replace the ‘accumulated cost’ in the ‘extended uniform cost’ algorithm by a function: f(path) = cost(path) + h(endpoint_path) where: cost(path) = the accumulated cost of the partial path h(T) = a heuristic estimate of the cost remaining from T to a goal node f(path) = an estimate of the cost of a path extending the current path to reach a goal. +

Example: Reconsider the straight-line distance: B C F 4 3 2 5 Example: Reconsider the straight-line distance: h(T) = the straight-line distance from T to G D E G S A B C F 4 6.7 10.4 11 8.9 6.9 3

A D 3 + 10.4 = 13.4 4 + 8.9 = 12.9 S S A D 13.4 D A E 9 + 10.4 = 19.4 6 + 6.9 = 12.9 S A D E 13.4 19.4 E B F 10 + 3.0 = 13.0 11 + 6.7 = 17.7 S A D E B F 13.4 19.4 17.7 STOP! F G 13 + 0.0 = 13.0

Estimate-extended Uniform cost algorithm: 1. QUEUE <-- path only containing the root; 2. WHILE QUEUE is not empty AND first path does not reach goal remove the first path from the QUEUE; create new paths (to all children); reject the new paths with loops; add the new paths and sort the entire QUEUE; 3. IF goal reached THEN success; ELSE failure; (by f = cost + h)

Optimality With the same condition on the arcs-costs and on the branching factor: IF for all T: h(T) is an UNDERestimate of the remaining cost to a goal node THEN estimate-extended uniform cost is optimal. Intuition: includes underestimated remaining cost S A D E B F 13.4 19.4 17.7 G 13 G with real remaining cost, this path must at least be 13.4

More on underestimates: Example: Real remaining costs 3 2 1 S A D F B E H C G I 1 3 2 1 5 4 Over- estimate If h is NOT an underestimate: S A D F 1+3 1+5 1+4 B 2+2 A B C 3+1 C G 4 Not the optimal path!

More on underestimates: Example: 3 2 S A D F B E H C G I 1 Real remaining costs 1 2 3 Under- estimate If h is an underestimate: S A D F 1+1 1+2 1+3 A B 2+0 C 3+0 B G 4 C 2+1 E 3 ! D E Bad underestimates always get cor- rected by increasing accumulated cost

Speed and memory In the worst case: no improvement over ‘branch and bounded extended uniform cost’ Just take h = 0 everywhere. For good heuristic functions: search may expand much less nodes ! See our running example. BUT: the cost of computing such functions may be high Trade-off

An orthogonal extension: path deletion Discard redundant paths: in the ‘branch and bound extended uniform cost’ : S A D 4 3 A B D 7 8 Accumulated distance X discard ! Principle: the minimum distance from S to G via I = (min. dist. from S to I) + (min. dist. from I to G)

More precisely: 7 8 9 6 Q P X IF the QUEUE contains: THEN S A D B E a path P terminating in I, with cost cost_P a path Q containing I, with cost cost_Q cost_P  cost_Q THEN delete P

A D 3 4 S S A D 4 B 7 8 X S A D B 7 E 9 6 X S A D B 7 E F 11 10 X

S A D B E F 10 C 11 12 X S A D B E F C 11 G 13 X Note how this optimization reduces the number of expansions VERY much, compared to ‘branch and bound extended uniform cost’. 5 expansions less !

A* search IS: Branch and bound extended, Heuristic Underestimate extended, Redundant path deletion extended, Uniform Cost Search. Note that redundant path deletion is based on the accumulated costs only, so that there is no problem combining it with heuristic underestimates.

A* algorithm: 1. QUEUE <-- path only containing the root; 2. WHILE QUEUE is not empty AND first path does not reach goal remove the first path from the QUEUE; create new paths (to all children); reject the new paths with loops; add the new paths and sort the entire QUEUE; IF QUEUE contains path P terminating in I, with cost cost_P, and path Q containing I, with cost cost_Q AND cost_P  cost_Q THEN delete P 3. IF goal reached THEN success; ELSE failure; (by f = cost + h)

STOP! A D S S A D E X Only difference is here. X X 3 + 10.4 = 13.4 4 + 8.9 = 12.9 S S A D E 13.4 9 + 10.4 = 19.4 6 + 6.9 = 12.9 X Only difference is here. S A D E B F 13.4 11 + 6.7 = 17.7 10 + 3.0 = 13.0 X S A D E B F 13.4 17.7 G 13 + 0.0 = 13.0 STOP! X