https://en.wikipedia.org/wiki/15_puzzle
https://www.jaapsch.net/puzzles/fifteen.htm
https://www.jaapsch.net/puzzles/javascript/fifteenj.htm
https://link.springer.com/content/pdf/10.3758%2FBF03193214.pdf
https://github.com/MilanPecov/15-Puzzle-Solvers
上面的链接有个问题会出错,长时间给不出结果:
Puzzle([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 0], [13, 12, 14, 15]])
下面的程序给出了正确结果:
https://github.com/shahmk/15-puzzle-solver
./a.out 1 0102030405060708091011SS13121415
BFS USED
Expanded: 15675 nodes
Max Frontier: 16375 nodes
010203040506070809101112131415SS
path to solution: dllurdrulldrr
没有评论:
发表评论