Question: Implement a C program to solve the 15-puzzle problem using the A* search algorithm. In the assignment, solving a 15-puzzle problem needs to move the

Implement a C program to solve the 15-puzzle problem using the A* search algorithm. In the assignment, solving a 15-puzzle problem needs to move the tiles to their goal locations, which are as shown below. The numbers 1~15 are indexes of the tiles, and 0 means blank tile. This state is the goal state Implement a C program to solve the 15-puzzle problem using the A* Your program can solve the problem using a single thread or using 4 threads, depending on the first argument (argv[1]). The program uses a single thread if argv[1] is "-s", or 4 threads if argv[1] is "-m". The initial layout of the tiles is also provided in the command line as arguments by listing tile indexes in a row-major order *important part: The execution of the program will print out the state transitions from the initial state to the goal state as a solution. ./your_program -s 2 3 0 4 1 6 7 8 5 9 10 12 13 14 11 15 (for one thread) ./your_program -m 2 3 0 4 1 6 7 8 5 9 10 12 13 14 11 15 (for 4 thread)

12 34 5678 10 11 12 13 14 15 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!