The WASA project





Adaptative Search Algorithm : a stochastic approach

This part is copied from the reference document Yet Another Local Search Method for Constraint Programming.


Problem given in CSP form

  • a set of variables V = {V1, V2,..., Vn} with associated domains of values
  • a set of constraints C = {C1, C2, ..., Ck} with associated error functions
  • a combination function to project constraint errors on variables
  • a (positive) cost function to minimize


a sequence of moves (modification of the value of one of the variables) that will lead to a solution of the CSP (configuration where all constraints are satisfied) if the CSP is satisfied or to a partial solution of minimal cost otherwise.


Start from a random assignment of variables in V


  1. Compute errors of all constraints in C and combine errors on each variable by considering for a given variable only the constraints on which it appears
  2. select the variable X (not marked as Tabu) with highest error and evaluate costs of possible moves from X
  3. if no improving move exists
    then mark X tabu for a given number of iterations
    else select the best move (min - conflict) and change the value of X accordingly

until a solution is found or a maximal number of iterations is reached