Here is a small grid area of node id's from a larger grid.
52 53 54 55 56
102 103 104 105 106
152 153 154 155 156
202 203 204 205 206
252 253 254 255 256
Horizontal and vertical moves increment 10, diagonal increments 14. I am followig this tutorial ... http://www.policyalm...tarTutorial.htm
Node 103 is my starting node. So the lowest F score above takes me to node 154 from 103. I have calculated the G cost as follows from node 153.
14 10 14
10 10
14 10 14
Next iterations F score gives me node 205, so I then calculate G cost from node 205 and I get the following:
28 24 28
24 24
28 24 28
And one more iterations F score gives me node 256, so I calculate G cost from node 256:
42 38 42
38 38
42 38 42
Am I calculating G cost correctly?
Something I don't understand is after I choose the lowest F score, the G cost of 4 nodes is always the same and therefore I can't choose a lowest G cost at this point.
Any help much appreciated.