 <p>I'm not sure why you would want to use a hill-climbing algorithm, since Djikstra's algorithm is polynomial complexity O( | E | + | V | log | V | ) using Fibonacci queues: <a href="http://en.wikipedia.org/wiki/Dijkstra" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Dijkstra</a>'s_algorithm</p> <p>If you're looking for an heuristic approach to the single-path problem, then you can use A*: <a href="http://en.wikipedia.org/wiki/A" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/A</a>*_search_algorithm</p> <p>but an improvement in efficiency is dependent on having an admissible heuristic estimate of the distance to the goal. <a href="http://en.wikipedia.org/wiki/A" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/A</a>*_search_algorithm</p>