Download presentation
Presentation is loading. Please wait.
1
CGDD4003 – Spring 2010 A* Path Planning
2
Background Developed in 1968 Searches state space
Move from start state to goal state (source and destination) Iteratively expands options based upon Adjacent states (transition via “moves”) Heuristics
3
Workings of A* A* (pronounced A star):
Maintains an Open and Closed sets Keeps working on “most promising” state Generates successors of current state Successors “placed” into Open or Closed set Updates Open state if it already exists in Open Maintains “parent path” for each node
4
Attributes of Each State
Heuristic estimate g(v) from start to v CostFromStart(v) Heuristic estimate h(v) from v to goal CostToGoal(v) Total path estimate t(v) Used to select “most promising” TotalCost(v) t(v) = g(v) + h(v)
5
A* Algorithm: Initialize
Initialize(start, goal, agent) Open = {} Closed = {} s = start CostFromStart[s] = 0 CostToGoal[s] = PathCostEstimate(start, goal, agent) [s] = null Open += s
6
A* Algorithm: Search A_Star_Search(start, goal, agent) Initialize(start, goal, agent) while Open != {} s = Open.Pop() if (s == goal) construct path backward using values return true else for each v Adjacency[s] cost = CostFromStart[s] + w(s, v, agent) if (cost < CostFromStart[v]) or (v Open and v Closed) [v] = s CostFromStart[v] = cost CostToGoal[v] = PathCostEstimate(v, goal, agent) TotalCost[v] = cost + CostToGoal[v] if (v Closed) remove v from Closed if (v Open) adjust v’s location in Open // move “up” Open.Push(v) Closed.Push(s) return false
7
Estimation/Heuristic Function
CostToGoal(v) = 0 CostToGoal(v) = 1
8
Properties of Heuristics in A*
CostToGoal[v] estimate always decreases PathCostEstimate(v) is the deciding factor If PCE(v) is small, search space increases If PCE(v) is big, search space decreases But PCE must be <= true cost to ensure optimal path If PCE > true cost, we’ll generate sub-optimal path But do so in better (quicker) time!
9
PCE Heuristic Comparison
Non-overestimating heuristic Overestimating heuristic
10
Considerations of A* A significant consideration in A* path planning is memory Must maintain Open and Closed sets These take up large amounts of space O(breadthdepth) A* also requires us to re-sort the Open list frequently (which can be costly)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.