As depicted in the following figures, consider an 8-puzzle, which is an example of a
two-dimensional sliding-tile game environment. In this puzzle, there are eight
numbered tiles (1..8) that can be moved into various cells/locations. As depicted in
the left figure, tiles begin in a random starting location. In this particular example, the
tiles are arranged in the rows and columns as [(7, 2, 4), (5, blank, 6), (8, 3, 1)]. The
only tiles that can be moved on a turn are those adjacent to the blank location.
Hence, in this starting state, the 2 can be moved down to the center, the 5 right to
the center, the 6 left to the center, and the 3 up to the center. No other tile can be
moved since it would require picking it up in a third z-dimension. The goal is to slide
one tile at a time to achieve the goal arrangement depicted in the right figure, which
has the row and column arrangement of [(blank, 1, 2), (3, 4, 5), (6, 7, 8)].
Starting Tile Arrangement
Winning (Goal)
Arrangement
7
2
4
1
2
5
6
3
4
5
8
3
1
6
7
8