next up previous
Next: Complete Tree Search with Up: Search Methods Previous: Search Methods

Subsections

Introduction

Overview of Search Methods

Figure 2.1: A search space of size 16
\includegraphics{search3.eps}

Figure 2.1 shows a search space with N (here 16) possible total assignments, some of which are solutions. Search methods now differ in the way in which these assignments are visited. We can classify search methods according to different criteria:
Complete vs incomplete exploration
complete search means that the search space is investigated in such a way that all solutions are guaranteed to be found. This is necessary when the optimal solution is needed (one has to prove that no better solution exists). Incomplete search may be sufficient when just some solution or a relatively good solution is needed.
Constructive vs move-based
this indicates whether the method advances by incrementally constructing assignments (thereby reasoning about partial assignments which represent subsets of the search space) or by moving between total assignments (usually by modifying previously explored assignments).
Randomness
some methods have a random element while others follow fixed rules.
Here is table of a selection of search methods together with their properties:

Method exploration assignments random
Full tree search complete constructive no
Credit search incomplete constructive no
Bounded backtrack incomplete constructive no
Limited discrepancy complete constructive no
Hill climbing incomplete move-based possibly
Simulated annealing incomplete move-based yes
Tabu search incomplete move-based possibly
Weak commitment complete hybrid no

The constructive search methods usually organise the search space by partitioning it systematically. This can be done naturally with a search tree (Figure 2.2). The nodes in this tree represent choices which partition the remaining search space into two or more (usually mutually exclusive) disjoint sub-spaces. Using such a tree structure, the search space can be traversed systematically and completely (with as little as O(N) memory requirements).

Figure 2.2: Search space structured using a search tree
\includegraphics{search4.eps}

Figure 2.4 shows a sample tree search, namely a depth-first incomplete traversal. As opposed to that, figure 2.3 shows an example of an incomplete move-based search which does not follow a fixed search space structure. Of course, it will have to take other precautions to avoid looping and ensure termination.

Figure 2.3: A move-based search
\includegraphics{search5.eps}

Figure 2.4: A tree search (depth-first)
\includegraphics{search6.eps}

A few further observations: Move-based methods are usually incomplete. This is not surprising given typical sizes of search spaces. A complete exploration of a huge search space is only possible if large sub-spaces can be excluded a priory, and this is only possible with constructive methods which allow to reason about whole classes of similar assignments. Moreover, a complete search method must remember which parts of the search space have already been visited. This can only be implemented with acceptable memory requirements if there is a simple structuring of the space that allows compact encoding of sub-spaces.

Optimisation and Search

Many practical problems are in fact optimisation problems, ie. we are not just interested in some solution or all solutions, but in the best solution.

Fortunately, there is a general method to find the optimal solution based on the ability to find all solutions. The branch-and-bound technique works are follows:

1.
Find a first solution
2.
Add a constraint requiring a better solution than the best one we have so far (e.g. require lower cost)
3.
Find a solution which satisfies this new constraint. If one exists, we have a new best solution and we repeat step 2. If not, the last solution found is the proven optimum.
The finite-domain library implement provides the primitives min_max/2-8 and minimize/2-8 which implement this strategy.

Heuristics

Since search space sizes grow exponentially with problem size, it is not possible to explore all assignments except for the very smallest problems. The only way out is not to look at the whole search space. There are only two ways to do this:

In the following sections we will first investigate the considerable degrees of freedom that are available for heuristics within the framework of systematic tree search, which is the traditional search method in the Constraint Logic Programming world.

Subsequently, we will turn our attention to move-based methods which in ECLiPSe can be implemented using the facilities of the repair-library.


next up previous
Next: Complete Tree Search with Up: Search Methods Previous: Search Methods

1999-08-07