+ All Categories
Home > Documents > Managing conditional and composite CSPs

Managing conditional and composite CSPs

Date post: 03-Dec-2023
Category:
Upload: independent
View: 0 times
Download: 0 times
Share this document with a friend
12
Managing Conditional and Composite CSPs Malek Mouhoub and Amrudee Sukpan University of Regina Wascana Parkway, Regina, SK, Canada, S4S 0A2 {mouhoubm,sukpan1a}@cs.uregina.ca Abstract. Conditional CSPs and Composite CSPs have been known in the CSP discipline for fifteen years, especially in scheduling, planning, diagnosis and con- figuration domains. Basically a conditional constraint restricts the participation of a variable in a feasible scenario while a composite variable allows us to ex- press a disjunction of variables or sub CSPs where only one will be added to the problem to solve. In this paper we combine the features of Conditional CSPs and Composite CSPs in a unique framework that we call Conditional and Compos- ite CSPs (CCCSPs). Our framework allows the representation of dynamic con- straint problems where all the information corresponding to any possible change are available a priori. Indeed these latter information are added to the problem to solve in a dynamic manner, during the resolution process, via conditional (or activity) constraints and composite variables. A composite variable is a variable whose possible values are CSP variables. In other words this allows us to repre- sent disjunctive variables where only one will be added to the problem to solve. An activity constraint activates a non active variable(this latter variable will be added to the problem to solve) if a given condition holds on some other active variables. In order to solve the CCCSP, we propose two methods that are respec- tively based on constraint propagation and Stochastic Local Search (SLS). The experimental study, we conducted on randomly generated CCCSPs demonstrates the efficiency of a variant of the MAC strategy(that we call MAC+) over the other constraint propagation techniques. We will also show that MAC+ outper- forms the SLS method MCRW for highly consistent CCCSPs. MCRW is however the procedure of choice for under constrained and middle constrained problems and also for highly constrained problems if we trade search time for the quality of the solution returned (number of solved constraints). Keywords: Constraint Satisfaction, Local Search, Arc Consistency 1 Introduction Conditional CSPs and Composite CSPs have been known in the CSP discipline for fif- teen years, especially in configuration domains [1–10]. In fact these two frameworks are quite typical for any combinatorial problem such as planning, diagnosis, and temporal reasoning. Basically a conditional constraint restricts the participation of a variable in a feasible scenario while a composite variable allows us to express a disjunction of vari- ables or sub CSPs where only one will be added to the problem to solve. In the original
Transcript

Managing Conditional and Composite CSPs

Malek Mouhoub and Amrudee Sukpan

University of ReginaWascana Parkway, Regina, SK, Canada, S4S 0A2

{mouhoubm,sukpan1a}@cs.uregina.ca

Abstract. Conditional CSPs and Composite CSPs have been known in the CSPdiscipline for fifteen years, especially in scheduling, planning, diagnosis and con-figuration domains. Basically a conditional constraint restricts the participationof a variable in a feasible scenario while a composite variable allows us to ex-press a disjunction of variables or sub CSPs where only one will be added to theproblem to solve. In this paper we combine the features of Conditional CSPs andComposite CSPs in a unique framework that we call Conditional and Compos-ite CSPs (CCCSPs). Our framework allows the representation of dynamic con-straint problems where all the information corresponding to any possible changeare available a priori. Indeed these latter information are added to the problemto solve in a dynamic manner, during the resolution process, via conditional (oractivity) constraints and composite variables. A composite variable is a variablewhose possible values are CSP variables. In other words this allows us to repre-sent disjunctive variables where only one will be added to the problem to solve.An activity constraint activates a non active variable (this latter variable will beadded to the problem to solve) if a given condition holds on some other activevariables. In order to solve the CCCSP, we propose two methods that are respec-tively based on constraint propagation and Stochastic Local Search (SLS). Theexperimental study, we conducted on randomly generated CCCSPs demonstratesthe efficiency of a variant of the MAC strategy (that we call MAC+) over theother constraint propagation techniques. We will also show that MAC+ outper-forms the SLS method MCRW for highly consistent CCCSPs. MCRW is howeverthe procedure of choice for under constrained and middle constrained problemsand also for highly constrained problems if we trade search time for the qualityof the solution returned (number of solved constraints).

Keywords: Constraint Satisfaction, Local Search, Arc Consistency

1 Introduction

Conditional CSPs and Composite CSPs have been known in the CSP discipline for fif-teen years, especially in configuration domains [1–10]. In fact these two frameworks arequite typical for any combinatorial problem such as planning, diagnosis, and temporalreasoning. Basically a conditional constraint restricts the participation of a variable in afeasible scenario while a composite variable allows us to express a disjunction of vari-ables or sub CSPs where only one will be added to the problem to solve. In the original

2

Conditional CSP framework [1], activity constraints are introduced to handle condi-tional variables. A variable has either active or non-active status. Only active variablesare required value assignments. Given two variables Xi and X j, four types of activityconstraints have been defined as follows:

1. require var. active : (Xi)∧ ((Xi = ai1)∨ . . .(Xi = aip))→ X j2. always require. active : (Xi)→ X j

3. require not. active : (Xi)∧ ((Xi = ai1)∨ . . .(Xi = aip))rn−→ X j

4. always require not. active : (Xi)rn−→ X j

The activity constraint (1) will activate X j if the active variable Xi is assigned oneof the values ai1 . . .aip from its domain whereas the activity constraint (2) will activateX j if Xi is active. In (3) and (4), if the condition is true, X j is not required in a solution,or is set to a non-active variable. The following three systematic resolution techniqueshave been proposed for Conditional CSPs.

1. A CCSP is converted into a CSP by reformulating an activity constraint by a compat-ibility constraint (by adding a NULL value to the domain of the conditional vari-ables). Classical CSP techniques are then applied to solve the resulting CSP.

2. Generating a set of all possible CSPs from a Conditional CSP. Classical CSP tech-niques are then applied to solve each CSP.

3. Solving a Conditional CSP directly using constraint propagation.

To improve the performance of the third technique above, the constraint propagationmethods Forward Checking (FC) and Maintaining Arc Consistency (MAC) are appliedduring the search [3]. Even though solving a Conditional CSP directly does not providethe best performance in time, this method is more flexible and time efficient when weare dealing with dynamic problems. Indeed, in the case of the second method, a smallchange of an activity constraint causes the regeneration of all possible sets of standardCSPs. Moreover, method 2 suffers from the waste of memory space needed to storemany generated CSPs that will not be considered during search. In [2] Composite CSPshave extended the traditional CSP framework by including the combination of threenew CSP paradigms : Meta CSPs, Hierarchical Domain CSPs, and Dynamic CSPs. Ina composite CSP, the variable values can be entire sub CSPs. A domain can be a set ofvariables instead of atomic values (as it is the case in the traditional CSP). In configura-tion problems and planning, it is often obvious to organize the domains of variable val-ues in a hierarchical manner. Jonsson and Frank [8] proposed a general framework usingprocedural constraints for solving dynamic CSPs. This framework has been extendedto a new paradigm called Constraint-Based Attribute and Interval Planning (CAIP) forrepresenting and reasoning about plans [9]. CAIP and its implementation, the EUROPAsystem, enable the description of planning domains with time, resources, concurrentactivities, disjunctive preconditions and conditional constraints. The main difference,comparing to the formalisms we described earlier, is that in this latter framework [8]the set of constraints, variables and their possible values do not need to be enumeratedbeforehand which gives a more general definition of dynamic CSPs. Note that the defi-nition of dynamic CSPs in [8] is also more general than the one in [7] since in this latter

3

work variable domains are predetermined. Finally, in [10], Tsamardinos et al proposethe Conditional Temporal Problem (CTP) formalism for Conditional Planning undertemporal constraints. This model extends the well known qualitative temporal networkproposed in [11] by adding instantaneous events (called observation nodes) representingconditional constraints.

In this paper we combine the features of Conditional CSPs and Composite CSPsin a unique framework that we call Conditional and Composite CSPs (CCCSPs). Ourframework allows the representation of constraint problems where all the informationcorresponding to any possible change are known a priori. Indeed these latter informationare added to the problem to solve in a dynamic manner, during the resolution process,via conditional (or activity) constraints and composite variables. A composite variableis a variable whose possible values are CSP variables. In other words this allows us torepresent disjunctive variables where only one will be added to the problem to solve.An activity constraint has the following form X1∧ . . .Xp

condition→ Y where X1, . . . ,Xp and

Y are variables (can be composite). This activity constraint will activate Y (Y will beadded to the problem to solve) if X1∧ . . .Xp are active (currently present in the problemto solve) and condition holds between these variables. In order to solve the CCCSP, wepropose two methods that are respectively based on constraint propagation and Stochas-tic Local Search (SLS). The goal of the constraint propagation method is to overcome,in practice, the difficulty due to the exponential search space of the possible CSPs gen-erated by the CCCSP to solve and also the search space we consider when solving eachCSP. Indeed, a CCCSP represents DM possible CSPs where D is the domain size ofthe composite variables and M the number of composite variables. In the same wayas reported in [1, 3], we use constraint propagation in order to detect earlier later fail-ure. This will allow us to discard at the early stage any subset containing conflictingvariables. The method based on constraint propagation is an exact technique that guar-antees a complete solution. The method suffers however from its exponential time costas we will notice by the experimental results we present in this paper. In many real-lifeapplications where the execution time is an issue, an alternative will be to trade theexecution time for the quality of the solution returned (number of solved constraints).This can be done by applying approximation methods such as local search and wherethe quality of the solution returned is proportional to the running time. Basically, themethod we propose is based on Min-Conflict-Random-Walk (MCRW) [12] and consistsof starting from a complete assignment of values to the different variables and iteratesby improving at each step the quality of the assignment (number of solved constraints)until a complete solution is found or a maximum number of iterations is reached. Theexperimental study, we conducted on randomly generated CCCSPs demonstrates the ef-ficiency of a variant of the MAC strategy (that we call MAC+) over the other constraintpropagation techniques. We will also show that MAC+ outperform the SLS methodMCRW for highly consistent CCCSPs. MCRW is however the procedure of choice forunder constrained and middle constrained problems and also for highly constrainedproblems if we trade search time for the quality of the solution returned (number ofsolved constraints).

The rest of the paper is organized as follow. In the next section we will introduceour CCCSP model. Sections 3 and 4 are then respectively dedicated to the constraint

4

propagation and SLS techniques we propose for solving CCCSPs. In Section 5 wepresent the experimental study evaluating and comparing the methods we propose onrandomly generated CCCSPs. Concluding remarks are finally listed in Section 6.

2 CCCSPs

A Conditional and Composite Constraint Satisfaction Problem (CCCSP) is a tuple〈X ,DX ,Y,DY , IV,C,A〉, where :

– X={x1, . . .xn} is a finite set of variables.– DX = {Dx1 , . . .Dxn} is the set of domains of the variables. Each domain Dxi contains

the possible values that Xi can take.– Y = {y1, . . .ym} is the finite set of composite variables.– DY ={Dy1 , . . .Dym} is the set of domains of the composite variables. Each domain

Dyi is the set of variables that the composite variable yi can take.– IV is the set of initial variables (including composite variables) : IV ⊆ X

S

Y .– C = {C1, . . .Cp} is the set of compatibility constraints. Each compatibility con-

straint is a binary relation between variables in case these latter variables are notcomposite, or a set of binary relations if at least one of the two variables involvedis composite.

– A is the set of activity constraints. Each activity constraint has the following formwhere Z1, . . .Zp and T are variables (can be composite). Z1∧ . . .Zp

condition→ T . This

activity constraint will activate T if Z1, . . . ,Zp are active and condition holds onthese variables. condition can be, for example, the assignment of particular valuesto the variables Z1, . . . ,Zp.

We will use the following example to illustrate the CCCSP model.

Example

The goal of this configuration problem is to estimate the price of a new vehiclegiven a list of specifications. Figure 1 provides a complete list of features thatthe potential customer will choose from in order to build and price a new car.A solid line connecting a pair of nodes (circles) corresponds to a given con-straint between the corresponding features. For instance, the constraint matchcolor between Exterior and Windows contains all the pair of colors that go to-gether. A solid arrow with a diamond corresponds to an activity constraint. Forexample, the choice of limited edition will activate the corresponding sunroofoption. Dash lines connect the components to the class to which they belong.An OR connection corresponds to a list of features where only one will be se-lected by the customer. After the customer selects all the features, one or moreconsistent scenarios will be listed. The customer can also specify a maximumvalue of the price such that only scenarios with price less than this value willbe displayed.

5

Figure 2 illustrates the CCCSP model corresponding to the above example. Thereare 1 composite and 10 single variables (Model). The domain of the variables Exterior,Interior, Floor mat and Deflector contains a list of possible colors for each item.The domain of the other variables contains the different options corresponding to eachfeature. Each activity constraint is labelled by the activation condition and the constraintthat will be added if the activation condition is true. For instance, if the composite vari-able Model is assigned the value Sport then the variable Engine will be activated andthe constraint between Sport and Engine is that this latter should be assigned the valueV6 from its domain.

Build and Price

Accessories

Options Model Color

SportBase ExteriorLimited InteriorEngine Seats Wheels AudioWindowsSunroof

Floor mat Deflector

OR

Color match

Sport Colors

Limited Colors

Leather seats

AlloyCD Charger

CD Charger

Color match

Limited Sunroof

V6 Engine

V6 Engine

Color match

Color match

Color match

Fig. 1. The Build and Price Configuration Problem.

SportBase ExteriorLimited InteriorEngine Seats Wheels AudioWindowsSunroofFloor mat Deflector

Color match

Sport Colors

Limited Colors

Seats=Leather

Wheels=AlloyAudio=CD Charger

Audio=CD Charger

Color match

Sunroof=LimitedEngine=V6

Engine=V6

Model

Color match

Color matchColor match

Fig. 2. CCCSP corresponding to the Build and Price Configuration Problem.

6

3 Constraint Propagation for CCCSPs

Different methods for solving conditional CSPs have been reported in the literature [6,1, 3, 4]. In [6], all possible CSPs are first generated from the CCSP to solve. CSP tech-niques are then used on the generated CSPs in order to look for a possible solution.Dependencies between the activity constraints are considered in order to generate a di-rected a-cyclic graph (DAG), where the root node corresponds to the set of initiallyactive variables. Activity constraints are applied during the derivation of one total orderfrom the partial order given by the resulting DAG. In [1, 3] resolution methods havebeen proposed and are directly applied on CCSPs. Maintaining arc consistency (MAC)is used to prune inconsistent branches by removing inconsistent values during the search[3]. The solving method starts by instantiating the active variables. For each activevariable instantiation, the algorithm first checks the compatibility constraints and thenactivates the activity constraints. The method will then enforce look-ahead consis-tency (through arc consistency) along the compatibility constraints and prunes incon-sistent values from the domains of future variables. When activity constraints comeinto play, newly activated variables are added to the set of future variables. MAC isthen applied to the set of all active variables. In [4, 3], a CCSP is reformulated into anequivalent standard CSP. A special value “null” is added to the domains of all the vari-ables which are not initially active. A variable instantiation with “null” indicates thatthe variable does not participate in the problem resolution. The CCSP is transformedinto a CSP by including the “null” values. The disadvantage is that, in a large constraintproblem, all variables and all constraints are taken into account simultaneously even ifsome are not relevant to the problem at hand.

In the above methods, backtrack search is used for both the generation of possibleCSPs and the search for a solution in each of the generated CSPs. Thus, these meth-ods require an exponential time for generating the different CSPs and an exponentialtime for searching a solution in each generated CSP. Moreover these methods are lim-ited to handle only activity constraints. The other problem of the above methods isthe redundant work done when checking at each time the consistency of the same setof variables (subset of a given generated CSP). The goal of the constraint propagationmethod we propose for solving CCCSPs is to overcome, in practice, the difficulty due tothe exponential search space of the possible CSPs generated by the CCCSP to solve andalso the search space we consider when solving each CSP. In the same way as reportedin [1, 3], we use constraint propagation in order to detect earlier later failure. This willallow us to discard at the early stage any subset containing conflicting variables. Thedescription of the method we propose is as follows.

1. The method starts with an initial problem containing a list of initially activatedvariables (including composite variables). Arc consistency is applied on the initialvariables in order to reduce some inconsistent values which will reduce the size ofthe search space. If the initial problem is not arc consistent (in the case of an emptydomain) then the method will stop. The CCCSP is inconsistent in this case.

2. Following the forward check principle [13], pick an active variable v, assign a valueto it and perform arc consistency between this variable and the non assigned activevariables. If one domain of the non assigned variables becomes empty then assign

7

another value to v or backtrack to the previously assigned variable if there are nomore values to assign to v. Activate any variable v′ resulting from this assignmentand perform arc consistency between v′ and all the active variables. If arc inconsis-tency is detected then deactivate v′ and choose another value for v (since the currentassignment of v leads to an inconsistent CCCSP). If v is a composite variable thenassign a variable to it (from its domain). Basically, this consists of replacing thecomposite variable with one variable x of its domain. We then assign a value to xand proceed as shown before except that we do not backtrack in case all values ofx are explored. Instead, we will choose another variable from the domain of thecomposite variable v or backtrack to the previously assigned variable if all valuesof v have been explored. This process will continue until all the variables are as-signed in which case we obtain a solution to the CCCSP. The arc consistency in theabove two steps is enforced as shown in the four cases below. We will assume in thefollowing that x1 and x2 are non composite variables while y1 and y2 are composite.

(a) The constraint is (x1,x2). Arc consistency [14] is applied here i.e. each value a ofx1 should have a support in the domain of x2.

(b) The constraint is (y1,x1). Each value a, from the domain of a given variable xwithin y1, should have a support in the domain of x1.

(c) The constraint is (x1,y1). Each value a, from the domain of x1, should have asupport in at least one domain of the variables within y1.

(d) The constraint is (y1,y2). Apply case 2 between y1 and each variable x within y2.

Using the above rules, we have implemented a new arc consistency algorithm forCCCSPs as shown in Figure 3. This algorithm is an extension of the well known AC-3procedure [14–16].

Like for general CSPs, variable and value ordering, during search, has a significantimpact on the size of the explored space in the case of CCCSPs. For variable selection,we will follow the idea of choosing the most constrained variable first in the hope oftriggering early failure. In the case of value selection, we start with the value that leadsto an easiest to solve CCCSP first since our goal here is to find the first solution and thatthere is no preference on the solution obtained. More precisely, our variable and valueselection policy works as follows.

1. The variables (simple and composite variables) are selected by decreasing order of thenumber of constraints they share with other variables. For a given variable x, thisnumber (that we call degree of a variable) corresponds to the node degree (numberof edges connected to the node) of the node corresponding to x in the constraintgraph.

2. The degree of a composite variable x is equal to the minimum variable degree of all thevariables within X domain.

3. If a variable x activates other variables then we add to its variable degree, the minimumnumber of constraints it can generate (activate) through the activity constraints.

4. For value selection, in the case of a composite variable x, select the simple variables,within the domain of x, by decreasing number of their degrees.

5. For a simple variable select the least constrained value first (the value that causes theactivation of the minimum number of constraints).

8

REV ISE(Di ,D j)REV ISE← f alseFor each value a ∈ Di do

if not compatible(a,b) for any value b ∈ D j thenremove a from DiREV ISE← true

end ifend for

REV ISE COMP (Di ,D j)REV ISE COMP← f alseif i is a single variable and j is a composite variable

Dtmp ← /0For each event k ∈ D j do

D← Di − DtmpREV ISE COMP← REV ISE COMP OR REV ISE(D,Dk )Dtmp ← Dtmp ∪D

end forDi ← Dtmp

end ifif i is a composite variable and j is a single variable

For each event k ∈ Di doREV ISE COMP← REV ISE COMP OR REV ISE(Dk ,D j)

end forend ifif i and j are composite variables

For each event k ∈ Di doREV ISE COMP(Dk ,D j)

end forend if

AC−3−CCCSPGiven a graph G = (X ,U)Q←{(i, j)|i, j∈U}while Q 6= Nil do

Q← Q−{(i, j)}if i or j is composite variable

if REV ISE COMP(Di,D j) thenQ←∪{(k, i)|k, i∈U and k 6= j}

end ifelse if REV ISE(Di ,D j) then

Q←∪{(k, i)|k, i∈U and k 6= j}end if

end ifend while

Fig. 3. AC-3 for CCCSPs.

4 MCRW for CCCSPs

The method we presented in the previous Section is an exact technique that guaran-tees a complete solution. The method suffers however from its exponential time costas we will see in the next Section. In many real-life applications where the executiontime is an issue, an alternative will be to trade the execution time for the quality ofthe solution returned (number of satisfied constraints). This can be done by applyingapproximation methods such as local search and where the quality of the solution re-turned is proportional to the running time. In this Section we will study the applicabilityof a local search technique based on the Min-Conflict-Random-Walk (MCRW) [12] al-gorithm for solving CCCSPs. Basically, the method consists of starting from a completeassignment of values to variables and iterates by improving at each step the quality ofthe assignment (number of satisfied constraints) until a complete solution is found or amaximum number of iterations is reached. Given the dynamic aspect of CCCSPs (somevariables are added|removed dynamically during the resolution process) we propose thefollowing algorithm based on MCRW for solving CCCSPs.

9

1. The algorithm starts with a random assignment of values to the initial variables. Ifthe initial variable is composite then it will be replaced by one variable selectedrandomly from its domain. This latter variable will then be randomly assigned avalue from its domain.

2. Activate any variable where the activating condition is true and randomly assign to it avalue from its domain as shown in the previous step.

3. If a complete solution is not found and the maximum number of iterations is notreached, randomly select an active variable v and proceed with one of the followingtwo cases.

– If v belongs to the domain of a given composite variable y then select the pair< v,val > that increases the quality of the current solution (number of solvedconstraints). v belongs here to the domain of y and val is a value of v′s domain,

– otherwise, assign to v a value that increases the quality of the solution.4. Deactivate any variable activated by the old assignment of v and goto 2.

5 Experimentation

In order to evaluate the methods we propose, we have performed experimental testson randomly generated CCCSPs. The experiments are performed on a PC Pentium 4computer running Linux. All the procedures are coded in C/C++. CCCSPs are buildfrom CSPs randomly generated by the model RB proposed in [17]. This model has ex-act phase transition and the ability to generate asymptotically hard instances. Followingthe model RB, we generate each CSP instance as follows using the parameters n, p, αand r where n is the number of variables, p (0 < p < 1) is the constraint tightness, andr and α (0 < α < 1) are two positive constants. 1) Select with repetition rn lnn randomconstraints. Each random constraint is formed by selecting without repetition 2 of nvariables. 2) For each constraint we uniformly select without repetition pdk incompat-ible pairs of values, where d = nα is the domain size of each variable. Each CCCSPinstance is then generated as follows.

1. Randomly generate a CSP with the parameters n, p, α and r as shown above.2. Generate N composite variables each containing D simple variables.3. Select with repetition r[(n + N) ln(n + N)− n lnn] new random constraints (between

the n + N variables), each formed by selecting without repetition 2 of the n + Nvariables. This will guarantee that the total number of constraints is r(n+N) ln(n+N). For each constraint we uniformly select without repetition pdk incompatiblepairs of values.

4. Select I(n+N) initial variables from n+N (0 < I < 1).5. Select a(nd + ND) activity constraints for each of the n + N − I(n + N) non initial

variables (0 < a < 1).

As demonstrated in [17], when the number of variables approaches infinity thephase transition occurs when the constraint tightness p = 1−e−

αr . Thus the phase tran-

sition is an asymptotic phenomenon since, only for infinite number of variables, wecan have sharp phase transitions. In addition, the number of variables and constraints

10

Fig. 4. Comparative tests on random CCCSPs.

of the possible CSPs, each CCCSP contains, is slightly different from the one of theCCCSP they are generated from. The tests we have performed compare the followingfour propagation strategies.

1) Forward Check (FC). This is the strategy we have described in Section 3 whichconsists of maintaining arc consistency, during the search, between the currentvariable (the variable that we are assigning a value) and the future active vari-ables (variables not yet assigned) sharing a constraint with the current variable.

2) Maintaining Arc Consistency (MAC). This strategy maintains a full arc consis-tency on the current and future active variables.

3) FC+. Same as FC except that the applicability of the arc consistency is extended tonon active variables as well.

4) MAC+. Same as MAC except that the applicability of the arc consistency is ex-tended to non active variables as well.

Figure 4 presents the results of comparative tests performed on random consistentCCCSPs generated with the following parameters: n = 140, N = 10, D = 5, α = 0.8,I = 0.8, a = 0.2 and r = 0.6. As mentioned earlier, the phase transition can be computedas follows : p = 1− e−

αr = 1− e−

0.80.6 = 0.73. Thus, consistent instances are those with

the tightness less than 0.73. For each test (corresponding to a particular tightness valuep), each of the four methods is executed on 100 instances and the average running timein seconds is taken. All the methods have similar running times in the case of underconstrained problems. Indeed, in this particular case the extra effort done by MAC andMAC+ does not remove much of the inconsistent values and thus does not improvethe overall running time to find a solution. However when we move toward the phasetransition the extra work performed by MAC and especially MAC+ starts to pay off.At the phase transition MAC+ is almost 10,000 times faster than FC and FC+; and100 times faster than MAC. In general MAC+ is the best method for solving randomCCCSPs.

In order to compare MAC+ to the MCRW method, we run this latter technique to thesame problem instances described above. Since MCRW is an approximation method,

11

in case it does not find a complete solution for a given instance we report the quality(percentage of solved constraints) of the best solution obtained and the time it took toget this quality. Note also that we only consider consistent instances (more specificallythose with tightness less than or equal to 0.7). The test results are reported in table 1.For each test, each method is executed on 100 instances and the average running timein seconds is taken. As we can see in the table, MCRW outperforms MAC+ for underand middle constrained problems. Indeed, in the case of under constrained problems,for example, the solution is obtained in the case of MCRW after a couple of randomassignments. However when we approach the phase transition, the random search isaffected by the change of the constraint network at each iteration. Indeed, each timean assignment is reconsidered it usually results in deactivating several variables andactivating others. MCRW has then to restart with this new configuration. Note that whileMCRW does not solve completely highly constrained problems, it is still a method ofchoice in case we want to trade search time for the quality of the solution returned. Aswe can see in the table, in the case where the tightness is equal to 0.7 for example, wecan decide to get the incomplete solution (solving 70% of the constraints) within 0.4seconds with MCRW instead of waiting 5.2 seconds to get a complete one. Tradingsearch time for the quality of the solution can be very relevant for reactive and real timeapplications where an answer is needed within a given deadline.

Tightness MCRW MAC+Time success(%)

0.1 0 100 00.2 0 100 0.010.3 0 100 0.010.4 0.01 100 0.050.5 0.08 100 0.10.6 0.3 80 1.30.7 0.4 70 5.2

Table 1. Comparative tests on random CCTCSPs.

6 Conclusion

We have presented in this paper a CSP based framework for representing and managingcompatibility constraints, activity constraints and composite variables with a uniqueconstraint network that we call Conditional Composite Constraint Satisfaction Prob-lem (CCCSP). Solving a CCCSP consists of finding a solution for one of its possibleCSPs. This requires an algorithm with O(DNdM) time cost where N,D,M and d arerespectively the number of non composite variables and their domain size, the num-ber of composite variables and their domain size. In order to overcome this difficultyin practice, we have proposed two methods respectively based on constraint propaga-tion and Stochastic Local Search (SLS). Constraint propagation prevents earlier laterfailure which improves, in practice, the performance in time of the backtrack search.On the other hand, because of its polynomial time cost, the SLS method has better

12

time performance than constraint propagation but does not always guarantee a com-plete solution. The experimental study, we conducted on randomly generated CCCSPsdemonstrates the efficiency of a variant of the MAC strategy (that we call MAC+) overthe other constraint propagation techniques. We will also show that MAC+ outperformsthe SLS method MCRW for highly consistent CCCSPs. MCRW is however the pro-cedure of choice for under constrained and middle constrained problems and also forhighly constrained problems if we trade search time for the quality of the solution re-turned (number of solved constraints).

References

1. Mittal, S., Falkenhainer, B.: Dynamic constraint satisfaction problems. In: Proceedings ofthe 8th National Conference on Artificial Intelligence, Boston, MA, AAAI Press (August1990) 25–32

2. Sabin, D., Freuder, E.C.: Configuration as composite constraint satisfaction. In Luger, G.F.,ed.: Proceedings of the (1st) Artificial Intelligence and Manufacturing Research PlanningWorkshop, AAAI Press (1996) 153–161

3. D. Sabin, E.C.F., Wallace, R.J.: Greater efficiency for conditional constraint satisfaction.Proc., Ninth International Conference on Principles and Practice of, Constraint Programming- CP 2003 2833 (2003) 649–663

4. Gelle, E.: On the generation of locally consistent solution spaces in mixed dynamic con-straint problems. Ph.D.thesis 1826 (1998) 101–140

5. Gelle, E., Faltings, B.: Solving mixed and conditional constraint satisfaction problems. Con-straints 8 (2003) 107–141

6. Gelle, E., Sabin, M.: Solving methods for conditional constraint satisfaction. In: IJCAI-03,Workshop on Configuration, Acapulco, Mexico (2003)

7. Dechter, R., Dechter, A.: Belief maintenance in dynamic constraint networks. In: 7th Na-tional Conference on Artificial Intelligence, St Paul (1988) 37–42

8. Jonsson, A.K., Frank, J.: A framework for dynamic constraint reasoning using proceduralconstraints. In: ECAI 2000. (2000) 93–97

9. J. Frank, A.K.J.: Constraint-based attribute and interval planning. Constraints 8(4) (2003)339–364

10. Tsamardinos, I., Vidal, T., Pollack, M.E.: CTP: A New Constraint-Based Formalism forConditional Temporal Planning. Constraints 8(4) (2003) 365–388

11. Dechter, R., Meiri, I., Pearl, J.: Temporal Constraint Networks. Artificial Intelligence 49(1991) 61–95

12. Selman, B., Kautz, H.: Domain-independent extensions to gsat: Solving large structuredsatisfiability problems. In: IJCAI-93. (1993) 290–295

13. Haralick, R., Elliott, G.: Increasing tree search efficiency for Constraint Satisfaction Prob-lems. Artificial Intelligence 14 (1980) 263–313

14. Mackworth, A.K.: Consistency in networks of relations. Artificial Intelligence 8 (1977)99–118

15. Bessiere, C., Regin, J.C.: Refining the basic constraint propagation algorithm. In: Sev-enteenth International Joint Conference on Artificial Intelligence (IJCAI’01), Seattle, WA(2001) 309–315

16. Zhang, Y., Yap, R.H.C.: Making ac-3 an optimal algorithm. In: Seventeenth InternationalJoint Conference on Artificial Intelligence (IJCAI’01), Seattle, WA (2001) 316–321

17. Xu, K., Li, W.: Exact Phase Transitions in Random Constraint Satisfaction Problems. Journalof Artificial Intelligence Research 12 (2000) 93–103


Recommended