关于 8 拼图的 Hamming 和 Manhattan 优先级计算
About Hamming and Manhattan priorities computation for 8 puzzle
http://coursera.cs.princeton.edu/algs4/assignments/8puzzle.html
根据上述 link 计算的海明和曼哈顿优先级是否正确?
For example, the Hamming and Manhattan priorities of the initial search node below are 5 and 10, respectively.
Note that we do not count the blank square when computing the Hamming or Manhattan priorities.
因此,其中 3 个正确,5 个不正确。这给出了 5 作为汉明距离,需要一些小的操作才能看到曼哈顿优先级是 10。
http://coursera.cs.princeton.edu/algs4/assignments/8puzzle.html
根据上述 link 计算的海明和曼哈顿优先级是否正确?
For example, the Hamming and Manhattan priorities of the initial search node below are 5 and 10, respectively.
Note that we do not count the blank square when computing the Hamming or Manhattan priorities.
因此,其中 3 个正确,5 个不正确。这给出了 5 作为汉明距离,需要一些小的操作才能看到曼哈顿优先级是 10。