Constraint learning: Difference between revisions

Content deleted Content added
No edit summary
{{1r}}
 
(2 intermediate revisions by the same user not shown)
Line 1:
{{mi|{{Nf|date=November 2024}}{{1r|date=November 2024}}}}
In [[constraint satisfaction problem|constraint satisfaction]] [[backtracking]] [[algorithm]]s, '''constraint learning''' is a technique for improving efficiency. It works by recording new constraints whenever an inconsistency is found. This new constraint may reduce the [[Candidate solution|search space]], as future partial evaluations may be found inconsistent without further search. '''Clause learning''' is the name of this technique when applied to [[propositional satisfiability]].
 
Line 22 ⟶ 23:
==Efficiency of constraint learning==
 
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 searchsearching. 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.
Line 38 ⟶ 39:
==Jumpback learning==
 
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. The evaluation restricted ofto the variables that are in this constraint is inconsistent and is usually shorter than the complete evaluation. Jumpback learning stores this fact as a new constraint.
 
The ordering on constraints is based on the order of assignment of variablevariables. In particular, the least of two constraintconstraints 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.
 
==Constraint maintenance==