Optimal problem-solving search : all-or-none solutions

,

made between the values of different goals -all goals are equally desirable.In one variant of this case, there is a single, unique goal, and only one path leading to it.In either variant of this third case, we are interested in search algorithms that minimize the expected search effort for reaching the first goal (or, if the goal is unique, for reaching that goal).It is this third case which is the subject of the present paper.
Tasks of all of these three types are common in the literature of artificial intelligence.Game-playing programs are concerned with discovering "best" moves, hence involve best-value search.Programs for solving certain scheduling problemsfor example, the Traveling Salesman problem -search for shortest paths.Theoremproving programs, however, and most problem-solving programs are concerned with satisficing search.
Search algorithms designed to handle tasks of the different types may need to be vastly different, and the search effort required to find solutions may respond to quite different parameters of the task environments.Suppose, for example, that needles of varying sharpness have been distributed randomly throughout a haystack of size 3..A best-value search algorithm designed to find the sharpest needle in the haystack will have to search the entire stack, and will require an effort proportional to £.A satisficing algorithm to find a needle sharp enough for sewing will only have to search until it discovers one such needle.Its expected search effort will be inversely proportional to the average density of "sharp enough" needles in the stack, and independent of £.
If the needles are not distributed with uniform density, then the kind of information about the distribution that would be useful to guide a best-value search may be quite different from the information that would be useful to guide a satisficing Problem-Solving Search December 27, 1974 3 search.Intuitively, one can see that for best-value search it would be helpful to be able to set an upper bound on the sharpness of the needles to be found in any particular region.For satisficing search, one would want to know the probability of finding a sharp-enough needle in any given region.From this simple example, therefore, we see that we need separate theories of search algorithms for best-value and satisficing search, respectively.
Several cases of satisficing search have already been treated in the literature.
These include both the case where sites may be searched in any order, without constraint, and the case where sites are partitioned into a number of classes, and there is a specified order in which sites in each class must be searched (but no between-class constraints).We call this case, "parallel search." In the literature of artificial intelligence (Chang and Slagle, 1971;Kowalski, 1969Kowalski, , 1972;;Nilsson, 1971;Pohl, 1971), algorithms are to be found for best-value and shortest-path search through trees.A recent paper by Garey (1973) provides an algorithm for satisficrng search through trees, but neither the algorithm nor its method of derivation encompasses general partial orderings.It is the purpose of this paper to fill this gap by extending our results to satisficing searches where the ordering constraints are typical of those in problem-solving tasks: that is, to searches in partial orderings.
In the first two sections, we will review the optimal search algorithms for unconstrained and parallel (satisficing) searches, respectively.In the third section, we will extended our results to satisficing searches through partially ordered search spaces in the case where there are multiple alternative goals.

Satisficing Search Without Ordering Constraints
An unknown number of chests of Spanish treasure have been buried on a random basis at some of Q sites, at a known depth of three feet.For each site there is a known unconditional probability, £([), L=L-»>Cb that a chest was buried there, and the cost of excavating site i is fl(L).
A strategy, k is a permutation of any subset of the integers from 1 to Q.
Suppose a subset of sites is searched in the order given by t> under the condition that the search is terminated as soon as one treasure is found, then we can associate with the strategy t an expected cost )L(t) of this terminating search, and a probability E(t) that a treasure will be found.E(t> • 1-S>(t)> where £(t) is the probability that there is treasure at none of the sites of t We assume that ¥(t) > 0 and £(t) > 0 for all t That is, no site can be excavated without cost and no site contains a treasure with certainty.
Let (ail) be the strategy consisting of executing strategy a, followed by where the subsets of a and b. are non-overlapping.Then by our definitions, we have: (1.1) V<i)'-q(i), where i is the strategy of excavating the Lth site.
Equation (1.2) states that the expected cost of a terminating search over (ail) is the expected cost, ^(a), of a terminating search over a plus the product of the expected cost of a terminating search over b. by the probability, £(a), that the latter search is necessary (i.e., that treasure was not found in a).Equation (1.3) states that the probability of not finding a treasure in (ak) is the product of the probabilities of not finding treasures in a and h, respectively.
We consider now the effect upon the expected cost of search of excavating the same set of sites but in different orders -by strategies (abed) and (acbd), say, where a and d_ may be empty, S_(x_), with x. empty, equals 1, and Y(x_), with jt empty, equals zero. ( But, since Sihi) -Sioh), Equation (1.8) simplifies to: In particular, if k and £ consist of the single sites [ and j, respectively, then it will be cheaper to excavate t before i iff p(i) > 0(|), where 0(t) = E(D/Y(D-Moreover, this result holds for all i and |.The optimal strategy, therefore, for finding a single treasure is to excavate sites in descending order of 0(i) until a treasure is discovered.
Similar results were obtained by Dean (1965), Kadane (1969), Joyce (1971), andMitten (1960).Suppose, now, that the Spanish treasures are buried, as before, but that neither the sites nor the depths of burial are known with certainty.At each site a sequence of one-foot slices can be excavated, and a treasure may be disclosed by the removal of any one of these slices.The probability that a treasure lies just below any specified slice is known.Designate the probability that the treasure lies below slice t of site i as tt<U>- A particular slice (L,g) can only be searched after all the other slices above it, (U), 1 < & have been searched.Hence, an admissible search strategy will be an ordering of a subset of slices such that (i,g) does not precede (i,f) if g > t For a given strategy, let t(bt) be the order number of the slice (i,t).Now, we can define quantities, ¥(t), E(t)> and £(t> exactly as before, so that Equations (1.1) through (1.10) are again valid for the admissible strategies.We wish to find the strategy that minimizes )L(i) where t ranges over permutations of the entire set of Q integers subject to the order constraint that t(U) > t(b&) If g. > t A bloc of slices is a set of slices belonging to the same site that are consecutive in that site.(The members of a bloc need not be consecutive in any particular strategy, since they may be interspersed with one or more slices from other sites.) In a strategy (attc), b. is (weakly) monotonic decreasing if for each pair of segments, with order numbers i, j. in b, p(i) < p(i) if i < i-The substrategy b. is monotonic increasing if, for each b i in the sequence 0(i) > 0(i) if L < I In a strategy (abcd)f k and £ are interchangeable if permuting the strategy into (asikd) does not violate the order constraints (i.e., does produce another strategy).Proof: The order constraints apply to pairs of slices belonging to the same site.Under the conditions of the theorem, interchange of b with £ will not reverse the order of any pair of slices belonging to the same site, herice will not violate any order constraints.
Conversely, if slice t(U) in b and slice t(u&) in £ belong to the same site, then the order constraints require that t < g. (since t(Lt) < t(i»e))-But, in (£b) we will have t(bt) > t(i,g), which violates the constraints.
Q. E. D. In the first case, the strategy can be improved (Theorem 2.2) by interchanging £ with h, hence is not optimal.In the second case, the strategy can be improved by interchanging £ with & hence is not optimal.
We call the bloc (hd) of Theorem 2.3 an indivisible bloc.Each indivisible bloc is made up of consecutive slices from a single site, and its indivisibility depends only on the 0's of strategies from that site.Hence we can now proceed, for each individual site, to determine its maximal indivisible blocs by joining blocs that satisfy the conditions of Theorem 2.3 until the p's for all the separate blocs that remain are monotonic decreasing.We can state this result as a corollary: Corollary 2.3.1:An optimal solution consists of a sequence of maximal indivisible blocs such that the 0's of the successive blocs of any given site are monotonic decreasing.
We are now ready for the main theorem.
Theorem 2.4: If a strategy consists of a sequence of maximal indivisible blocs, and if the 0's associated with these blocs are monotonic decreasing, then the strategy is optimal.
Proof: 1. Corollary 2.3.1 guarantees that any optimal strategy must consist of a sequence of maximal indivisible blocs, and that the 0's of the subsequence of blocs belonging to any given site are monotonic decreasing.
2. The strategy defined in Theorem 2.4 is unique up to trivial interchanges of segments with equal 0, which do not change the value of )L.Q. E. D.

The only allowable permutations that preserve the maximal
Theorem 2.4 tells us that the optimal strategy in digging for doubloons is to calculate the average yield (per foot of digging) for each maximal indivisible bloc of a site, then excavate the successive blocs in decreasing order of yield.
The evaluation functions 0, take into account not only the potential return, e.(L), and cost, g(i), from the slice being executed, but the prospective value of getting closer to underlying slices that have larger 0 values than the current slice.This characteristic of the evaluation function adds a certain "depth-first" tendency to the strategy.For example, suppose that it is known that the treasure is buried not less than five feet below the ground.Then, if the optimal strategy calls for excavation to begin at the ith site, it will continue at that site until the excavation has reached a depth of at least five feet.
In the special case in which g>£ implies 0(i,g) < 0(i,t), Kadane (1969) finds the optimal ordering to be according to 0. The results of this section are new when the above condition is not satisfied.

Problem-Solving Search
December 27, 1974 10 3. Search Through a Partially-Ordered Space Our next task is to extend the results of the previous section to a search through a partially-ordered set of nodes, or cycle-free graph, which includes the familiar case of search through a tree.Theorem-proving and problem-solving searches are commonly representable as searches through trees or, more generally through partial orderings.
In such a search, a new node is obtained by applying an operator to branch from some node reached previously.In this section, we will prove a theorem (Theorem 3.1) for optimal search through a partial ordering which is analogous to Theorems 2.3 and 2.4 for parallel orderings.As before, the key role is played by an evaluation function, 0", which can be assigned to each branch at each node already reached in such a way that it is always optimal to search next the branch with largest 0".
The proof of optimality for a partial ordering is a great deal more complex than the proof for a parallel ordering, mainly because 0 for a node now.has to be maximized over all the alternative sequences descendant from that node.The notion of the "best set" of a node (the set of nodes descendant from that node for which 0 is maximum) replaces the "maximum indivisible bloc" of the previous section.The Q" of Theorem 3.1 is this best set.
As before, we assume that for each node, L, of the set a value ad) is given, representing the probability that a solution will be found at that node.The cost of excavating each node from one immediately before it is g(L).
A strategy t(D) for a set of nodes, D, is any ordering of the nodes of Q that satisfies the order constraints on those nodes.As before, we can define for each strategy the quantities ¥(t), E(t)> S.(t) and 0(t) = E(t)/^(t), all of which depend only on the subset, Q, and its ordering, t, independently of the remaining nodes in the entire set.Note that E(t) and S.(t) are constant over all strategies of a given set, Q, hence are functions of Q> while )L(l) and 0(t) depend upon the strategy, t, as well as the set, Q.
A strategy of a set of nodes, Q, for which 0 assumes its greatest value for that set will be called a best strategy of Q and will be designated by t'(Q) and its )L by Y'(Q).
An initial bloc, Q, of set I for which 0'(B) is maximal over all initial blocs of I will be called a best set of I, and the 0 of its best strategy will be designated by 0 H (I).
We now prove four lemmas that are needed for our main theorem.Theorem 3.1 shows that if E(N">B) is set equal to the j&" defined in the text, then the search determined by the above algorithm is optimal.
The value, 0"(tiB)> depends on the probabilities of reaching the goal, B<L), at some of the nodes that are descendants of H In practice, these values of a(D will usually not be known, and E in the algorithm will have to be a heuristic estimate of 0" -some estimate of the "promise" of searching from U in the direction defined by B. Theorem 3.1 indicates what the nature of this estimate should be.
In estimating 0", we must postulate that the search will be continued through a "best set" of nodes, the set of reachable nodes that maximizes the ratio of expected return to cost of search.Search should continue in one direction at least as long as this ratio continues to increase, and in fact, until it becomes lower than the best ratio for some other branch.By this procedure, depth of search is balanced against the expectation of success, so that a modest probability of success after a short search may imply the same 0" as a higher probability of success after a longer search.

Problem
Theorem 2.1: In (abed), k and £ are interchangeable iff no Problemone or more slices in b is represented by any slices in £.

Theorem 2. 2 :
If b and £ are interchangeable in (abed), and if 0(£) > 0(b), then the strategy can be improved by interchanging b and £, hence is not optimal.Proof: Using Equation (1.10), we have:(2.1)V(abcd) -V(acbd) -S(a)[V(b)P(c) -V(c)P(b)] (2.2) = S(a)V(b)V(c)[0(c) -0(b)] > 0. Q. E. D.Theorem 2.3: If b and d are strategies that are also consecutive blocs of site I with d following b, and if (9(d) > 0(t), then a strategy of (abede) with £ non-null is not optimal.Proof: By the ordering constraints, d cannot precede b.Suppose it does not follow immediately (t is non-null).Since (bd) is a bloc, no member of c belongs to site i, for all other slices of L must, by the ordering constraints, precede b or follow d Either 0(£) > 0(b), or 0(£) < 0(b) < 0(d).

Problem
their order involve interchanges of strategies belonging to different sites and not separated by a strategy belonging to either of their sites.4. Suppose a strategy is optimal, but that 0 is not monotonic decreasing.Consider the first instance where 0(b) > 0(a), with a immediately preceding b Since the blocs belonging to a given site are monotonic decreasing in value, a and b must belong to different sites, hence are interchangeable, by Theorem 2.1.Therefore, by Theorem 2.2, the strategy would be improved by interchanging a and b, contrary to the hypothesis that the strategy is optimal.
Let A and B be two mutually exclusive sets of nodes, and Q their set sum.The A and B are interchangeable iff there exists a strategy £ « (ak) and a strategy e" » (k"a"), where £ and £ M are strategies on & a and Problemon A, and b and b" strategies on fi.Clearly, if A and B are interchangeable, if a is any strategy of A. and if b is any strategy of B* then (ab) and (ba) are strategies of £.Corresponding to the notion of a bloc in the previous section, we introduce the concepts of initial and terminal blocs of a set of nodes.Let A be a partially ordered set of nodes, and let it contain B and Q -A-fi.Then B is an initial bloc of A iff there exist strategies b on B and ton C such that a • (b£.) is a strategy on A. B is a terminal bloc of A iff there exist strategies b on B and £ on Q such that a • (cb) is a strategy on A.
Lemma 3.1.Let A and &UB be initial sets of I such that: (1) A is the best set of L with best strategy -ft and (2) b is any strategy for B.Then, 0" > 0(b).Proof.Since A is the best set of L 0" = 0(a) > 0(ab).Now, using Equation 1.5V(b)0(a) 2: S(a)V(b)0(b).so that, since we have postulated that S(a) t 0 and V(b) t 0Let A be a set consisting of the mutually exclusive subsets of nodes B. C and Q, where B_ is an initial bloc of A, while Q and Q are interchangeable, hence also both terminal blocs.Let the best strategy, t'(A) -(btid!...^).where b_ is a strategy for B_> c_ -(c^...^) is a strategy for Q and d = (di-d^) is a strategy for Q.Then, by Equation (1.10), t'(A) could be improved by exchanging dj and c_j + i, contrary to the hypothesis that 0(A) is maximal.But the exchange is admissible, since Q and Q are interchangeable.Similarly, the supposition that 0the first (QM) pair on L and generate the new node, N"; 2. If U" is a goal node stop, else; 3. Compute E(£f ,B) for all branches from N", and insert the new (N'\B) pairs in their appropriate positions in U 4. Return to Step 1.