–
Questions
–
- In a Best First Search algorithm each state (n) maintains a function
- f(n) = h(n)
In an A* search algorithm each state (n) maintains a function
- f(n) = g(n) + h(n) where g(n) is the least cost form source state to state n found so far and h(n) is the estimated cost of the optimal path from state n to the goal state.
Implement Best First Search and A* search algorithm for solving the 8-puzzle problem with the following assumptions.
- g(n) = least cost from source state to current state so far.
- Heuristics
- h1(n) = number of tiles displaced from their destined position.
- h2(n) = sum of Manhattan distance of each tile from the goal position.
- A local search algorithm tries to find the optimal solution by exploring the states in the local region. Hill climbing is a local search technique which always looks for a better solution in its neighbourhood.
- Implement the Hill Climbing Search Algorithm for solving the 8-puzzle problem.
- Check the algorithm for the following heuristics:
- h1(n) = number of tiles displaced from their destined position.
- h2(n) = sum of Manhattan distance of each tile from the goal position.
Instructions:
- Input is given in a file in the following format. Read the input and store the information in a matrix. Configuration of the start state and the goal state can be anything. For example given below T1, T2, ,T8 are tile numbers and B is blank space.
- Output should have the following information:
- On success:
- Success Message
- Start State / Goal State iii. Total number of states explored iv. Total number of states to optimal path
- Optimal Path
- Optimal Path Cost
- On success:
- Time taken for execution
- On failure:
- Failure Message
- Start State / Goal State
- Total number of states explored before termination
- Compare and contrast between the results of the three algorithms for the different heuristics

![[Solved] (CS571) Intelligence](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] (CS571) Assignment-2](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.