简体   繁体   English

如何证明兼容的启发式算法可以成为A *搜索算法中的一个可接受的启发式算法

[英]how to prove a compatible heuristics can be a admissible heuristics in A* search algorithm

compatible heuristics (h) is the one that has below condition: 兼容的启发式(h)是具有以下条件的:

h(n) <= c(n,a,n') + h(n') h(n)<= c(n,a,n')+ h(n')

兼容的启发式

****************************************************

admissible heuristics (h) is the one that has below condition: 可接受的启发式(h)是具有以下条件的:

0 <= h(n) <= h*(n) 0 <= h(n)<= h *(n)

h*(n) is the real distance from node n to the goal h *(n)是从节点ngoal的实际距离

If a heuristic is compatible, how to prove it is admissible ? 如果启发式兼容,如何证明它是可以接受的?

Thanks a lot. 非常感谢。

Assume that h(n) is not admissible, so there exists some vertex n such that h(n) > h*(n) . 假设h(n)不可接受,因此存在一些顶点n使得h(n) > h *(n)

But because of the compatibility of h(n) , we know that for all n` it holds that h(n) <= c(n,a,n') + h(n') . 但由于h(n)的兼容性,我们知道对于所有n`,它认为h(n)<= c(n,a,n')+ h(n')

Now combine these two predicates when n` is the vertex G to deduce a contradiction, thus proving the required lemma reduction ad absurdum . 现在结合这两个谓词,当n`是顶点G时 ,推导出一个矛盾,从而证明了所需的引理减少和荒谬

If you add an additional condition on h (namely that h(goal) = 0), you can prove it by induction over the minimum cost path from n to the goal state. 如果你在h上添加一个附加条件(即h(目标)= 0),你可以通过归纳从n到目标状态的最小成本路径来证明它。

For the base case, the minimum cost path is 0, when n = goal. 对于基本情况,当n =目标时,最小成本路径为0。 Then h(goal) = 0 = h*(goal). 然后h(目标)= 0 = h *(目标)。

For the general case, let n be a node and let n' be the next node on a minimal path from n to goal. 对于一般情况,让n为节点,让n'成为从n到目标的最小路径上的下一个节点。 Then h*(n) = c(n, n') + h*(n') >= c(n, n') + h(n') >= h(n) using the induction hypothesis to get the first inequality and the definition of compatibility for the second. 然后h *(n)= c(n,n')+ h *(n')> = c(n,n')+ h(n')> = h(n)使用归纳假设得到第一个不等式和第二种兼容性的定义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM