A Heuristic for the 8-Puzzle Problem

If s is a state in the 8-Puzzle state space, consider: where t is the number of tiles out of place in s.

h estimates, but does not overestimate, the number of moves required to get to the goal g.

Note that h(g) = 0