What is the minimum amount of moves to transform from the above square to the below square?
Note:
A move is moving 1, 2 or 3 squares of the same row or column - which has one empty square - one square up, right, down or left without changing the original order of the squares that are moved. (Basically, you slide those squares.)
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Did some brute force. Note that from each position, there are only 3 horizontal moves and 3 vertical moves. And performing two horizontal or two vertical moves in row is sub optimal, so for a sequence of 15 moves there are 2×3^15=28 million possibilities. This should be within reach of brute force. Here is the code, that finds the (a) shortest solution and prints its steps: