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 config...
I've heard that the 8-puzzle problem can be tackled via BFS, but I don't understand how. I wanna know the intermediate steps that I need to get from a board like this:
3 1 2
6 4 5
0 7 8
to
1 2 3
4 5 6
7 8 0
Are the intermediate steps "levels" on a BFS search?
By the way, this is basic homework, I don't care about optimality.
...
Could you please help me in implementing a Manhattan distance euristic algorithm in solving 8 puzzle or give a link where I can find a solution? Thanks in advance.
...