八数码问题也称为九宫问题。在3×3的棋盘,摆有八个棋子,每个棋子上标有1至8的某一数字,不同棋子上标的数字不相同。棋盘上还有一个空格,与空格相邻的棋子可以移到空...
代码说明:
八数码问题也称为九宫问题。在3×3的棋盘,摆有八个棋子,每个棋子上标有1至8的某一数字,不同棋子上标的数字不相同。棋盘上还有一个空格,与空格相邻的棋子可以移到空格中。要求解决的问题是:给出一个初始状态和一个目标状态,找出一种从初始转变成目标状态的移动棋子步数最少的移动步骤。 -8 issue of the digital problem, also known as Nine-palace. In the 3 × 3 chessboard placed eight pieces, each piece is marked 1 to 8, a number of different pieces on the subject are not the same. There is also a board space, and spaces adjacent pieces can be moved to the space. To be resolved is: given an initial state and a target state, to find a target state from the initial movement into the least number of pieces of mobile steps step.
下载说明:请别用迅雷下载,失败请重下,重下不扣分!