15 Logical heuristic

15 Puzzle- A classic problem for modeling algorithms related to heuristics. Commonly used heuristics for this problem include counting the number of non-local fragments and finding the sum of the Manhattan distances between each block and its position in the target configuration. Please note that both are valid, i.e. They never overestimate the number of movements on the left, which ensures optimality for certain search algorithms, such as A *.

  • How you think Heuristic, A*it seems pleasant, you have an example, perhaps c, or java?
+3
source share
2 answers

Heuristic

, , - , 15Puzzle .

(Skiena 1990, . 29, Knuth 1998).

, , . , . , 80 .

:

enter image description here

0 16 {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000}. , WolframAlpha [ 1,20]!

, : 15Puzzle.

+8

All Articles