Some of the characters in a game will move and interact independently. Taylor is going to use graphs to plan the movements that each character can take within the game.
DancerGold
is one character. The graph shown in Fig. 1 shows the possible movements that DancerGold
can make.
DancerGold
’s starting state is represented by node A. DancerGold
can take any of the paths to reach the end state represented by node G.
The number on each path represents the number of seconds each movement takes.
The number in bold below each node is the heuristic value from A.
Perform an A* algorithm on the graph shown in Fig. 1 to find the shortest path from the starting node to the end node.
Show your working, the nodes visited and the distance.
You may choose to use the table below to give your answer.
Node | Distance travelled | Heuristic | Distance travelled + Heuristic | Previous node |
---|
| | | | |
| | | | |
| | | | |
| | | | |