Remember the origin of the map starts from the upper left corner. The code is set for finding an optimal path in the following map, but one can change the map configurations in int main() function.
Two heuristics are used to solve the puzzle -
- Number of misplaced tiles and
- Manhattan distance of each block to the final place of the block in the puzzle.