Question: Write the program in either C++ or Java. The program when executed must ask the user to enter the text file name containing the initial
Write the program in either C++ or Java. The program when executed must ask the user to enter the text file name containing the initial state and goal state of the problem. Consider a modified version of the 8-puzzle problem in which adjacent tiles that differ by one in value can be exchanged in addition to the allowed blank moves in the 4 directions: up, left, write and down. Write a program to solve this problem using: 1. breadth first search. Assume no repeated states in the search tree. 2. best first search. You need to come up with a heuristic. Your code will be evaluated on both correctness and the quality of the heuristic.
example :- 
N 4 5 3 1 6 initial state 8 7 1 2 3 4 5 6 goal state 7 00 The program should output for each of the two algorithms: 1. The solution expressed as sequence of operations. 2. Number of states expanded. N 4 5 3 1 6 initial state 8 7 1 2 3 4 5 6 goal state 7 00 The program should output for each of the two algorithms: 1. The solution expressed as sequence of operations. 2. Number of states expanded
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
