Question: Write a code in C++, Write a breadth-first search program to solve 8-puzzle problems like that in Figure 3.4 on page 71. Keep track of
Write a code in C++, Write a breadth-first search program to solve 8-puzzle problems like that in Figure 3.4 on page 71. Keep track of the number of nodes expanded and print that out along with the steps to solve the problem. A sample run should look something like this: Enter 8-puzzle starting state by rows (0 for blank): 7,2,4,5,0,6,8,3,1 Enter ending state by rows (0 for blank): 5,7,4,8,2,6,0,3,1 Solution: Start 7 2 4 5 0 6 8 3 1 Swap the blank Up 7 0 4 5 2 6 8 3 1 Left 0 7 4 5 2 6 8 3 1 Down 5 7 4 0 2 6 8 3 1 Down 5 7 4 8 2 6 0 3 1 Done! Generated xx states. Note: To keep the time and memory requirements reasonable, your program only needs to solve 8-puzzle problems which have a solution in 10 moves or less. You must use C++

Section 3.2.Example Problems 71 6 78 Start State Goal State Figure 3.4 A typical instance of the 8-puzzle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
