I have a sea of weighted nodes with edges linking clusters of nodes together. This graph follows the typical small world layout.
I wish to find a path finding algori
Definitely A*. A* will either find the best path possible or no path at all if no path exists. E.g. the path of this boat has been calculated using A*
(source: cokeandcode.com)
Here's an interactive Java Demo to play with. Please note that this algorithm is slowed down by sleeps, so you see it performing. Without this slow down it would find the path in less than a second.
The algorithm is simple, yet powerful. Each node has 3 values, g is the cost up to this node. h is the estimated cost from this node to the target and f is the sum of both (it's a guess for the full path). A* maintains two lists, the Open and the Closed list. The Open list contains all nodes that have not been explored so far. The Closed list all nodes that have been explored. A node counts as explored if the algorithm has already tested every node connected to this node (connected could only mean horizontally and vertically, but also diagonal if diagonal moves between nodes are allowed).
The algorithm could be described as
Also have a look at Wikipedia for implementation details.