简体   繁体   English

一致启发式的证明暗示了可接受的条件

[英]Proof of consistent heuristic implies admissible condition

I was trying to prove that consistent heuristic implies the admissible condition我试图证明一致的启发式暗示了可接受的条件

one of the proofs that I read was mentioned here : 这里提到 我阅读的其中一个证明:

  1. let h(n) be the heuristic value at node n and c(n,n+1) the cost from node n to node n+1.让 h(n) 是节点 n 处的启发式值,c(n,n+1) 是从节点 n 到节点 n+1 的成本。

  2. we are given the assumption that h(ng)=0;我们假设 h(ng)=0; where ng is the goal node.其中 ng 是目标节点。

  3. Informally, we want to backtrack from the goal node showing that if we start with admissible node which h(ng)=0, its parent nodes will be admissible through the rule of consistency, and the pattern continues.非正式地,我们想从目标节点回溯,表明如果我们从 h(ng)=0 的可接纳节点开始,其父节点将通过一致性规则被接纳,并且模式继续。

  4. Consider some node n and assume the heuristic value at n is admissible.考虑某个节点 n 并假设 n 处的启发式值是可接受的。

  5. We want its parent nodes, say n-1, will also be admissible by the definition of consistency.我们希望它的父节点,比如 n-1,也可以被一致性的定义所接受。

  6. By consistency, we get that:通过一致性,我们得到:

    h(n-1)-h(n)<=c(n-1,n) so h(n-1)<= c(n-1,n)+h(n) h(n-1)-h(n)<=c(n-1,n) 所以 h(n-1)<= c(n-1,n)+h(n)

  7. c(n-1,n) is the actual path cost from n-1 to n. c(n-1,n) 是从 n-1 到 n 的实际路径成本。

  8. Since we know h(n) is admissible we know that h(n) has to be less than or equal to the path cost from n to ng.因为我们知道 h(n) 是可接受的,所以我们知道 h(n) 必须小于或等于从 n 到 ng 的路径成本。

  9. Thus, h(n-1) <= the path cost from (n-1 to n) + h(n) .因此, h(n-1) <= 从 (n-1 到 n) + h(n) 的路径成本。

  10. Since h(n) is less than or equal to path cost from (n to ng), h(n-1) <= path cost from (n-1 to ng).由于 h(n) 小于或等于从 (n 到 ng) 的路径成本,因此 h(n-1) <= 从 (n-1 到 ng) 的路径成本。

My question is: in the step 7: c(n-1,n) is the actual path cost from n-1 to n how do they sate that c(n-1,n) is the actual path?我的问题是:在第 7 步中: c(n-1,n) 是从 n-1 到 n 的实际路径成本他们如何确定 c(n-1,n) 是实际路径? since from this assumption they mean by actual path the lowest cost path?因为根据这个假设,他们所说的实际路径是最低成本路径?

In the same reference they also gave formal proof:在同一个参考文献中,他们还给出了正式的证明:

  1. Assume we have some consistent heuristic h.假设我们有一些一致的启发式 h。 Also assume h(ng)=0, where ng is a goal node.还假设 h(ng)=0,其中 ng 是目标节点。

  2. By definition of consistency, h(n)<=c(n,n+1)+h(n+1) for all nodes n in the graph.根据一致性的定义,对于图中的所有节点 n,h(n)<=c(n,n+1)+h(n+1)。

  3. we want to show that for all n, h(n)<= h*(n)我们想证明对于所有 n,h(n)<= h*(n)

  4. Base case: we begin considering the ng-1 the node in any path where ng denotes the goal state:基本情况:我们开始考虑 ng-1 任何路径中的节点,其中 ng 表示目标状态:

    h(ng-1)<=c(ng-1,ng)+h(ng) h(ng-1)<=c(ng-1,ng)+h(ng)

  5. Because ng is the best goal state, by assumption, h(ng)=h*(ng)因为ng是最佳目标状态,通过假设,h(ng)=h*(ng)

  6. Therefore we can re-write the above as:因此,我们可以将上面的内容重写为:

    h(ng-1)<= c(ng-1,ng)+h*(ng) h(ng-1)<= c(ng-1,ng)+h*(ng)

  7. and given that鉴于

    c(ng-1,ng)+h*(ng)=h*(ng-1) we can see h(ng-1)<=h*(ng-1) c(ng-1,ng)+h*(ng)=h*(ng-1) 我们可以看到 h(ng-1)<=h*(ng-1)

  8. Inductive Hypothesis: Assume that for some arbitrary node (which lies on a path from goal) ng-k than h(ng-k)<=h*(ng-k).归纳假设:假设对于某个任意节点(位于距离目标的路径上)ng-k 比 h(ng-k)<=h*(ng-k)。

  9. Inductive step: to see if this is always the case, we consider the ng-k-1th:归纳步骤:为了查看是否总是如此,我们考虑 ng-k-1th:

h(ng-k-1)<=c(ng-k-1,ng-k)+h(ng-k)
  1. From our base case, we know that:从我们的基本案例中,我们知道:
h(ng-k-1)<=c(ng-k-1,ng-k)+h(ng-k)<= c(ng-k-1,ng-k)+h*(ng-k)
h(ng-k-1)<=c(ng-k-1,ng-k)+h*(ng-k)
  1. Again we know that:我们再次知道:
h(ng-k-1,ng-k)+h*(ng-k)=h*(ng-k-1) 
so we can see :
h(ng-k-1)<=h*(ng-k-1) 

again the same question for steps 8 and 12, why are we considering: c(the node, the next node) + h*( the next node ) = h*(the node)?对于第 8 步和第 12 步,同样的问题,为什么我们要考虑:c(节点,下一个节点)+ h*(下一个节点)= h*(节点)?

I was able to prove that:我能够证明:

c(ng-1,ng)+h*(ng)=h*(ng-1) we can say h(ng-1)<=h*(ng-1) c(ng-1,ng)+h*(ng)=h*(ng-1) 我们可以说 h(ng-1)<=h*(ng-1)

if c(ng-1,ng) was not the best path from ng-1 to the goal, let's suppose that there is another one from ng-1 to ng'-1 to g which is the optimal path so:如果 c(ng-1,ng) 不是从 ng-1 到目标的最佳路径,我们假设还有另一个从 ng-1 到 ng'-1 到 g 的最佳路径,所以:

ng-1 --> ng'-1 --> g is the best path ng-1 --> ng'-1 --> g 是最佳路径

since h is consistent:因为 h 是一致的:

h(ng'-1)<=c(ng'-1,g) + h(g) : h(g) =0 so h(ng'-1)<=c(ng'-1,g) h(ng'-1)<=c(ng'-1,g) + h(g) : h(g) =0 所以 h(ng'-1)<=c(ng'-1,g)

h(ng-1)<=c(ng-1,ng'-1) + h(ng'-1) so h(ng-1)<=c(ng-1,ng'-1) + h(ng'-1) 所以

h(ng-1)<=c(ng-1,ng'-1) +c(ng'-1,g) which is the optimal path h(ng-1)<=c(ng-1,ng'-1) +c(ng'-1,g) 这是最优路径

it is correct for also any optimal path with more number of nodes对于具有更多节点数的任何最佳路径也是正确的

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

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