Judea Pearl described best-first search as estimating the promise of node n by a "heuristic evaluation function
"[1][2] Some authors have used "best-first search" to refer specifically to a search with a heuristic that attempts to predict how close the end of a path is to a solution (or, goal), so that paths which are judged to be closer to a solution (or, goal) are expanded first.
[3] Efficient selection of the current best candidate for extension is typically implemented using a priority queue.
Best-first algorithms are often used for path finding in combinatorial search.
This implementation keeps track of visited nodes, and can therefore be used for undirected graphs.