Hi! I recently read the wikipedia article about the A* search algorithm, which is basically a generalization of Dijkstra's algorithm, which also takes a heuristic function (called h) to evaluate the distance from a node to the goal (in Dijkstra's this heuristic would always be 0). However the algorithm requires the heuristic function to be admissible, i.e. the estimated cost of getting to the goal may never be greater than the actual cost of getting to the goal.

What I wonder about, doesn't the heuristic function have to be consistent as well? I.e. the decrease in the heuristic estimate when moving one step cannot be greater than the actual cost of taking that step. However, it says on wikipedia that the heuristic just has to be admissible for the algorithm to return an optimal path.

Burt what about this example?

Here, the heuristic function is admissible, since it never overestimates the cost of getting to the goal (although it's not consistent). Yet, i my opinion, the A* algorithm would take the suboptimal path here (the lower path), since it thinks the heuristic evaluation there (that in node C) is much more optimistic than in the upper path given in node B.

Am I right or wrong?