An algorithm for searching the shortest path of  the classic  Panama Puzzle.