best first search algorithm in artificial intelligence with example