Breadth-first tree search 2026-10-25
The tree search version of breadth-first search explores action histories in nondecreasing length without automatically removing repeated states. A finite branching factor ensures that every finite depth contains finitely many histories, so the method is a complete search algorithm for goals reachable at finite depth. With equal positive action costs it is an optimal search algorithm for total action cost. It need not terminate on an unsolvable instance with an infinite search tree, and it need not optimize a terminal reward unrelated to depth.
Greedy best-first search 2026-10-25
Best-first search using only a heuristic function estimating remaining goal cost, without adding accumulated path cost. A comparator supplying the same total ordering of estimates suffices to choose expansions even if numeric estimates are unavailable. In general it need not be a complete search algorithm or an optimal search algorithm; particular stronger information or finite-graph policies can supply additional guarantees.
None of the three variants is an optimal search algorithm in general. The following single search tree supplies counterexamples for all three. Its heuristic function is nonnegative, admissible and even a consistent heuristic.
Figure 1.
One four-node search tree showing the failure of each altered A-star rule
. Details.
The least-cost goal is , reached at cost ; the other goal costs . Assign , , and zero to both goals. For the first variant, expanding generates and immediately returns it, before can be expanded. A goal test at generation therefore returns cost .
For priority , the root's children have priorities for and for . Expanding generates with priority . The algorithm next selects , again returning cost .
For priority , the root's children instead have priorities for and for . The suboptimal goal is selected immediately. The example uses no tie-breaking assumption. In contrast, ordinary A-star search with its goal test on selection compares the genuine estimated total costs and returns .
Breadth-first tree search is complete and optimal for minimizing rounds. If a successful escape has finite length , there are only finitely many nodes at depths below , since the branching factor is at most five. Breadth-first tree search therefore reaches a shallowest successful node after finite work, even if other branches continue forever.
It is an optimal search algorithm because every search transition model step costs one round, so minimum depth is exactly the desired minimum number of rounds. The goal test must be applied to the surviving complete-round successor. Here a complete search algorithm guarantees finding an escape when one exists; it need not terminate on every unsolvable instance.