Consistent Heuristic
   HOME

TheInfoList



OR:

In the study of path-finding problems in
artificial intelligence Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech r ...
, a
heuristic function In mathematical optimization and computer science, heuristic (from Greek εὑρίσκω "I find, discover") is a technique designed for solving a problem more quickly when classic methods are too slow for finding an approximate solution, or whe ...
is said to be consistent, or monotone, if its estimate is always less than or equal to the estimated distance from any neighbouring vertex to the goal, plus the cost of reaching that neighbour. Formally, for every node ''N'' and each
successor Successor may refer to: * An entity that comes after another (see Succession (disambiguation)) Film and TV * ''The Successor'' (film), a 1996 film including Laura Girling * ''The Successor'' (TV program), a 2007 Israeli television program Musi ...
''P'' of ''N'', the estimated cost of reaching the goal from ''N'' is no greater than the step cost of getting to ''P'' plus the estimated cost of reaching the goal from ''P''. That is: :h(N) \leq c(N,P) + h(P) and : h(G) = 0.\, where :* ''h'' is the consistent heuristic function :* ''N'' is any node in the graph :* ''P'' is any descendant of ''N'' :* ''G'' is any goal node :* c(N,P) is the cost of reaching node P from N Informally, every node ''i'' will give an estimate that, accounting for the cost to reach the next node, is always lesser than the estimate at node ''i+1''. A consistent heuristic is also admissible, i.e. it never overestimates the cost of reaching the goal (the
converse Converse may refer to: Mathematics and logic * Converse (logic), the result of reversing the two parts of a definite or implicational statement ** Converse implication, the converse of a material implication ** Converse nonimplication, a logical c ...
, however, is not always true). Assuming non negative edges, this can be easily proved by induction. Let h(N_) = 0 be the estimated cost for the goal node. This implies that the base condition is trivially true as 0 ≤ 0. Since the heuristic is consistent, h(N_) \leq c(N_, N_) + h(N_) \leq c(N_, N_) + c(N_, N_) + h(N_) \leq c(N_, N_) + c(N_, N_) + ... + c(N_, N_) + h(N_). The given terms are equal to the true cost, \sum_^n c(N_, N_), so any consistent heuristic is also admissible since it is upperbounded by the true cost. The converse is clearly not true as we can always construct a heuristic that is always below the true cost but is nevertheless inconsistent by, for instance, increasing the heuristic estimate from the farthest node as we get closer and, when the estimate h(N_) becomes at most the true cost h^*(N_), we make h(N_) = h(N_) - c(N_, N_).


Consequences of monotonicity

Consistent heuristics are called monotone because the estimated final cost of a partial solution, f(N_j)=g(N_j)+h(N_j) is monotonically non-decreasing along any path, where g(N_j)=\sum_^j c(N_,N_i) is the cost of the best path from start node N_1 to N_j. It's necessary and sufficient for a heuristic to obey the
triangle inequality In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side. This statement permits the inclusion of degenerate triangles, but ...
in order to be consistent. In the
A* search algorithm A* (pronounced "A-star") is a graph traversal and path search algorithm, which is used in many fields of computer science due to its completeness, optimality, and optimal efficiency. One major practical drawback is its O(b^d) space complexity, ...
, using a consistent heuristic means that once a node is expanded, the cost by which it was reached is the lowest possible, under the same conditions that
Dijkstra's algorithm Dijkstra's algorithm ( ) is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years ...
requires in solving the shortest path problem (no negative cost edges). In fact, if the search graph is given cost c'(N,P)=c(N,P)+h(P)-h(N) for a consistent h, then A* is equivalent to best-first search on that graph using Dijkstra's algorithm. In the unusual event that an admissible heuristic is not consistent, a node will need repeated expansion every time a new best (so-far) cost is achieved for it. If the given heuristic h is admissible but not consistent, one can artificially force the heuristic values along a path to be monotonically non-decreasing by using : h'(P) \gets \max(h(P), h'(N) - c(N,P)) as the heuristic value for P instead of h(P) , where N is the node immediately preceding P on the path and h'(start)=h(start) . This idea is due to László Mérō and is now known as pathmax. Contrary to common belief, pathmax does not turn an admissible heuristic into a consistent heuristic. For example, if A* uses pathmax and a heuristic that is admissible but not consistent, it is not guaranteed to have an optimal path to a node when it is first expanded.{{cite journal, last=Holte, first=Robert, date=2005, title=Common Misconceptions Concerning Heuristic Search, url=https://aaai.org/ocs/index.php/SOCS/SOCS10/paper/view/2073, journal=Proceedings of the Third Annual Symposium on Combinatorial Search (SoCS)


See also

*
Admissible heuristic In computer science, specifically in algorithms related to pathfinding, a heuristic function is said to be admissible if it never overestimates the cost of reaching the goal, i.e. the cost it estimates to reach the goal is not higher than the lowes ...


References

Heuristics