Admissible heuristic 2026-10-25
A heuristic function bounded above by the minimum remaining goal cost . When no goal is reachable, take . Admissibility is a lower-bound guarantee, rather than a statement that the estimate is usually numerically accurate. Ignoring constraints can produce a relaxation heuristic because it enlarges the available solution set.
The proposed Hamming distance is both an admissible heuristic and a consistent heuristic. Write
Every position differing from the target must change at least once along any successful word ladder. One mutation changes only one position, so every solution from has at least steps. This proves , including an unreachable target with . Dictionary restrictions may force extra changes, but cannot remove that lower bound.
Adjacent words differ in one position, so their Hamming distances to differ by at most one. Since every transition costs one,
These are exactly the consistent heuristic conditions. Equivalently, allowing all length- words gives a relaxation heuristic whose exact distance is the Hamming distance; restoring the dictionary can only increase the minimum required number of steps.
Let be their Manhattan distance. Each joint action can reduce by at most two, so use the simultaneous rendezvous distance
This heuristic function is nonzero whenever the robots are apart. For a transition , the triangle inequality gives
Applying the ceiling function yields , and . Thus is a consistent heuristic, hence an admissible heuristic.
In the unobstructed grid this estimate is exact. Along a shortest route of length , both robots approach a middle room, taking at most steps each; when is an odd integer, the robot with the shorter route waits once. That final wait prevents a crossing from being mistaken for a meeting. With obstacles the same formula remains a relaxation heuristic, though it need not be exact.
Figure 1.
An original nine-edge route needs five simultaneous steps: the last wait produces a meeting rather than a crossing
. Details.
Ignore the fox and obstacles when estimating the remaining number of rabbit moves. Define the heuristic function
This is Manhattan distance to the nearest exit, a relaxation heuristic. Assume at least one exit; with none the instance is immediately unsolvable. The estimate is generally nonconstant and is not the perfect escape cost: obstacles can force detours, while pursuit can make an apparently nearby exit unreachable.
To prove it is a consistent heuristic, consider a surviving one-round transition from to . Let attain the minimum defining . The triangle inequality for Manhattan distance and the rabbit's move bound give
Every successful terminal state has . This proves consistency with unit round costs; summing the inequality along any successful route also proves that it is an admissible heuristic. Failed transitions need no successor estimate because they are discarded.