A*算法解决八数码
代码说明:
题目 The 15-puzzle has been around for over 100 years; even if you don"t know it by that name, you"ve seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed into a 4 by 4 frame with one tile missing. Let"s call the missing tile "x"; the object of the puzzle is to arrange the tiles so that they are ordered as: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 x where the only legal operation is to exchange "x" with one of the tiles with which it shares an edge. As an example, the following sequence of moves solves a slightly scrambled puzzle:
下载说明:请别用迅雷下载,失败请重下,重下不扣分!