Game Development Reference
In-Depth Information
4
.
Calculate the Manhattan and Euclidean distances between the red and
green nodes in the following diagram:
5
.
The A* algorithm is being applied to the following data. Nodes adjacent
to the current node have been added, so the algorithm needs to select a
new current node. Calculate the
f
(
x
) cost of each node in the open set (in
blue) using a Manhattan heuristic, and assume diagonal travel is not al-
lowed. Which node is selected as the new current node?