4
我想了解在维基百科上深度限制搜索的算法,我试图找出究竟是什么意思来扩大节点。我试图寻找一个答案,但我得到的是更多的算法,说明节点必须扩大。展开节点是什么意思?
具体来说,stack := expand (node)
就整个功能而言是怎么说的?
DLS(node, goal, depth)
{
if (node == goal)
return node;
push_stack(node);
while (stack is not empty)
{
if (depth > 0)
{
stack := expand (node)
node = stack.pop();
DLS(node, goal, depth-1);
}
else
// no operation
}
}
我明白了。你认为你可以指出我更好的例子吗?我似乎无法找到关于维基百科之外的深度限制搜索的内容。 – Rowhawn 2011-02-11 02:17:48