Best-first search (source code)

= Best-first search
{wiki=Best-first_search}

Best-first search is a type of search algorithm used in graph traversal and pathfinding. It explores a graph by expanding the most promising node according to a specified rule or heuristic. The main goal of Best-first search is to find the most effective path to the goal state with minimal cost, time, or distance, depending on how the heuristic is defined.