an incremental version of A*

Slides:



Advertisements
Similar presentations
Algorithms (and Datastructures) Lecture 3 MAS 714 part 2 Hartmut Klauck.
Advertisements

Problem solving with graph search
AI Pathfinding Representing the Search Space
Single Source Shortest Paths
Inconsistent Heuristics
ECE 667 Synthesis and Verification of Digital Circuits
Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
D* Lite an incremental version of A* for navigating in unknown terrain Focussed Dynamic A* It implements the same behavior as Stentz’
Greed is good. (Some of the time)
Optimal Rectangle Packing: A Meta-CSP Approach Chris Reeson Advanced Constraint Processing Fall 2009 By Michael D. Moffitt and Martha E. Pollack, AAAI.
October 31, Algorithms and Data Structures Lecture XIII Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Adrian Sotelo CS582 Spring 2009 Digipen Institute of Technology.
Graphs Chapter 12. Chapter Objectives  To become familiar with graph terminology and the different types of graphs  To study a Graph ADT and different.
CSC 423 ARTIFICIAL INTELLIGENCE
Graphs By JJ Shepherd. Introduction Graphs are simply trees with looser restrictions – You can have cycles Historically hard to deal with in computers.
Dynamic All Pairs Shortest Paths Based on the following resources: Camil Demetrescu and Giuseppe F. Italiano (2004) A New Approach to Dynamic All Pairs.
Data Transmission and Base Station Placement for Optimizing Network Lifetime. E. Arkin, V. Polishchuk, A. Efrat, S. Ramasubramanian,V. PolishchukA. EfratS.
Lecture 19: Shortest Paths Shang-Hua Teng. Weighted Directed Graphs Weight on edges for distance
Network Optimization Problems: Models and Algorithms This handout: Minimum Spanning Tree Problem.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
Graphs & Graph Algorithms 2 Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Graphs. Graphs Many interesting situations can be modeled by a graph. Many interesting situations can be modeled by a graph. Ex. Mass transportation system,
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009.
Tirgul 13. Unweighted Graphs Wishful Thinking – you decide to go to work on your sun-tan in ‘ Hatzuk ’ beach in Tel-Aviv. Therefore, you take your swimming.
Fall 2007CS 2251 Graphs Chapter 12. Fall 2007CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs To.
Graphs & Graph Algorithms 2 Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Chapter 5.4 Artificial Intelligence: Pathfinding.
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
1 Shortest Path Calculations in Graphs Prof. S. M. Lee Department of Computer Science.
Dijkstra's algorithm.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Algorithms for Network Optimization Problems This handout: Minimum Spanning Tree Problem Approximation Algorithms Traveling Salesman Problem.
SPANNING TREES Lecture 21 CS2110 – Spring
Graph Algorithms. Definitions and Representation An undirected graph G is a pair (V,E), where V is a finite set of points called vertices and E is a finite.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Runtime O(VE), for +/- edges, Detects existence of neg. loops
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
Lecture 17: Trees and Networks I Discrete Mathematical Structures: Theory and Applications.
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘length’ c ij (cost, time, distance, …). Determine a path of shortest.
CSCE 552 Spring 2010 AI (III) By Jijun Tang. A* Pathfinding Directed search algorithm used for finding an optimal path through the game world Used knowledge.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
CSE 326: Data Structures Lecture #17 Heuristic Graph Search Henry Kautz Winter Quarter 2002.
1 GRAPHS – Definitions A graph G = (V, E) consists of –a set of vertices, V, and –a set of edges, E, where each edge is a pair (v,w) s.t. v,w  V Vertices.
Lecture 20. Graphs and network models 1. Recap Binary search tree is a special binary tree which is designed to make the search of elements or keys in.
CSE 373: Data Structures and Algorithms Lecture 21: Graphs V 1.
Graphs – Breadth First Search
Chapter 5.4 Artificial Intelligence: Pathfinding
Data Center Network Architectures
Algorithms and Data Structures Lecture XIII
Graphs Chapter 11 Objectives Upon completion you will be able to:
A* Path Finding Ref: A-star tutorial.
Searching for Solutions
Algorithms and Data Structures Lecture XIII
CSE (c) S. Tanimoto, 2001 Search-Introduction
Workshop: A* Search.
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
CSE (c) S. Tanimoto, 2002 State-Space Search
Spanning Trees Lecture 20 CS2110 – Spring 2015.
CSE (c) S. Tanimoto, 2004 State-Space Search
Analysis and design of algorithm
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
Presentation transcript:

an incremental version of A* Lifelong Planning A* an incremental version of A* It applies to path-planning problems on known finite graphs whose edge costs increase or decrease over time. (Such cost changes can also be used to model edges or vertices that are added or deleted.) Source: Sven Koenig, Georgia Tech, USC

Incremental search + heuristic search How to search efficiently using heuristic to guide the search How to search efficiently by using re-using information from previous search results

Incremental search + heuristic search

Path Planning original eight-connected gridworld

Path Planning original eight-connected gridworld

Path Planning changed eight-connected gridworld

Path Planning changed eight-connected gridworld

Lifelong Planning A* Lifelong Planning A* - applies to the same finite search problems as A* - produces the same (optimal) solution as A* - handles arbitrary edge cost changes - is algorithmically very similar to A* - is more efficient than A* in many situations - applies to - route planning problems (traffic, networking, ...) - robot control - symbolic artificial intelligence planning - has nice theoretical properties

Path-planning Path-planning problems can be solved with traditional graph-search methods, such as breadth-first search, if they update the shortest path every time some edge costs change. They typically neither take advantage of available heuristics nor reuse information from previous searches. The next algorithm, however, shows that taking advantage of these sources of information can potentially be beneficial individually and even more beneficial when they are combined. Problem Domain: Eight-connected gridworld with cells whose traversability changes over time

Incremental Search Incremental search methods solve dynamic shortest path problems, that is, path problems where shortest paths have to be determined repeatedly as the topology of a graph or its edge costs change. If arbitrary sequences of edge insertions, deletions, or weight changes are allowed, then the dynamic shortest path problems are called fully dynamic shortest path problems LPA* is an incremental search method that solves fully dynamic shortest path problems. It uses heuristics to focus its search and thus combines two different techniques to reduce its search effort.

Lifelong Learning “Lifelong learning” because it reuses information from previous searches. (Other researchers use the term continual planning for the same concept.) LPA* repeatedly finds shortest paths from a given start vertex to a given goal vertex in a given graph as edges or vertices are added or deleted or the costs of edges are changed, for example, because the cost of planning operators, their preconditions, or their effects change from one path-planning problem to the next. LPA* generalizes both DynamicSWSF-FP (incremental) and A* (heuristic) and promises to find (re-plan) shortest paths faster than these two search methods individually because it combines their techniques. Univ. of Wisconsin, G. Ramalingam - Strict Weakly Superior Function-FP

LPA* vs. A* Its first search is the same as that of a version of A* that breaks ties among vertices with the same f-value in favor of smaller g-values the subsequent searches are potentially faster because it reuses those parts of the previous search tree that are identical to the new search tree, and uses an efficient method for identifying these parts. This can reduce the search time if large parts of the search trees are identical, for example, if the path-planning problems change only slightly and the changes are close to the goal. LPA* can also handle changes to the graph during its search and can be extended to inadmissible heuristics, more efficient tiebreaking criteria, and nondeterministic graphs

Eight-connected gridworld (Original) (Changed) Two percent of the cells changed their status but the obstacle density remained the same. three blocked cells became traversable (namely, A6, D2, and F5) and three traversable cells became blocked (namely, B1, C4, E3) The start distances are shown in each traversable cell of the original and changed gridworlds. Those cells whose start distances in the changed gridworld have changed from the corresponding ones in the original gridworld are shaded gray

(Original) Eight-connected gridworld Those cells whose start distances in the changed gridworld have changed from the corresponding ones in the original gridworld are shaded gray

(Changed) Eight-connected gridworld Those cells whose start distances were recomputed (expanded cells) are shaded gray.

LPA* LPA* is an incremental version of A* that applies to the same finite path-planning problems as A*. It shares with A* the fact that it uses non-negative and consistent heuristics h(s) that approximate the goal distances of the vertices s to focus its search. Consistent heuristics obey the triangle inequality: h(sgoal) = 0 h(s) ≤ c(s, s’) + h(s’); for all vertices s ∈ S and s’ ∈ succ(s) with s ≠ sgoal.

Variables S finite set of vertices set of successors of s set of predecessors of s Cost of moving from vertex s to vertex s’ Start vertex Goal vertex

Variables Start distance = length of the shortest path from Sstart to S g(s) = estimate of the Start distance g*(s)

Rhs-value The rhs-values are one-step look-ahead values, based on the g-values; and thus, potentially better informed than the g-values

Rhs-value g-value = rhs-value: cell is locally consistent The rhs-values are one-step look-ahead values, based on the g-values and thus potentially better informed than the g-values g-value = rhs-value: cell is locally consistent g-value ≠ rhs-value: cell is locally inconsistent g-value > rhs-value: cell is locally overconsistent g-value < rhs-value: cell is locally underconsistent the priority queue contains exactly the locally inconsistent vertices s their priority is [min(g(s),rhs(s))+h(s,sgoal); min(g(s),rhs(s))] smaller priorities first, according to a lexicographic ordering

Shortest Path If all vertices are locally consistent, g(s) == g*(s) ; for all vertices s one can trace back the shortest path from Sstart to any vertex s. Start = A3, Goal = F0 from Sgoal to Sstart From vertex s, find a predecessor s’ that minimises g(s’) + c(s, s’). Ties can be broken arbitrarily. Repeat until Sstart is reached.

Selective Update LPA* does not make all vertices locally consistent after some edge costs have changed It uses heuristics to focus the search It updates only the g-values that are relevant for computing the shortest path LPA* maintains a priority queue for keeping track of locally inconsistent vertices – vertices that potentially needs their g-values updated to make them locally consistent Start = A3, Goal = F0

Priority LPA* maintains a priority queue for keeping track of locally inconsistent vertices – vertices that potentially needs their g-values updated to make them locally consistent Priority of a vertex = key Key – vector with 2 components k(s) = [ k1(s); k2(s) ] k1(s) = min(g(s), rhs(s)) + h(s, sgoal) k2(s) = min(g(s), rhs(s))

The vertex with the smallest key is expanded first by LPA*. Priority Priority of a vertex = key Key – vector with 2 components k(s) = [ k1(s); k2(s) ] k1(s) = min(g(s), rhs(s)) + h(s, sgoal) k2(s) = min(g(s), rhs(s)) The vertex with the smallest key is expanded first by LPA*. Key comparison (lexicographic ordering): k(s) ≤ k’(s) iff either ( k1(s) < k1‘(s) ) or ( k1(s) == k1‘(s) ) and ( k2(s) ≤ k2‘(s) )

Heuristic Function (Gridworld) As an approximation of the distance between two cells, we use the maximum of the absolute differences of their x and y coordinates. These heuristics are for eight-connected gridworlds what Manhattan distances are for four-connected gridworlds.

LPA* Pseudocode The pseudocode uses the following functions to manage the priority queue: U.TopKey() - returns the smallest priority of all vertices in priority queue U. (If U is empty, then U.TopKey() returns [∞; ∞].) U.Pop() - deletes the vertex with the smallest priority in priority queue U and returns the vertex. U.Insert(s; k) - inserts vertex s into priority queue U with priority k. Update(s; k) - changes the priority of vertex s in priority queue U to k. (It does nothing if the current priority of vertex s already equals k.) U.Remove(s) - removes vertex s from priority queue U.

LPA* Pseudocode

Route-planning example in the eight-connected gridworld

Route-planning example in the eight-connected gridworld

Route-planning example in the eight-connected gridworld

Route-planning example in the eight-connected gridworld

Example #2

Example #2

Example #2

Example #2

Exercise: Second Search Previous Search Principle behind LPA*

Properties LPA* does not maintain a CLOSED list (expanded list) since it uses local consistency checks to avoid vertex re-expansions. Replanning with LPA* is best understood as transforming the A* search tree of the old problem to the new one. The larger the overlap between the old and the new search trees and the more start distances remain unchanged, the more efficient replanning becomes. LPA* can be less efficient than A* if the overlap between the search trees is small.

Conclusions Incremental search methods find optimal solutions to series of similar path-planning problems potentially faster than is possible by solving each path-planning problem from scratch. They do this by using information from previous search episodes to speed up later searches. LPA* applies to path-planning problems where one needs to find shortest paths repeatedly as: edges or vertices are added or deleted, or the costs of edges are changed, for example, because the cost of planning operators, their preconditions, or their effects change from one path-planning problem to the next.