explanation of the best first search algorithm 3989326