Issues in Search
For general principles in the design of heuristic functions, an example is the "means-ends analysis" used in the "General Problem Solver". The idea is to measure the difference between the current state and the goal state, and to choose actions that reduce the difference as much as possible. See Section 13.1 for more description.
Heuristic search can be successfully used when
[All options are listed at each step]
To represent a problem solving as heuristic search in a state graph assumes that all possibilities are taken into consideration at the same time, and the best is selected to follow.
First, available "operations" often exist in different "space", and to compare them is improper. The solution is to group the operations into a hierarchy, and solve the problem in "macro-level" before going into "micro-level".
Also, unknown possibilities always exist in human problem solving. Actually, to recognize possibilities are often more crucial than to evaluate them.
Finally, it is important for the efficiency of the system that certain possibilities are ignored. In everyday life, bad alternatives are seldom explicitly evaluated and eliminated. Example: chess masters do not evaluate the bad moves at all.
For these reasons, to properly represent a problem as a graph is often a harder task than to search the graph.
[There is a predetermined heuristic function]
To let the search be guided by a predetermined heuristic function assumes that the system has no memory, and does not learn from its experience. For example, if the same problem is repeated, the same search procedure will also be repeated accurately.
One way to combine search and memory is to use search to revise heuristic function. For example, a Checkers program developed by Arthur Samuel plays by search, but automatically adjusts parameters in its heuristic function according to the result of each game.
[In each step, a choice is made among several options]
This kind of sequential search often misses good solutions which are just a few steps away.
Parallel search will solve this problem, but given hardware restriction, to explore all paths in parallel is impossible, nor is it really desired.
Parallel search can be simulated sequentially, by time-sharing. Actually, breadth-first search can be seen as an extreme case here. However, it fails to use available heuristic information.
A better solution is to explore different paths at different speeds, depending on the heuristic function. In this way, "choice among options" become "resource distribution among options".
[Each operation leads to a certain state]
To treat an operation as a way to reach a certain state assumes that all operations have deterministic results.
In practical situation, all operations are incompletely specified, and may have unexpected results.
Therefore, "search to the end" should be changed into a sense/search/act cycle, with environmental feedback. Such an approach is widely used in robotics.
To take probabilistic results into account, "best-first" becomes based on the expected utility of the operations.
[The process stops at a goal state]
To let the search process stop at predetermined final states assumes that all the goal states are equally good, and all the other states are equally bad as stopping states.
With insufficient computational resources, a "satisfying solution" is often more realistic than the best solution, and "satisfying" is often a matter of degree.
"Anytime" algorithm: An algorithm that returns the best answer possible even if it is not allowed to run to completion, and may improve on the answer if it is allowed to run longer. Such an algorithm let the user, not the system (and the algorithm designer), decide when to stop.
The above discussion shows that in AI the hard part of research is often not in solving problems within a given framework, but in deciding when to jump out of a framework (i.e., the representations, the goals, and the assumptions of the research).
There are the following algorithms: