PHP code to solve Theseus and the Minotaur mazes, and generate animated .GIFs of the solution using ImageMagick