in reply to Puzzle solver (rush hour)

How would you propose to change the algorithm to come to a short solution fast?!
I haven't looked at your code, just read your description. However, the classical way is to do breadth-first, instead of depth-first. Outline: In fact, this is just Dijkstra's algorithm applied on a graph where each vertex of the graph is a possible position of the puzzle, and there's an edge between two positions one can go from one position to the other in a single move.

I leave it up to the reader to turn the TAOCP style of describing the algorithm into a "real" program.