/8-Puzzle

8 Puzzle solved using A* algorithm

Primary LanguageJavaScript

8-Puzzle

The 8-puzzle problem is a classic sliding puzzle that is based on rearranging a 3x3 grid of numbered tiles by sliding them into an empty space. The objective is to reach the goal state from a given initial configuration, using the fewest possible moves.
In this project, A* search algorithm is used to solve this problem. A* algorithm intelligently explores possible moves by considering both the cost of reaching a certain state and an admissible heuristic that estimates the remaining distance to the goal state.

Instructions:

Click on the browser screen to start the algorithm.
If Alert Message pops up, it means that the initial state is not solvable. Click OK to refresh and start with a new random initial state.

Deployment Link: https://m-adil-as.github.io/8-Puzzle

8 Puzzle