Question: I need a program in C++ Language that solves the famous 8 puzzle problem using the a* algorithm with the Manhattan priority function.It must be
I need a program in C++ Language that solves the famous 8 puzzle problem using the a* algorithm with the Manhattan priority function.It must be able to read the initial board from standard input and print to standard output a sequence of board positions that solves the puzzle in the fewest number of moves. It also needs to print out the TOTAL NUMBER OF MOVES and the TOTAL NUMBER OF STATES ENQUEUED. The input will consist of the board dimension (N) followed by the N-by-N initial board position. The input format should use 0 to represent the blank square. The needs to work for arbitrary N-by-N boards (for any N greater than 1). I need the code to be AS MINIMALISTIC AS POSIBLE. Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
