More advanced aspects of search Extensions of A*.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

An Introduction to Artificial Intelligence
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
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 AND SEARCH
Heuristics CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Informed Search Methods How can we improve searching strategy by using intelligence? Map example: Heuristic: Expand those nodes closest in “as the crow.
Artificial Intelligence Chapter 9 Heuristic Search Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Optimality of A*(standard proof) Suppose suboptimal goal G 2 in the queue. Let n be an unexpanded node on a shortest path to optimal goal G. f(G 2 ) =
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
CSCE 580 ANDREW SMITH JOHNNY FLOWERS IDA* and Memory-Bounded Search Algorithms.
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.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Search in AI.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Informed search.
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
Using Search in Problem Solving
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2005.
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.
Cooperating Intelligent Systems Informed search Chapter 4, AIMA.
Using Search in Problem Solving
Informed Search CSE 473 University of Washington.
Informed Search Methods How can we make use of other knowledge about the problem to improve searching strategy? Map example: Heuristic: Expand those nodes.
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.
Using Search in Problem Solving
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.)
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
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
Problem Solving and Search Andrea Danyluk September 11, 2013.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Informed (Heuristic) Search
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
CHAPTER 4: INFORMED SEARCH & EXPLORATION Prepared by: Ece UYKUR.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Informed searching. Informed search Blind search algorithms do not consider any information about the states and the goals Often there is extra knowledge.
Lecture 3: Uninformed Search
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Artificial Intelligence for Games Informed Search (2) Patrick Olivier
Basic Search Procedure 1. Start with the start node (root of the search tree) and place in on the queue 2. Remove the front node in the queue and If the.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Pengantar Kecerdasan Buatan 4 - Informed Search and Exploration AIMA Ch. 3.5 – 3.6.
Informed Search CSE 473 University of Washington.
CPSC 322, Lecture 6Slide 1 Uniformed Search (cont.) Computer Science cpsc322, Lecture 6 (Textbook finish 3.5) Sept, 17, 2012.
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
Fahiem Bacchus © 2005 University of Toronto 1 CSC384: Intro to Artificial Intelligence Search II ● Announcements.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
B+-Tree Deletion Underflow conditions B+ tree Deletion Algorithm
Heaps, Heap Sort, and Priority Queues. Background: Binary Trees * Has a root at the topmost level * Each node has zero, one or two children * A node that.
Artificial Intelligence Solving problems by searching.
Lecture 3: Uninformed Search
Last time: Problem-Solving
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.
Course Outline 4.2 Searching with Problem-specific Knowledge
CSE 473 University of Washington
Heuristic Search Methods
Introducing Underestimates
More advanced aspects of search
The Rich/Knight Implementation
The Rich/Knight Implementation
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:

More advanced aspects of search Extensions of A*

Iterated deepening A* Simplified Memory-bounded A*

Iterative-deepening A*

4 Memory problems with A*  A* is similar to breadth-first: Breadth-first d = 1 d = 2 d = 3 d = 4 Expand by depth-layers  Here: 2 extensions of A* that improve memory usage. f1 f2 f3 f4 A* Expands by f-contours

5Depth-first in each f- contour  Perform depth-first search LIMITED to some f-bound.  If goal found: ok.  Else: increase de f- bound and restart. Iterative deepening A* f4 How to establish the f-bounds? - initially: f(S) - initially: f(S) generate all successors record the minimal f(succ) > f(S) Continue with minimal f(succ) instead of f(S) f3 f2 f1

6 Example: Sf=100 Af=120Bf=130Cf=120 Df=140Gf=125Ef=140Ff=125 f-limited, f-bound = 100 f-new = 120

7 Example: Sf=100 Af=120Bf=130Cf=120 Df=140Gf=125Ef=140Ff=125 f-limited, f-bound = 120 f-new = 125

8 Example: Sf=100 Af=120Bf=130Cf=120 Df=140Gf=125Ef=140Ff=125 f-limited, f-bound = 125 SUCCESS

9 f -limited search: 1. QUEUE <-- path only containing the root; f-bound ; f-bound ; f-new <--  f-new <--  2. WHILE QUEUE is not empty AND goal is not reached DO remove the first path from the QUEUE; DO remove the first path from the QUEUE; create new paths (to all children); create new paths (to all children); reject the new paths with loops; reject the new paths with loops; add the new paths with f(path)  f-bound add the new paths with f(path)  f-bound to front of QUEUE; to front of QUEUE; f-new <-- minimum of current f-new and f-new <-- minimum of current f-new and of the minimum of new f-values which are of the minimum of new f-values which are larger than f-bound larger than f-bound 3. IF goal reached THEN success; ELSE report f-new ;

10 Iterative deepening A*: 1. f-bound <-- f(S) 2. WHILE goal is not reached DO perform f-limited search; DO perform f-limited search; f-bound <-- f-new f-bound <-- f-new

11 Properties of IDA*  Complete and optimal:  under the same conditions as for A*  Memory:  Let  be the minimal cost of an arc:  == O( b* (cost(B) /  ) )  Speed:  depends very strongly on the number of f-contours there are !!  In the worst case: f(p)  f(q) for every 2 paths:  ….+ N = O(N 2 )

12 Why is this optimal, even without monotonicity ?? S AB CDFE  In absence of Monotonicity:  we can have search spaces like:  If f can decrease,  how can we be sure that the first goal reached is the optimal one ???

13 Properties: practical  If there are only a reduced number of different contours:  IDA* is one of the very best optimal search techniques !  Example: the 8-puzzle  But: also for MANY other practical problems  Else, the gain of the extended f-contour is not sufficient to compensate recalculating the previous  In such cases:  increase f-bound by a fixed number  at each iteration:  effects: less re-computations, BUT: optimality is lost: obtained solution can deviate up to 

Simplified Memory-bounded A*

15 Simplified Memory-bounded A*  Fairly complex algorithm.  If memory is full and we need to generate an extra node (C):  Remove the highest f- value leaf from QUEUE (A).  Remember the f-value of the best ‘forgotten’ child in each parent node (15 in S). S AB C memory of 3 nodes only  Optimizes A* to work within reduced memory.  Key idea: (15) 18 B

16 Generate children 1 by 1  When expanding a node (S), only add its children 1 at a time to QUEUE.  we use left-to-right  Avoids memory overflow and allows monitoring of whether we need to delete another node S AB 13 First add A, later B AB

17 Too long path: give up  If extending a node would produce a path longer than memory: give up on this path (C).  Set the f-value of the node (C) to   (to remember that we can’t find a path here) S B C memory of 3 nodes only D 18  B C

18 Adjust f-values S AB  If all children M of a node N have been explored and for all M:  f(S...M)  f(S...N)  then reset:  f(S…N) = min { f(S…M) | M child of N}  A path through N needs to go through 1 of its children ! better estimate for f(S) 15

19 SMA*: an example: S AB CG1DG2 EG3G4F 0+12=12 8+5= = = =1820+0= = = = = = S12S12 A 15 S12A 15 B 13 S 13 B 13 A 15 A 15 D 18 (15) 1312

20 S 13 B D  13 (15) S AB CG1DG2 EG3G4F0+12=128+5= = = =1820+0= = = = = = S 13 (15) B 13 D  Example: continued D  (()(() G S 15 B 24 (()(()(15)G2 24 (15) G2 24 (()(() A 15 S 15 A 15 B 24 B 24 (24) C 25  S 15 (24) A C  15 C  ()() G

21 SMA*: properties:  Complete: If available memory allows to store the shortest path.  Optimal: If available memory allows to store the best path.  Otherwise: returns the best path that fits in memory.  Memory: Uses whatever memory available.  Speed: If enough memory to store entire tree: same as A*