Solutions to Homework Assignment #4

Last modified: "December 9, 1996 19:37:16 by matt"

From Russell and Norvig Artificial Intelligence, a Modern Approach:

4.6 Invent a heuristic function for the 8-puzzle that sometimes overestimtes, and show how it can lead to a suboptimal solution on a particular problem.

Many people do not understand optimal. A solution is suboptimal if there exists another solution node with a smaller g value. For example, using an inadmissable heuristic, A* can return a solution to an instance of the 8-puzzle consisting of, say, 5 moves, when there exists another (possibly optimal) solution that consists of only 4 moves.

Note that optimality has nothing to do with the number of nodes that are actually expanded to find the solution. For example, breadth-first search expands a great many nodes, but is optimal: the first solution it finds (i.e., chooses for expansion) is guaranteed to be optimal.

4.10 Would a bidirectional A* search be a good idea? Under what conditions would it be applicable.? Describe how the algorithm would work.

It is sometimes a good idea. Like any bidirectional search, the detection of when the two searches "meet" requires a lot of computation time. In the worst case, this can be O(n^2), where n is the size of the horizon of the search space at distance g/2, where g is the optimal solution path length.

There are two main conditions that must be met to allow bidirectional search is that it must be possible to determine the parents from a given node (that is, to work up the search tree/graph backwards). This is not possible in some search spaces. Secondly, there must be a single solution to work backward from. Many problems offer more than one solution, in which case it would be impossible to know which one to work backward from.

Provided this condition is met, the algorithm would maintain a pair of OPEN (the search horizon) and CLOSED (nodes already expanded) lists, one for each direction. On a serial machine, nodes could be chosen for expansion on an alternating basis from the two OPEN lists. After expansion, the new nodes would be compared against the elements of the other direction's OPEN & CLOSED nodes, [possibly just against OPEN, depending on some other factors]. If a match is found, we're done! Otherwise, the bidirectional A* algorithm works just the same as the unidirectional algorithm.