Number Swapping Game
The Initial Board Setup:
The Rules:
- A move is made by selecting one of the 9 cells.
- When a cell is selected, the number in that cell swaps places with the largest number in any adjacent cell (horizontally, vertically, or diagonally), but only if that number is larger than the number in the selected cell.
- The letters do not move. They are labels for the cells, so that you can easily represent a list of moves.
- A list of moves is made by simply putting the letters together, in order from left to right. For example, ADG
Note: Not all moves will change the board (such as the move I on move #1), so it's wise to not make those types of moves.
For example, after the move A is made on the initial board, the board looks like this:
Taking this example further, after another move is made, F, the board looks like this:
The Object of the Game:
Reverse the order of the numbers so that the board looks like this:
The answer that uses the fewest number of moves wins. I thought up this little puzzle today and created a simple program so that I could mess around with it, and after about an hour of trial and error, the shortest solution I ended up finding was 16 moves long. I have no idea if that is optimal.
So, if you find a solution that is 16 or less moves, I will upvote your answer.
To get marked as the accepted answer, you must prove that a certain number (16 or less) is optimal, whether by using brute force and sharing your code, or by some elegant proof (which is worded, as much as possible, so that most people can understand)