What is the Eight Puzzle Problem?

The Eight Puzzle is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The objective is to place the tiles in order by making sliding moves that use the empty space.

How A* Algorithm Solves It?

A* is an informed search algorithm that finds the shortest path between nodes in a graph. For the Eight Puzzle:

Statistics

Total States: 362,880 (9!)

Solvable States: 181,440 (9!/2)

Maximum Solution Steps: 31 moves

How to Use This Visualizer

  1. Random Generation: Click "Random" to create a random initial state
  2. Custom State: Click "Customize" to input your own puzzle state
  3. Navigation: Use "prev step" and "next step" to view the solution path