↑ arvau

Wikipedia / Bidirectional search

Bidirectional search is a graph search algorithm that finds a shortest path from an initial vertex to a goal vertex in a directed graph. It runs two simultaneous searches: one forward from the initial state, and one backward from the goal, stopping when the two meet. The reason for this approach is that in many cases it is faster: for instance, in a simplified model of search problem complexity in which both searches expand a tree with branching factor b, and the distance from start to goal is d, each of the two searches has complexity O(bd/2) (in Big O notation), and the sum of these two search times is much less than the O(bd) complexity that would result from a single search from the beginning to the goal.

Andrew Goldberg and others explained the correct termination conditions for the bidirectional version of Dijkstra’s Algorithm.

As in A* search, bi-directional search can be guided by a heuristic estimate of the remaining distance to the goal (in the forward tree) or from the start (in the backward tree).

Ira Pohl was the first one to design and implement a bi-directional heuristic search algorithm. Search trees emanating from the start and goal nodes failed to meet in the middle of the solution space. The BHFFA algorithm of de Champeaux fixed this defect.

A solution found by the uni-directional A* algorithm using an admissible heuristic has a shortest path length; the same property holds for the BHFFA2 bidirectional heuristic version described by de Champeaux . BHFFA2 has, among others, more careful termination conditions than BHFFA.

Description

A Bidirectional Heuristic Search is a state space search.

. This has often been likened to a one-way street in the route-finding domain: it is not necessary to be able to travel down both directions, but it is necessary when standing at the end of the street to determine the beginning of the street as a possible route.

.

Terminology and notation

  1. : the branching factor of a search tree

  2. and the goal

  3. : the start state

  4. , not to be confused with the function)

  5. is equal to 1 for the forward direction and 2 for the backward direction

  6. )

  7. ). It is from this set that a node is chosen for expansion. In bidirectional search, these are sometimes called the search 'frontiers' or 'wavefronts', referring to how they appear when a search is represented graphically. In this metaphor, a 'collision' occurs when, during the expansion phase, a node from one wavefront is found to have successors in the opposing wavefront.

  8. . This set contains the nodes already visited by the search

Bidirectional algorithms can be broadly split into three categories: Front-to-Front, Front-to-Back (or Front-to-End), and Perimeter Search. These differ by the function used to calculate the heuristic.

Front-to-back

.

Front-to-Back is the most actively researched of the three categories. As of 2004, the current best algorithm (at least in the Fifteen puzzle domain) is the BiMAX-BS*F algorithm.

Front-to-front

Front-to-Front algorithms calculate the value of a node by using the heuristic estimate between . The canonical example is that of the BHFFA (bidirectional heuristic front-to-front algorithm), where the function is defined as the minimum of all heuristic estimates between the current node and the nodes on the opposing front. Or, formally:

returns an admissible (i.e. not overestimating) heuristic estimate of the distance between nodes and .

Front-to-Front suffers from being excessively computationally demanding. Every time a node value must be calculated. This involves calculating a heuristic estimate from to every node in the opposing set, as described above. The sets increase in size exponentially for all domains with .

References

Further reading

  • .