Question: Part 3 : The N - Puzzle Problem In Part 3 , you will apply the three uniformed search algorithms to simplified versions of the

Part 3: The N-Puzzle Problem
In Part 3, you will apply the three uniformed search algorithms to simplified versions of the 15-puzzle. Specifically, we will consider the (3x3)9-puzzle and the (3x4)12-puzzle.
3.A - Create 9-Puzzle Environment
Create an instance of the NPuzzle environment with 3 rows and 3 columns. Set scramble=200 and random_state=1. Use the display() method to display the initial state of the environment.
3.B - Solving 9-Puzzle
Apply the depth-first search, breadth-first search, and uniform-cost search algorithms to the environment created in 3.B. Set a time limit of 2 minutes for each algorithm. Store the solutions and the resulting log information into variables. Leave display_results with its default value of True.
3.C - Visualizing Solution
Identify the 9-puzzle solution with the lowest path cost. If there is a tie, then select either solution. Call the generate_gif() method for the selected solution. This will display a gif animation of the solution to the puzzle.
3.D - Create 12-Puzzle Environment
Create an instance of the NPuzzle environment with 3 rows and 4 columns. Set scramble=200 and random_state=1. Use the display() method to display the initial state of the environment.
3.E - Solving 12-Puzzle
Apply the depth-first search, breadth-first search, and uniform-cost search algorithms to the environment created in 3.D. Set a time limit of 2 minutes for each algorithm. Store the solutions and the resulting log information into variables. Leave display_results with its default value of True.

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!