Constraint learning

It works by recording new constraints whenever an inconsistency is found.

Clause learning is the name of this technique when applied to propositional satisfiability.

Backtracking algorithms work by choosing an unassigned variable and recursively solve the problems obtained by assigning a value to this variable.

Whenever the current partial solution is found inconsistent, the algorithm goes back to the previously assigned variable, as expected by recursion.

If the algorithm has learned the new constraint, it will backtrack from this solution, while the original backtracking algorithm would do a subsequent search.

is inconsistent, the problem instance implies the constraint stating that

However, recording this constraint is not useful, as this partial solution will not be encountered again due to the way backtracking proceeds.

On the other hand, if a subset of this evaluation is inconsistent, the corresponding constraint may be useful in the subsequent search, as the same subset of the partial evaluation may occur again in the search.

For example, the algorithm may encounter an evaluation extending the subset

If this subset is inconsistent and the algorithm has stored this fact in the form of a constraint, no further search is needed to conclude that the new partial evaluation cannot be extended to form a solution.

The efficiency gain of constraint learning is balanced between two factors.

On one hand, the more often a recorded constraint is violated, the more often backtracking avoids doing useless searching.

Small inconsistent subsets of the current partial solution are usually better than large ones, as they correspond to constraints that are easier to violate.

On the other hand, finding a small inconsistent subset of the current partial evaluation may require time, and the benefit may not be balanced by the subsequent reduction of the search time.

Size is however not the only feature of learned constraints to take into account.

Indeed, a small constraint may be useless in a particular state of the search space because the values that violate it will not be encountered again.

A larger constraint whose violating values are more similar to the current partial assignment may be preferred in such cases.

These methods are called "graph-based" because they are based on pairs of variables in the same constraint, which can be found from the graph associated to the constraint satisfaction problem.

Jumpback learning is based on storing as constraints the inconsistent assignments that would be found by conflict-based backjumping.

Whenever a partial assignment is found inconsistent, this algorithm selects the violated constraint that is minimal according to an ordering based on the order of instantiation of variables.

Jumpback learning stores this fact as a new constraint.

In particular, the least of two constraints is the one whose latest non-common variable has been instantiated first.

When an inconsistent assignment is reached, jumpback learning selects the violated constraint that is minimal according to this ordering, and restricts the current assignment to its variables.

The constraint expressing the inconsistency of this assignment is stored.

In general, learning all inconsistencies in the form of constraints and keeping them indefinitely may exhaust the available memory and increase the cost of checking consistency of partial evaluations.

Bounded learning only stores constraints if the inconsistent partial evaluation they represent is smaller than a given constraint number.

Relevance-bounded learning discards constraints (or does not store them at all) that are considered not relevant given the current point of the search space; in particular, it discards or does not store all constraints that represent inconsistent partial evaluations that differ from the current partial evaluation on no more than a given fixed number of variables.