Jump to content

Local search (constraint satisfaction)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tizio (talk | contribs) at 11:40, 21 February 2006 (a technique for solving constraint satisfaction problems). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In constraint satisfaction, local search is an incomplete method for finding a solution to a problem. It is based on iteratively improving an assignment of the variables until all constraints are satisfied. In particular, local search algorithms typically modify the value of a variable in an assignment at each step. The new assignment is close to the previous one in the space of assignment, hence the name local search.

All local search algorithms use a function that evaluates the quality of assignment, for example the number of constraints satisfied by the assignment. The aim of local search is that of finding an assignment with the best possible quality, which is a solution if any exists.

Two classes of local search algorithms exist. The first one is that of greedy or non-randomized algorithms. These algorithms proceed by changing the current assignment by always trying to improve (or at least, non-decrease) its quality. The main problem of these algorithms is the possible presence of plateaus, which are regions of the space of assignments where no local move increases quality. The second class is that of randomized algorithms, the randomized ones, escape these plateaus by doing random moves.

Greedy algorithms

Hill climbing

The most basic form of local search is based on always trying to improve the quality of the solution. This method is called hill climbing proceed as follows: first, a random assignment is chosen; then, a value is changed in such as to maximally improve the quality of the resulting assignment. If no solution has been found after a given number of changes, a new random assignment is selected. Hill climbing algorithms can only escape a plateau by doing changes that do not change the quality of the assignment. As a result, they can be stuck in a plateau where the quality of assignment has a local maxima.

GSAT (greedy sat) was the first local search algorithm for satisfiability, and is a form of hill climbing.