Got an exam on Monday which is probably going to have this in it. However I'm having a problem understanding part of my lecturers slides.. now I could ask him but it's now the weekend!
Heres whats from the slides:
A commonly used algorithm is a simplified
A* algorithm
This simplified A* algorithm uses a cost
function f(x) based on distance:
f(x) = g(x) + h(x)
where g(x) is the distance travelled from start node to node x
where h(x) is the distance from node x to end nodeAlgorithm:
1. Compare f(x) for all possible initial nodes
2. Select best node as the lowest distance cost
f(x)
3. Travel to next node(s) from the lowest
distance cost f(x) node
4. Compare f(x) for all of these nodes and that
from the other possible routes already
calculated
5. Repeat from 2 until reached end node
I think I understand most of it, but I don't understand how the middle dashed line is calculated? the distance that is 4.5... I would have thought you'd have to stick on the given paths?
Thanks!