How is Manhattan distance an admissible heuristic?

16,095

Solution 1

Admissable heuristics must not overestimate the number of moves to solve this problem. Since you can only move the blocks 1 at a time and in only one of 4 directions, the optimal scenario for each block is that it has a clear, unobstructed path to its goal state. This is a M.D. of 1.

The rest of the states for a pair of blocks is sub-optimal, meaning it will take more moves than the M.D. to get the block in the right place. Thus, the heuristic never over-estimate and is admissible.

I will delete when someone posts a correct, formal version of this.

Solution 2

Formal Proof: By definition of h, h(s∗) = 0, if s∗ is the goal state. Assume for proof by contradiction that C∗ < h(s0) for some initial state s0. Note that, since each action can move only one tile, performing an action can at most reduce h by one. Since the goal can be reached in C∗ actions, we have h(s∗) ≥ h(s0) − C∗ > 0, which brings us to a contradiction since h(s∗) should be zero. Therefore, we must have h(s0) ≤ C∗ forall s0, and h is admissible. (Source: University of California, Irvine)

Share:
16,095
Akhil
Author by

Akhil

Updated on July 23, 2022

Comments

  • Akhil
    Akhil over 1 year

    Ain't it true that while counting the moves for 1 tile can lead to other tiles getting to their goal state? And hence counting for each tile can give us a count more than the minimum moves required to reach the goal state?

    This question is in context of Manhattan distance for 15-Puzzle.

    Here is the Question in different words:

    Can we use Manhattan distance as an admissible heuristic for N-Puzzle. To implement A* search we need an admissible heuristic. Is Manhattan heuristic a candidate? If yes, how do you counter the above argument (the first 3 sentences in the question)?

    Definitions: A* is a kind of search algorithm. It uses a heuristic function to determine the estimated distance to the goal. As long as this heuristic function never overestimates the distance to the goal, the algorithm will find the shortest path, probably faster than breadth-first search would. A heuristic that satisfies that condition is admissible.

  • Akhil
    Akhil over 13 years
    I got it! I am sorry for being not so clear. This happened may be because I had not given enough thought to the doubt I was facing
  • Abdullah
    Abdullah about 8 years
    Thank you University of California, Irvine
  • Donald
    Donald about 6 years
    Sorry for reviving this old thread. I just wanted to ask how did you arrive at this: h(s∗) ≥ h(s0) − C∗
  • Peiffap
    Peiffap about 2 years
    @Donald Assume you move along a path from s0 and make C* steps. The value of your heuristic can only decrease by C*, hence the heuristic value at any endpoint sf of that path can never be lower than h(s0) - C*, i.e. h(sf) ≥ h(s0) - C*. However, one of the possible endpoints is s*, hence h(s*) ≥ h(s0) - C*, which by assumption is greater than 0. Hence we have h(s*) > 0, which is a contradiction, completing the proof.