The Best-First search traverses a tree from top to bottom and searches for nodes on the same level first before descending to the next level. Nodes on the search frontier (nodes on the same level) are selected based on some evaluating function that is defined depending on the nature of the problem (heuristics function) and the estimated cost. The evaluating function f(n) is therefore the sum of the heuristic function h(n) and the estimated cost g(n). This algorithm is complete as it will always find the solution if it exists but it not optimal as it might find a solution of longer length depending on the heuristic function applied. The time and space complexity is both O(bm) where b is the branching factor and m is the tree depth. …show more content…
To solve the memory requirements issue associated with Best-First algorithm, a constraint can be imposed, called a beam width B that specifies a number for the set of nodes that are selected for expansion and stored during each level of the search. This is called Beam search. Beam search uses a heuristics function to determine which nodes are closest to the goal node and only the best B nodes are stored and expanded further at each level. The rest are