The goal of the project is to build an artificial intelligent that can solve n-puzzle problem using informed and uninformed search methods.
- Implement the n-puzzle problem.
- Your tool should accept n as input, along with the initial state. Initial state could be randomly generated as well.
- Your tool allows user to select search strategy as input.
- Solve the problem using the selected search strategy.
Given a n×n board with n^2 tiles (every tile has one number from 1 to n^2-1) and one empty space. The objective is to place the numbers on tiles to match final configuration using the empty space. You can slide four adjacent tiles (left, right, down and up) into the empty space. Figure below shows the target when n=4. Furthermore, each state will be represented as 2D array (array[n][n]), and the transition between states will be through moving the empty square, which will have the value of 0.
You can find more details about this project in the report file.
You should produce these Outputs at the end of the project:
- Total number of steps to reach solution (path cost).
- Total number of processed nodes until the strategy finds solution.
- Maximum number of nodes that have been stored concurrently.
- Simulation playback of the solution process showing the transitions from the initial state to the goal state. (time delay should be accepted as input)
The batch file above expresses some statistics and graphs that show and compare the results between the different algorithms. Take into concern that the results are relative to the user machine.
The code of the project contains third-party library of python like numpy
. so you need to install it in your machine and then start working.
last thing to mention is that, it's better to include venv (virtual environment) folder when installing the project. because it has all the settings of the project you need.
You can find the source code at n-puzzle file.