next up previous contents
Next: Other Strategies for Up: Hunters and Gatherers Previous: Tsang's Algorithm

Branch-and-Bound

Branch-and-bound (BB) techniques can be used to reduce the amount of search needed to find the optimal solution. BB is based on a common-sense principle: do not keep trying a path that you already know is worse than the best answer.gif One of the first articles on branch-and-bound was (Lawler and Wood, 1966). A more readable introduction is in (Winston, 1984). A simple algorithm describes the method (mostly from (Winston, 1984)):

  1. Form a queue of partial paths. Let the initial queue consist of the zero-length, zero-step path from the root node to nowhere. Let the optimal-path be an infinite-length path.

  2. Until the queue is empty or the first path in the queue has length longer than the optimal-path.

    1. Remove the first path from the queue.
    2. Form new paths by extending the removed path one step, if possible.
    3. If any of the new paths reach the goal, and the shortest of these is shorter than the optimal path, set the optimal path to it. Remove all paths in the queue with length greater than this new optimal-path.
    4. add all the new paths (except any that reach the goal) with length less than the optimal-path length to the queue, sorting the queue with the smallest length paths in the front.

  3. If optimal-path has non-infinite length, return it; otherwise announce failure.

  
Figure 8: Branch-and-Bound

The example given in the introduction will be repeated and explained here. Figure 4 is repeated as Figure 8. Paths would be created for each of the initial arcs from the start. The path with the arc labeled with the circled 1 would be expanded first, since it has the shortest total length. Arc 2 is added to it, giving a total length of 4. Because this is still shorter than any other path, it is extended again by adding arc 3 to it, yielding a total path length of 6. At this point, the path with arc 4, with a length of 5, is shorter than the 1-2-3 path. It is expanded to give a path of length 9. The first path is again the shortest, so it is extended to give path 1-2-3-5, which reaches the goal in a length of 8. Optimal-path would, at this point, be set to this path. The path including arc 4 would be discarded now, since it already has length greater than the optimal-path. The path with arc 6, however, only has length 7. It is extended, yielding a path of length 12. Because there are no more paths with lengths less than 8, the process is terminated and optimal-path is returned.

This, of course, is a simplified example. Most search problems do not have all possible paths ending up at the goal. Most nodes have multiple branches. Cyclical paths can cause problems. Nevertheless, the BB procedure can be used to find the optimal solution, despite these complications. Various other techniques, with constraint satisfaction being the most relevant here, can be used to further optimize. Heuristics which estimate the distance from a node to the goal state can also be used.gif

BB is useful for searches where the optimal solution is needed. If any valid solution is desired, a depth-first search is indicated. If a solution with the smallest number of arcs is desired, a breadth-first search would be more advantageous. Below, we will demonstrate how BB techniques can be used in combination with solution synthesis and constraint satisfaction to produce an extremely efficient computational semantic problem solver.



next up previous contents
Next: Other Strategies for Up: Hunters and Gatherers Previous: Tsang's Algorithm



Steve Beale
Wed Mar 26 09:27:50 MST 1997