0

You have a 4×4 grid containing pieces numbered 1 to 16, of which you choose the order. To move the pieces you swap the positions of 2 pieces. Tiles must be swapped with adjacent tiles. The goal to to solve the puzzle in as few moves as possible, showing all steps. The steps are which 2 pieces swap positions for each move. Pieces could be referred to by their position or their number.

The starting layout for the grid is:

10 15 9 1
14 8 13 6
2 16 7 11
3 12 5 4

And the resolved grid output is:

1 2 3 4
5 6 7 8
9 10 11 1213 14 15 16