Visualgos – The 8-Puzzle

I’ve just added a new problem visualization. The visualization is of the 8-Puzzle – a classic game in which you have a 3 by 3 board with tiles numbered 1 to 8, and one missing tile. Your goal is to bring the board to a state in which the tiles are ordered according to their numbers, and the empty spot is in the bottom right-hand corner. The only movements allowed are taking a tile that is adjacent to the empty spot and sliding it (horizontally or vertically) into the empty spot.

The visualizations added implement the DFS algorithm, the greedy algorithm and the A* algorithm.

You can find the visualization here, along with detailed information about the algorithms.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *