Admissible Heuristic by Petros Katiforis 1 Updated Created
In the context of an A* search, a heuristic function is said to be admissible if it does not overestimate the cost to reach the goal. Such functions can also be viewed as being "optimistic".
When using an admissible heuristic, A* is guaranteed to return a cost-optimal solution, i.e. the best path. Let's prove it by contradiction:
Assume that the algorithm returned a path, the cost of which is greater than the actual optimal path . Let's call the cost of the path that was followed, and the cost of , noting that . First, we can safely assume that at least one node in was not expanded during the algorithm's execution (if all nodes of were expanded, then would have been chosen instead since that would lead to a lower path cost). Without loss of generallity, let's take the first occurance of such unexpanded node and name it "n". By definition, holds the least known cost to reach n starting from the origin. Let's name the actual cost from n to the destination and define as the cost of the optimal path from our origin to n. Since all previous nodes of the optimal path have already been expanded, we know that . Here's what we've got:
Now note that is equal to "the cost to reach n following the optimal path" + "the cost to reach the goal starting from n, following the optimal path". That's just equal to the total cost of the optimal path! However, we know that , so here's where the contradiction lies: If really was less or equal to the length of the optimal path (), then the A* algorithm would have expanded this node before trying to expand the destination since . A lower value would have always triggered an immediate expansion.
[1]: Remember than (our heuristic) is just a hint to prioritize certain expansions over others. When everything is expanded however, is the sole metric that will be considered, which will always lead to the optimal path being selected, that being .
Home by Petros Katiforis 1 Updated Created
Welcome to my home page!