8 Puzzle Problem
The 8-puzzle is a square board with 9 positions, filled by 8 numbered
tiles and one gap. At any point, a tile adjacent to the gap can be moved
into the gap, creating a new gap position. In other words the gap can be
swapped with an adjacent (horizontally and vertically) tile. The objective in the game is to begin with an arbitrary configuration of tiles, and move them so
as to get the numbered tiles arranged in ascending order either running around the perimeter of the board
or ordered from left to right, with 1 in the top left-hand position. An example
scenario is shown below.
|Initial State||Goal State|
Here the goal state can be reached from the initial state at 5 simple steps given below.
- Blank Up
- Blank Up
- Blank Left
- Blank Down
- Blank Right
As mentioned earlier the goal state has two possible arrangements. These arrangements can be:
|Goal State A||Goal State B|
If you are willing to solve 8 puzzle problem, determining the goal to be reached from an arbitrary initial state can be tricky. A suggestion on the choosing the goal state is given in the 8 puzzle algorithm section of the site.
Also you can find the download link to the software that solves any given 8 puzzle problem with minimum number of moves in the 8 puzzle download section of the site.