A heuristic is a function used to estimate how close a state is to a goal. They’re problem-specific, and can help us approximate computationally difficult problems. This makes them useful for NP-complete problems in artificial intelligence.
Good heuristics have the properties:
- Non-negative.
- if is a goal node.
- Can compute efficiently and without search, so that we don’t affect the underlying time complexity of the algorithm.
Some algorithms that rely on heuristics to search:
An admissible heuristic is one that never overpredicts the cost to a goal node, i.e., it never estimates a cost to the goal greater than the actual cost to the goal. For the cost of an optimal path :
They basically ensure that the search won’t miss any promising paths.
A consistent (or monotone) heuristic is one that never overpredicts the action cost, i.e., the heuristic predicts the action cost less than the actual cost for each action.
The consequence of consistency is that the value along a path never decreases.
By theorem, consistency implies admissibility. That is:
where is the edge between .