What are some common admissible heuristics for distance? [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-08 11:15:41

问题


What are the most common heuristics used to estimate distance in intelligent search problems? In particular, I'm interested in metrics that can (usually) be used as admissible heuristics for A* search. I came across straight line distance and Manhattan distance but are there any others?


回答1:


Heuristics are something that tends to be very specific to a given problem, as the idea is to incorporate additional knowledge that you might have about that problem. So "general heuristics" isn't a very useful category. That said, it sounds like you are specifically talking about distance metrics, which is a slightly more well-defined subset.

In terms of admissible heuristics for distance, the two that you already mentioned are definitely the most common:

  • Straight line distance is the only admissible heuristic for general, unconstrained movement in space, because the shortest path between any two points is a straight line.
  • Of course, just about any challenging problem will have some constraints on movement. A common one of these constraints in that movement must occur along a single axis at a time, and for such problems, Manhattan distance is appropriate.

There are some other popular distance metrics, but they are less generally applicable as heuristics.

  • Chebyshev Distance - the distance along a single coordinate, whichever is bigger. While this should usually be admissible (it will underestimate because it doesn't take into account movement along the other axes), it is strictly less informative than Manhattan distance. There may be some occasions where this is useful, but they are uncommon.
  • Minkowski Distance - a general case of Manhattan Distance and Euclidean (straight line) distance. However, it is notably less intuitive than either of those special cases, so, again, I can't come up with a good example of when you would choose it over one of them.
  • Hamming Distance - This isn't applicable to all problems, but it is calculated as the minimum number of edits that you would need to make to two vectors to make them identical. Since it is the minimum number, it would potentially be admissible for some problems, such as the word mutation game with equal length words. (If word lengths were unequal you would need to use Levenshtein Distance, which allows gaps to be inserted. This takes a fairly long time to compute (O(n^2)) and so is less likely to be an efficient heuristic).
  • Canberra Distance, a sort of scaled Manhattan Distance, is often used for points scattered around the origin, but would be inadmissible in many cases.
  • Jaccard Distance is a similarity measure used when comparing sets of features. It weights presences of features more strongly than absences. Problems in which you need to use a heuristic on feature sets are relatively uncommon, so it's hard to know what reasonable default assumptions for admissibility would be. In general, I would guess that the asymmetry between present and absent features could make Jaccard distance inadmissible for some problems, but that it's likely to not be a problem if you truly only care about present features.

There are, of course, many other distance metrics, but these are most of the ones that are less popular than straight line and Manhattan distance while still being reasonably common.



来源:https://stackoverflow.com/questions/29225478/what-are-some-common-admissible-heuristics-for-distance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!