SE701:8 Slider Puzzle
Jump to navigation
Jump to search
The problem. The 8 puzzle is a game invented by Sam Loyd in the 1870s. It is played on a 3-by-3 grid with 8 square tiles labeled 1 through 8 and a blank square. Your goal is to rearrange the tiles so that they are in order. You are permitted to slide tiles horizontally or vertically (but not diagonally) into the blank square. The following shows a sequence of legal moves from an initial board configuration to the desired solution.
Idea from : http://www.cs.princeton.edu/courses/archive/spring03/cs226/assignments/8puzzle.html