8 Puzzle Player

This is a simple 8 puzzle solver that solves a randomly generated puzzle.  You can choose either a straight forward depth first search algorithm, or a greedy algorithm (based on the “goodness” of the board) as the search strategy. The player shows each move as it tries it, so each you can see each node it visits in the search graph. The chart below shows the goodness of the board over the last 20 moves. The goodness of the board is defined to be the summation of the Manhattan distances of all the pieces to their correct location (or the number of moves each piece would have to make to get to the correct spot if it could move through other pieces). This player is definitely still in development, and could be more efficient and less prone to getting stuck. If anything, it’s fun to watch!

     
     
     

START