Most viewed recipes tagged "puzzle_solver"http://code.activestate.com/recipes/tags/puzzle_solver/views/2009-03-16T13:35:05-07:00ActiveState Code RecipesSliding Block Puzzle Solver (Python) 2009-03-16T13:35:05-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/576692-sliding-block-puzzle-solver/ <p style="color: grey"> Python recipe 576692 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/breadth_first_search/">breadth_first_search</a>, <a href="/recipes/tags/puzzle_solver/">puzzle_solver</a>). </p> <p>Recently, I was playing a game called "An Untitled Story" and was frustrated at some of the puzzles it contained. One such puzzle type was a sliding block puzzle game that presented the player with walls, movable blocks, and targets that you had to place the blocks on. The blocks could be moved an infinite amount of times, but once put into motion, they would continue until they hit either a wall or another block. To help solve these puzzle, I wrote the following program to figure out the solutions for me. It can find valid answers far faster than the human mind. The program is somewhat messy but looks much better than its first version.</p>