I have developed a game called Tricky Animals where the goal is to reorder the animals in the right order with three permutations: $A = (1,2), X = (2,3,..,n-1), B = (n-1, n)$. The game can be played for free on http://www.tricky-animals.de. Notice that $A,X,B$ generate the whole symmetric group, hence every puzzle can be solved.
Now my question is this:
Is there an algorithm on how to solve a given puzzle (with possibly a minimal number of steps)? If so, that would be great, since it means:
a) I can calculate how difficult the puzzle is, based on the number of steps to solve it
b) I could possibly implement automatic hints in the game.
Thanks for your time!
P.S: If you enjoy playing permutation puzzles, try solving puzzle 220 with 6 steps! ;)
Edit: I updated the site http://www.tricky-animals.de to better navigate through the puzzles, since most users don't want to click that often to navigate through the puzzles. (Thanks for your input on this!)
Now if you click on the animals at the top, the game will jump to the corresponding puzzle with the number of animals.