Skip to main content
Expanded answer to clarify what is known and not known in the statement of the problem.
Source Link
PtH
  • 290
  • 1
  • 10

(The following may well have occurred to you already, but for completeness ...)

WhenIf I've fully understood the information that you have (and in context of A* pseudocode as you cited):

  1. At any given time, the set openset holds the nodes that are candidates to step off to. Each of these nodes has an f_score[] value, which is the lower bound you refer to in your question.

(Intuitively, if I'm using A* to find the shortest path on a simple four-connected grid, my lower bound distance is the 'as the crow flies' distance, which is a lower bound to the 'follow the grid' distance.)

  1. The condition you add is that, from another source, you know that the distance from $x$ to $dest$ should be no more than some upper bound.

Consequently when adding nodes to the open set (openset at pseudocode), you could ignore nodes that have a distance to $dest$ that are greater than theyour supplied upper bound on $d(x, dest)$. As in

upperboundDistToDest = (Calculation of upper bound)

(... then in the appropriate place ...)

if neighbor not in openset and dist(neighbour, dest) < upperboundDistToDest 
    add neighbor to openset

(The following may well have occurred to you already, but for completeness ...)

When adding nodes to the open set (openset at pseudocode), you could ignore nodes that have a distance to $dest$ that are greater than the upper bound on $d(x, dest)$. As in

upperboundDistToDest = (Calculation of upper bound)

(... then in the appropriate place ...)

if neighbor not in openset and dist(neighbour, dest) < upperboundDistToDest 
    add neighbor to openset

(The following may well have occurred to you already, but for completeness ...)

If I've fully understood the information that you have (and in context of A* pseudocode as you cited):

  1. At any given time, the set openset holds the nodes that are candidates to step off to. Each of these nodes has an f_score[] value, which is the lower bound you refer to in your question.

(Intuitively, if I'm using A* to find the shortest path on a simple four-connected grid, my lower bound distance is the 'as the crow flies' distance, which is a lower bound to the 'follow the grid' distance.)

  1. The condition you add is that, from another source, you know that the distance from $x$ to $dest$ should be no more than some upper bound.

Consequently when adding nodes to the open set (openset), you could ignore nodes that have a distance to $dest$ that are greater than your supplied upper bound. As in

upperboundDistToDest = (Calculation of upper bound)

(... then in the appropriate place ...)

if neighbor not in openset and dist(neighbour, dest) < upperboundDistToDest 
    add neighbor to openset
Source Link
PtH
  • 290
  • 1
  • 10

(The following may well have occurred to you already, but for completeness ...)

When adding nodes to the open set (openset at pseudocode), you could ignore nodes that have a distance to $dest$ that are greater than the upper bound on $d(x, dest)$. As in

upperboundDistToDest = (Calculation of upper bound)

(... then in the appropriate place ...)

if neighbor not in openset and dist(neighbour, dest) < upperboundDistToDest 
    add neighbor to openset