Example of admissible heuristic, which needs to be more consistent.
The below given figure:
Let us consider that h(C)=1 If f(A)=g(A)+h(A)=0+4=4, and f(C)=g(C)+h(C)=1+1=2 Then f(C) is NOT greater than or equal to f(A). So, this example is consistent and admissible, but can anyone provide me with an inconsistent heuristic example?
CONSISTENT HEURISTIC:
A heuristic in the algorithm is consistent if the amount from the current node to a successor node and the estimated amount from the successor node to the aim is less than or equal to the estimated amount from the current node to the goal.
In an equation, it would look like this: C(n, n’) + h(n’) ≤ h(n)
ADMISSIBLE HEURISTIC:
A heuristic function is admissible if the estimated amount is never more than the actual amount from the current node to the goal node.
If you need inconsistency and since h(C) <= 3 for the admissibility condition, then you need to have that h(A) > 1 + h(C). So, any heuristics that satisfies:
h(A) > 1 + h(C)
h(C) <= 3
h(G) = 0
is admissible and not consistent.
You have given
h(A) = 4
h(C) = 1
h(G) = 0
which is a valid candidate. This is an admissible heuristic example.