Before revision: The total Manhattan distance for the shown puzzle is: Optimality Proof If an admissible heuristic is used in an algorithm that, per iteration, progresses only the path of lowest evaluation (current cost + heuristic) of several candidate paths and terminates the moment it's exploration reaches the goal (for example in A* search algorithm ), then this algorithm can only terminate on an optimal path.
After revision: The total Manhattan distance for the shown puzzle is: Optimality Proof If an admissible heuristic is used in an algorithm that, per iteration, progresses only the path of lowest evaluation (current cost + heuristic) of several c,idate paths and terminates the moment it's exploration reaches the goal and, crucially, never closes all optimal paths before terminating (something that's possible withif special care isn't taken A* search algorithm ), then this algorithm can only terminate on an optimal path.