e-constraints.net
the home of Explanation-based Constraint Programming
Search

 Introduction   Implementations   Applications   Pointers 
e-constraints.net : Applications

Applications of e-constraint programming

Uses of explanations within constraint programming are numerous. In [Jussien, 2001] they were categorized this way:


Debugging purposes

Explanations can be directly used to help the user (the application developer, the solver developer, ...) understanding the current situation within the constraint solver:

Using explanations in a debugging context is still an open area (how to translate explanations into user-friendly terms, how to use them effectively in a debugging system, ...).

Applications


Handling dynamic problems

Explanations can be very useful when dealing with dynamic problems. Incremental constraint addition to a problem is a well known issue but incremental constraint retraction is not so easy. [Bessière, 1991] already used a simplified explanation system (using justifications 2 ) to perform such a retraction.

When one uses an explanation-based system, incremental constraint retraction of a given constraint c can be achieved this way:

  1. Disconnecting The first step is to cut c from the constraint network. c needs to be completely disconnected (no further propagation, ...).
  2. Setting back values The second step, is to undo the past effects (direct and indirect ones) of the constraint. This can be done considering all the explanations containing the removed constraint: all the associated events (value removal) are no more valid and those values need to be put back in their respective domain.
  3. Controlling what has been done Of course, there can exist several different explanations for a given removal. Therefore, some values that has been put back actually need to get removed if another explanation can be found.
  4. Repropagation In order to get to a consistent state, those new removals need to be propagating.
At the end of this process, the system is in a consistent state: actually, a state that would have been achieved if the retracted constraint (c) would have not been introduced in the system 3 .

As we saw, we can use a same tool (explanations) to both compute an explanation for contradiction (see using explanations for debugging) and to incrementally remove a constraint in a given constraints system. Using explanation for solving over-constrained problems naturally comes to the mind: : consider solving the constraints system as usual and, if necessary (i.e. once the problem proved as being over-constrained), use explanations to identify the constraint(s) to be removed (using a comparator that will take into account the user's preferences) and incrementally remove it (or them). That process being iterated as necessary to obtain a suitable solution for the resulting constraint system. The use of the comparator guarantees the optimality of the solution. \cite{jussien-property}

Applications


New programming habits: e-constraints

Using explanations within a constraint programming language leads to new programming gimmicks, new approaches, ... Most of CSP solving algorithms are derived from a backtrack-based complete search. The drawbacks of such an approach have been known for long now: thrashing and inappropriate behavior. Previous solutions to solve those problem were not really convincing (time or space overhead, no real advantages). Nevertheless, more recently, the mac-dbt algorithm [Jussien et al., 2000] showed that backtrack-based algorithms were not the panacea in real-world situation compared to explanation-based algorithms.

More generally, experiments show that using explanations is really interesting as soon as a structure (quasi-independent sub-problems) appears during resolution. Explanations allow a quick efficient and automatic use of that hidden structure to guide the search.

Applications


Notes

- Last modified: Fri Feb 28 10:46:07 Paris, Madrid 2003 by Webmaster