A Search* is a best-first graph traversal and pathfinding algorithm that finds the lowest-cost path from a start node to a goal node. It achieves optimal efficiency by combining the actual cost to reach a node, g(n), with a heuristic estimate of the remaining cost to the goal, h(n), to form a priority score: f(n) = g(n) + h(n). The algorithm always expands the node with the lowest f(n) score from an open set (frontier), moving it to a closed set once explored. For A* to guarantee an optimal solution, the heuristic h(n) must be admissible (never overestimates the true cost) and consistent (obeys the triangle inequality).
