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 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 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started