Using heuristics to guide the search towards the goal.
Informed search strategies dramatically improve upon uninformed methods by using problem-specific knowledge to guide the search process. This knowledge is encapsulated in a 'heuristic function,' denoted h(n), which provides an estimate of the cost to get from a given node 'n' to the goal. A good heuristic helps the algorithm make more intelligent choices about which path to explore next, steering it towards the goal and avoiding unpromising branches. The A* (pronounced 'A-star') search algorithm is the most widely known and powerful informed search algorithm. It combines the strengths of two other methods: Uniform Cost Search (which minimizes the cost from the start, g(n)) and Greedy Best-First Search (which minimizes the estimated cost to the goal, h(n)). A* evaluates nodes by combining these two values into a single evaluation function: f(n) = g(n) + h(n). Here, g(n) is the actual cost of the path from the initial state to node n, and h(n) is the heuristic estimate of the cost from n to the goal. By always choosing to expand the node with the lowest f(n) value, A* intelligently balances exploration of low-cost paths with a direct pursuit of the goal. The power of A* lies in its properties of completeness and optimality. A* is guaranteed to find the cheapest solution path from the start to the goal, provided that its heuristic function is 'admissible'—meaning it never overestimates the true cost to reach the goal. This combination of efficiency and optimality makes A* a cornerstone algorithm in AI, used in applications ranging from pathfinding in video games to route planning in GPS systems.