Heuristic search techniques use heuristics or rules of thumb to guide the search for a solution more efficiently than uninformed search. A* search is a best-first search algorithm that finds optimal solutions by evaluating nodes with a cost function f(n) = g(n) + h(n), where g(n) is the cost from the starting node to node n and h(n) is a heuristic estimate of the cost from n to the goal. The better the heuristic approximates the actual remaining cost, the more efficient the A* search is, with the optimal case being linear time if h(n) exactly equals the true cost.