简体   繁体   English

A *搜索是否会多次扩展同一节点?

[英]Does A* search expand the same node more than once?

The A* search seems to recalculate the f-value for Arad, Sibiu and other repeated states, which it shouldn't be doing since these nodes have already been expanded and are in the closed state. A *搜索似乎重新计算了Arad,Sibiu和其他重复状态的f值,这是不应该做的,因为这些节点已经扩展并且处于关闭状态。 So what am I missing here? 那我在这里想念什么? (Image from Russel and Norvig - Artificial Intelligence. (图片来自Russel和Norvig-人工智能。

Image: 图片: 在此处输入图片说明

In this case, these nodes aren't expanded since their f-values are more than the optimal path, what if that wasn't the case? 在这种情况下,这些节点不会扩展,因为它们的f值大于最佳路径,如果不是这种情况怎么办? ie what if the nearest f-value was to go back to the predecessor node? 即,如果最接近的f值返回到先前节点,该怎么办? Would the A* do that? A *会这样做吗?

Most A* algorithms backtrack, which means that a node can only be visited once. 大多数A *算法都会回溯,这意味着一个节点只能被访问一次。 Otherwise the chain of back-pointers is broken and the path cannot be recovered. 否则,反向指针链将断开,并且路径将无法恢复。 However you could concievably have a situation whereby a node lower down in the priority queue can access an visited node with lower cost, if diagonal moves are more expensive than square moves. 但是,如果对角线移动的费用比方形移动的费用高,您可能会想到一种情况,即优先级队列中位于较低位置的节点可以以较低的成本访问被访问的节点。 Normally you'd ignore that and treat the visited node as unvisitable - unless you're using a weird and wonderful heuristic or have a very odd graph, it's hardly going to make a difference to path length. 通常,您会忽略该错误并将访问的节点视为不可见的-除非您使用怪异而奇妙的启发式算法或具有非常奇特的图形,否则几乎不会对路径长度产生影响。

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

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