-1

I read this article: http://www.policyalmanac.org/games/aStarTutorial.htm, but i don't understand how is calculated G cost. I know those child's on corner of his parent have bigger score but there is probably another calculation to check distance from current to start node.

Please help.

4

1 回答 1

2

在文章中,
如果你水平或垂直移动,G=10,如果你
从一个正方形到另一个正方形对角线移动,G=14。

因此,如果您从起始格G = 0+10
水平移动,最初 G 为 0。然后从那里垂直或水平移动意味着G=10+10
,如果对角线表示G=10+14

于 2013-02-18T12:51:12.570 回答