Artificial intelligence 我如何判断一个特定的启发是否可以接受,为什么我的不可以?

Artificial intelligence 我如何判断一个特定的启发是否可以接受,为什么我的不可以?,artificial-intelligence,path-finding,heuristics,pacman,Artificial Intelligence,Path Finding,Heuristics,Pacman,可接受启发式的定义是“不会高估特定目标的路径”。 我正在尝试编写一个吃豆人启发式程序,以找到吃点的最快方法,其中一些点随机散布在网格中。然而,它没有通过我的受理测试。 以下是我的算法步骤: sum = 0, list = grid.getListofDots() 1. Find nearest dot from starting position (or previous dot that was removed) using manhattan distance 2. add to sum 3

可接受启发式的定义是“不会高估特定目标的路径”。 我正在尝试编写一个吃豆人启发式程序,以找到吃点的最快方法,其中一些点随机散布在网格中。然而,它没有通过我的受理测试。 以下是我的算法步骤:

sum = 0, list = grid.getListofDots()
1. Find nearest dot from starting position (or previous dot that was removed) using manhattan distance
2. add to sum
3. Remove dot from list of possible dots
4. repeat steps 1 - 3 until list is empty
5. return the sum
既然我用的是曼哈顿距离,这不是可以接受的吗?如果没有,是否有任何建议或其他方法使该算法可接受

你的启发法是不可接受的。另一个例子是:

您的成本是9,但最佳路径的成本是6


一个非常非常简单的可接受启发法是:

number_of_remaining_dots
但它不是很紧。一个小的改进是:

manhattan_distance_to_nearest_dot + dots_left_out
其他可能性包括:

distance_to_nearest_dot   // Found via Breadth-first search


你考虑距离你所在的距离,但是移动改变了所有的距离。但是如果我使用点的曼哈顿距离,我就去了,这不是确定它仍然是可接受的吗?你考虑一些距离两次。考虑这一点:<代码> *y** *c**/COD>(有3个空格)。Pacman是
C
*
是点,
\uuu
是一个空白。你的算法计算11。(左,右,左)。最佳值为9(先向右)。
manhattan_distance_to_farthest_dot