The image below shows an 8-puzzle game where you must transf…

The image below shows an 8-puzzle game where you must transform the given scrambled configuration into the correct placement.  We now need to use A* search to find the optimal game strategy, i.e., to complete the game in the fewest steps possible. In A* search, we must define a heuristic function to compute the heuristic at each step. Therefore, please write the pseudocode to calculate the heuristic at each step(not the pseudocode for A* search, but only the portion that calculates the heuristic). You are free to choose the heuristic function, and you can decide what the input of this function is. Note that the heuristic function must be one we discussed in class, and you should indicate the one you chose at the beginning of your solution.