Adaptive Branching for Constraint Satisfaction Problems
aa r X i v : . [ c s . A I] A ug Adaptive Branching for Constraint SatisfactionProblems
Thanasis Balafoutis and
Kostas Stergiou Abstract.
The two standard branching schemes for CSPs are d -wayand 2-way branching. Although it has been shown that intheory the latter can be exponentially more effective thanthe former, there is a lack of empirical evidence showing suchdifferences. To investigate this, we initially make an experi-mental comparison of the two branching schemes over a widerange of benchmarks. Experimental results verify the theo-retical gap between d -way and 2-way branching as we movefrom a simple variable ordering heuristic like dom to moresophisticated ones like dom/ddeg . However, perhaps surpris-ingly, experiments also show that when state-of-the-art vari-able ordering heuristics like dom/wdeg are used then d -waycan be clearly more efficient than 2-way branching in manycases. Motivated by this observation, we develop two genericheuristics that can be applied at certain points during searchto decide whether 2-way branching or a restricted versionof 2-way branching, which is close to d -way branching, willbe followed. The application of these heuristics results in anadaptive branching scheme. Experiments with instantiationsof the two generic heuristics confirm that search with adaptivebranching outperforms search with a fixed branching schemeon a wide range of problems. Most complete algorithms for CSPs are based on exhaus-tive backtracking search interleaved with constraint propaga-tion. Search is typically guided by variable and value orderingheuristics and makes use of either a “ d -way” or a “2-way”branching scheme. In the former case, after a variable x withdomain { a , . . . , a d } is chosen, d branches are built, each onecorresponding to one of the d possible value assignments of x .In the latter case, after a variable x is chosen, its values areassigned through a sequence of binary choices. The first choicepoint creates two branches, corresponding to the assignmentof a to x (left branch) and the removal of a from the domainof x (right branch). 2-way branching was described by Freuderand Sabin within the MAC algorithm [8] and in theory it canachieve exponential savings in search effort compared to d -way branching [5]. Indeed, 2-way is the standard branchingscheme of most constraint solvers.Despite the theoretical result of [5], the few experimentalstudies comparing 2-way and d -way branching have not dis- Department of Information & Communication SystemsEngineering University of the Aegean, Greece, email: { abalafoutis,konsterg } @aegean.gr played significant differences between them. Park showed that2-way and d -way display very similar performance when thesmallest domain variable ordering heuristic (VOH) is used [6],while Smith and Sturdy showed that 2-way outperforms d -waywhen searching for all solutions, albeit not considerably (anaverage speed-up of 30% was reported) [9]. The reason forthis “discrepancy” between theory and experiments is thatthe experimental studies have considered a “restricted” formof 2-way branching where the variable branched on after thesuccessful propagation of a value removal is always the cur-rent variable. This is also the default branching scheme ofmost constraint solvers. Importantly, “full” 2-way branchingas described in [8], allows for a different variable to be chosen.In this paper we first make a detailed experimental com-parison between 2-way branching, in both its restricted andfull versions, and d -way branching, under a variety of dif-ferent VOHs. Results show that the d -way and restricted 2-way branching schemes are closely matched across the dif-ferent VOHs, with d -way being slightly more cost effective.However, confirming the theoretical results, exponential dif-ferences in favor of full 2-way branching are observed as soonas we move from a simple heuristic like smallest domain ( dom )to more sophisticated ones like domain over dynamic de-gree ( dom/ddeg ). Perhaps surprisingly, when state-of-the-artconflict-driven heuristics, like dom/wdeg , are used, significantdifferences in favor of d -way (and restricted 2-way) are alsoobserved. This is because in some cases the VOH mistakenlychooses to branch on a variable other than the current oneafter the successful propagation of a value removal. This candivert search away from a hard part of the search space, re-sulting in increased search effort.Motivated by this observation, we develop two genericheuristics that can be applied at successful right branchesonce the VOH chooses to branch on a variable other than thecurrent one. At this point the heuristics are used to decidewhether the advice of the VOH will be followed or not. Theapplication of these heuristics results in an adaptive branchingscheme that dynamically switches between 2-way branchingand its restricted version (which is close to d -way branch-ing). Both of our heuristics can be used in tandem with anybacktracking search algorithm and VOH. The first heuristic isbased on measuring the difference between the scores that theVOH assigns to its selected variable and the current variable.The VOH is followed only if the difference is sufficiently large.As a downside, this heuristic requires some tuning to optimizeits performance. The second heuristic is based on the use of asecondary advisor to decide if the VOH will be followed, andt does not require any tuning.Experiments with instantiations of the two generic heuris-tics confirm that search with adaptive branching outperformssearch with a fixed branching scheme on a wide range of prob-lems. Interestingly, in many cases the gains offered by full2-way branching are also obtained by the adaptive branch-ing methods with only very few decisions following the VOHwhen it suggests to move away from the current variable atsuccessful right branches.The rest of the paper is organized as follows. Section 2 givesnecessary background. In Section 3 we compare the threebranching schemes detailed above on a variety of CSP in-stances. Section 4 presents the proposed heuristics for adap-tive branching. In Section 5 we demonstrate the efficacy of theheuristics through an experimental study. Finally, in Section 6we conclude. A Constraint Satisfaction Problem (CSP) is a tuple (
X, D,C ), where X is a set containing n variables { x , x , ..., x n } ; D is a set of domains { D ( x ) , D ( x ) ,..., D ( x n ) } for thosevariables, with each D ( x i ) consisting of the possible valueswhich x i may take; and C is a set of constraints betweenvariables in subsets of X . Each constraint c i ∈ C expresses arelation defining which variable assignment combinations areallowed for the variables in the scope of the constraint.The degree of a variable x is the number of constraints involving x , and the dynamic degree of (an unassigned variable) x isthe number of constraints involving x and at least one otherunassigned variable.Complete search algorithms for CSPs are typically basedon backtracking depth-first search where branching decisions(e.g. variable assignments) are interleaved with constraintpropagation. Search is guided by variable ordering heuristics(VOHs) and value ordering heuristics. The classic VOH small-est domain ( dom ) selects the variable with minimum domainsize [4]. Other, more sophisticated, heuristics include dom/deg and dom/ddeg [1], which select the variable with minimum ra-tio of domain size over degree (resp. dynamic degree).One of the most efficient general purpose VOHs that havebeen proposed is dom/wdeg [2]. This heuristic assigns a weightto each constraint, initially set to one. Each time a constraintcauses a conflict, i.e. a domain wipeout (DWO), its weightis incremented by one. Each variable is associated with a weighted degree , which is the sum of the weights over all con-straints involving the variable and at least another unassignedvariable. The dom/wdeg heuristic chooses the variable withminimum ratio of current domain size to weighted degree.This heuristic is among the most efficient, if not the most ef-ficient, general-purpose heuristics for CSPs. Grimes and Wal-lace proposed alternative conflict-driven heuristics that con-sider value deletions as the basic conflicts associated with con-straint weights [3]. The alldel heuristic increments the weightof a constraint each time it causes one or more value dele-tions from a domain. The efficacy of all the proposed conflict-directed heuristics is due to their ability to learn though con-flicts (either DWOs or value deletions) encountered duringsearch. As a result they can guide search towards hard partsof the problem earlier.A CSP search algorithm is usually implemented using either a d-way or a branching scheme . The former works asfollows. After a variable x with domain D ( x ) = { a , a , ..., a d } is selected, d branches are created, each one corresponding to avalue assignment of x . In the first branch, value a is assignedto x and constraint propagation is triggered. If this branchfails, a is removed from D ( x ). Then the assignment of a to x is made (second branch), and so on. If all d branchesfail then the algorithm backtracks. An example of a searchtree explored with d -way branching is shown in Figure 1a. In branching, after a variable x and a value a i ∈ D ( x )are selected, two branches are created. In the left branch a i isassigned to x , or in other words the constraint x = a i is addedto the problem and is propagated. In the right branch theconstraint x = a i is added to the problem and is propagated.If both branches fail then the algorithm backtracks. Figure 1bshows a search tree explored with 2-way branching.There are two differences between these branching schemes: • In 2-way branching, if the branch assigning a value a i toa variable x fails then the removal of a i from D ( x ) is im-mediately propagated. Instead, d -way branching tries thenext available value a j of D ( x ). Note that the propagationof a j subsumes the propagation of a i ’s removal. • In 2-way branching, after a failed branch corresponding toan assignment x = a i , and assuming the removal of a i from D ( x ) is then propagated successfully, the algorithm canchoose to branch on any variable (not necessarily x ), ac-cording to the VOH (e.g. Figure 1b). In d -way branchingthe algorithm has to choose the next available value forvariable x after x = a i fails. x=a1(cid:13) x=a2(cid:13) x=a3(cid:13)y=a1(cid:13) y=a2(cid:13) y=a3(cid:13) y=a1(cid:13) y=a2(cid:13) y=a3(cid:13) y=a1(cid:13) y=a2(cid:13) y=a3(cid:13)x=a1(cid:13) x<>(cid:13)a1(cid:13)y=a1(cid:13) y(cid:13)<>(cid:13)a1(cid:13) x(cid:13)=a2(cid:13) x(cid:13)<>(cid:13)a(cid:13)2(cid:13)x=a1(cid:13) x<>(cid:13)a1(cid:13)y=a1(cid:13) y(cid:13)<>(cid:13)a1(cid:13) y(cid:13)=a(cid:13)1(cid:13) y(cid:13)<>(cid:13)a(cid:13)1(cid:13) a)(cid:13) d(cid:13) -way branching(cid:13)c(cid:13)) restricted 2-way branching(cid:13)b(cid:13)) 2-way branching(cid:13) Figure 1.
Examples of search trees for the three branchingschemes.
In between these two schemes is the version of 2-waybranching used in [9] where the algorithm is forced to as-sign x with its next value after the successful propagation of a i ’s removal from D ( x ). In the following we call this restricted2-way branching . Figure 1c shows a search tree explored withrestricted 2-way branching. The search algorithm used in all the experiments presentedhereafter is the commonly used maintaining (generalized) arcconsistency (MAC) algorithm [7, 1]. We have experimented Domain splitting is also used, but it is not considered here. ith four VOHs: dom , dom/ddeg , dom/wdeg , and dom/alldel .Benchmarks are taken from the web page of C. Lecoutre,where details about them can be found. The following classesof binary and non-binary problems have been used: radiolinks frequency assignment (RLFAP), driver, ehi, geom, graphcoloring, quasigroup completion, chessboard coloration, all-interval series, golomb ruler and random instances from theRB model (forced to be satisfiable).Results from the use of dom with the three branchingschemes showed that under this heuristic 2-way branching es-sentially emulates d -way branching and the three branchingschemes are closely matched in terms of run times (with d -way being slightly better). This is in accordance with previousresults [6]. Table 1.
CPU times (t) in secs. and nodes (n) for the threebranching schemes using the VOH dom/ddeg . Instance 2 − way restricted d − way − way scen-11 t
508 372( sat ) n 1379 68597 45862scen-11-f11 t > h > h ( unsat ) n 2716 - -driverlogw-09 t sat ) n 75033 0.42M 0.16Mehi-85-297-0 t unsat ) n 37246 2.5M 0.9Mehi-85-297-2 t > h > h ( unsat ) n 20733 - -ash958GPIA-4 t > h > h ( sat ) n 2712 - -cc-12-12-2 t
978 959( unsat ) n 36994 0.56M 0.27M
In Table 1 we give indicative results from the use of the dom/ddeg heuristic. We display CPU times as well as nodes.A node in 2-way branching can be a value assignment ora value removal, while in d -way branching it can only be avalue assignment. Hence, they cannot be compared directly.However, nodes give an accurate measure of the difference insearch effort between 2-way and restricted 2-way. Our exper-iments confirm the theoretical results of [5] as we can observehuge differences in favor of 2-way branching. Restricted 2-wayand d -way display similar performance.Table 2 compares the three branching schemes when us-ing the conflict-driven VOH dom/wdeg . As this heuristic canlearn from failures (DWOs) encountered during search, andthus make more informed choices, it significantly outperforms dom/ddeg [2]. Comparing these results with the results of Ta-ble 1, we can notice two differences: First, there are instanceswhere 2-way branching is less efficient, sometimes consider-ably, compared to restricted 2-way and d -way. Second, in in-stances where 2-way branching dominates, the differences arenot as striking as in Table 1, albeit they can still be consider-able. Quantitatively similar results were observed when usingthe conflict-driven VOH dom/alldel .In the first part of Table 2 we group representative instanceswhere 2-way branching is the best choice, while in the secondpart we show results where restricted 2-way and d-way arebetter. Neither 2-way nor d -way (and restricted 2-way) is thebest choice, even for instances within the same problem class(see for example the ruler25 and frb35-17 problems in Ta-ble 2). As in the case of dom/ddeg , restricted 2-way branchingdisplays a behavior very close to that of d -way branching. Table 2.
CPU times (t) in secs. and nodes (n) for the threebranching schemes using the VOH dom/wdeg . Instance 2 − way restricted d − way − way series-12 t sat ) n 33876 245787 246379series-13 t sat ) n 150145 1.6M 1.3Mscen11 t sat ) n 2414 6002 4398scen2-f25 t unsat ) n 9539 38185 50609graph9-f9 t unsat ) n 66367 255204 406361ruler-25-8-a3 t unsat ) n 1829 6407 7026frb35-17-1 t
135 114( sat ) n 11129 54026 40165geo50-20-d4-75-1 t 2298 1242 ( sat ) n 558754 279998 257225geo50-20-d4-75-2 t 122 28,5 ( sat ) n 48943 9153 9509haystacks-05 t 41.7 3.9 ( unsat ) n 1.78M 0.18M 0.16Mqcp-15-120-5 t 529 408 ( sat ) n 0.76M 0.63M 0.25Mabb313GPIA-7 t 498 313 ( unsat ) n 28388 17238 11161ruler-25-7-a3 t 12.4 4.1 ( sat ) n 1444 255 129frb35-17-2 t 337 227 ( sat ) n 0.13M 0.1M 78938 A likely explanation for the failure of 2-way branching onsome instances, compared to its restricted version, is the fol-lowing. At some right branches during search, the VOH mis-takenly chooses to branch on a variable other than the cur-rent one. In the case of conflict-driven VOHs, this may re-sult in the search process moving away from a hard subprob-lem to another area of the search space resulting in increasedsearch effort. To test this conjecture we have developed heuris-tics, presented below, that can be applied at successful rightbranches to decide whether the advice of the VOH will be fol-lowed or not. The use of such heuristics results in an adaptivebranching scheme that dynamically switches between 2-waybranching and its restricted version.Finally, a conclusion that can be drawn from this experi-mental study is that the performance of different branchingschemes strongly depends on the VOH used.
We now present two generic heuristics that can be used todynamically adapt the search algorithm’s branching scheme.We only consider the case where dynamic adaptation in-volves switching between 2-way branching and restricted 2-way branching. As detailed above, the performance of d -waybranching is very close to that of restricted 2-way branching.The intuition behind the heuristics is twofold. First, to avoidbranching on a different variable if the VOH is not “confidentenough” about the correctness of this decision. And second, toidentify ways to assist this decision by the use of secondaryadvisors. That is, VOHs that can complementarily be con-sulted to help in the decision making.These heuristics can be applied at successful right branches.That is, when the VOH suggests to branch on another variableather that trying the next value of the current one. Followingthe above intuitions we propose two generic heuristics: H sdiff ( e ) : - VOH score difference If the current vari-able is x and the VOH suggests to branch on a differ-ent variable y , we will follow this suggestion only when | score ( y ) − score ( x ) | > e , where score ( x ) and score ( y ) arethe values assigned by the VOH to variables x and y , while e is a threshold value difference. H cadv ( VOH ) : - complementary advisor If the currentvariable is x and the VOH used by the algorithm ( V OH ) sug-gests to branch on a different variable y , we will follow thissuggestion only when a secondary VOH ( V OH ) also prefers y to x . That is, when score V OH ( y ) > score V OH ( x ), where score V OH ( x ) and score V OH ( y ) are the heuristic values as-signed by V OH to variables x and y .Both proposed heuristics are generic, in the sense that theycan be used in tandem with any VOH and any backtrackingsearch algorithm. However, H sdiff ( e ) requires some tuning toset the value of e appropriately. In contrast, H cadv ( V OH )does not require any such tuning, and can use any VOH as asecondary heuristic. The two heuristics can also be combinedeither conjunctively or disjunctively. In the former (resp. lat-ter) case, the suggestion to branch on a variable different than x is followed when both (resp. at least one) of the criterionsfor H sdiff and H cadv are satisfied. Importantly, the two pro-posed heuristics are lightweight, assuming that V OH is nottoo expensive to compute. In this section we evaluate the performance of the two heuris-tics on a variety of CSP instances. Before presenting the re-sults, we discuss the tuning of heuristic H sdiff ( e ). H sdiff ( e ) Although heuristic H sdiff ( e ) is generic and can be used to-gether with any VOH, the optimum threshold value e obvi-ously varies among different VOHs as they may consider dif-ferent metrics, such as domain sizes, constraint degrees, con-straint weights, etc. Even with a fixed VOH and within a spe-cific problem class, the optimum threshold value e may differfrom instance to instance, and therefore locating it is not par-ticularly interesting from a practical point of view. However,our experiments have demonstrated that a “good enough”value for e that carries across different problem classes can belocated for a given VOH with only a few experiments.To find a good value for e we proceeded as follows. Taking asingle instance from some problem class we repeatedly solvedit using the H sdiff ( e ) heuristic for branching, starting with e set to 0 and gradually increasing e in every repetition. Setting e = 0 forces H sdiff ( e ) to emulate 2-way branching, while as e increases, H sdiff ( e ) moves closer to restricted 2-way branch-ing. For each run we measured the number of times when,after a failed assignment x = a i and the successful propaga-tion of x = a i , the VOH chose to branch on a variable y otherthan x . In the following we will call this measure variablechanges ( vc ). By definition, such a situation does not occurwith restricted 2-way branching, hence with this branchingscheme vc is always 0. We assume that a greater score is better according to
V OH . Specifically for dom/wdeg , the value of e was increased insteps of 0.01. Figures 2b, c and d show the number of nodes ( y -axis) as a relation of e ( x -axis) for instances scen11, series12and haystacks-05 respectively. The first data point in theseplots (where e = 0) essentially gives the number of nodes for2-way branching. The experiment was stopped when for somevalue of e the observed value of vc was 0. The last data pointin each plot, corresponding to this situation, essentially givesthe number of nodes for restricted 2-way branching.(a) (b)(c) (d) Figure 2. (a) variable changes and (b) nodes over increasing val-ues of e for the scen11 RLFAP. (c), (d) nodes for the series12 (c)and haystacks-05 (d) instances. In Figures 2b and c (scen11 and series12), where 2-waybranching is better than its restricted version, we can noticethat as e increases there is point where a sharp decline in theperformance of H sdiff ( e ) occurs. Respectively, in Figure 2d(haystacks-05) where restricted 2-way is better, we can no-tice that as e increases there is point where a sharp improve-ment in the performance occurs. After running similar exper-iments with benchmark instances from other problem classes,we observed that setting e to values around 0.1, when us-ing dom/wdeg for variable ordering, gives good results acrossmany different instances and problem classes. For heuristic dom/alldel this value was 0.001.Finally, Figure 2a gives the recorded value of vc ( y -axis)as a relation of e ( x -axis) for the RLFAP instance scen11.Not surprisingly, as the value of e increases, the value of vc decreases. Interestingly, there is a sharp (exponential) declinein the value of vc roughly around the point where e = 0 .
1. Asimilar phenomenon was observed in all the tested instances.
We have experimented with 400 instances from the problemclasses detailed in Section 3. We compared the performance able 3.
CPU times (t) in secs. and nodes (n) and variable changes (vc) for 2-way and the adaptive branching schemes using the dom/wdeg
VOH.
Instance 2 − way restricted H sdiff H cadv H ∧ H ∨ − way (0.1) ( wdeg )series-12 t 27.3 145.7 21 sat ) n 33876 0.24M 25730 13584 27721 17434vc 531 0 4 78 2 127series-13 t 148.4 1132 98.3 150.6 70.6 ( sat ) n 0.15M 1.6M 96248 0.15M 71570 64670vc 2492 0 9 1163 6 358scen11 t sat ) n 2414 6002 2197 2456 2197 2023vc 31 0 8 31 8 31scen2-f25 t 42.3 183.8 45 ( unsat ) n 9539 38185 9952 9561 9952 9561vc 719 0 69 484 69 484graph9-f9 t unsat ) n 66367 0.25M 69699 67585 70748 66802vc 873 0 74 698 68 700ruler-25-8-a3 t unsat ) n 1829 6407 5022 1905 5022 1905vc 281 0 1 159 1 159frb35-17-1 t
135 69.4 41.8 66.4 41.8( sat ) n 11129 54026 25003 15163 25003 15163vc 63 0 5 43 5 43 of the fixed branching schemes 2-way and restricted 2-way tothe performance of the following adaptive branching schemes: H sdiff (0 . H cadv ( wdeg ), and their conjunctive and disjunc-tive combinations H ∧ and H ∨ . The value of the threshold e for H sdiff was set to 0.1 after a few preliminary experi-ments as explained above, while the secondary heuristic usedby H cadv was wdeg . The VOH used was dom/wdeg .In 51% of the tried instances all methods were very close.In 24% 2-way was faster than restricted 2-way, while in 25%it was slower. The last two cases included most of the hardestinstances. Tables 3 and 4 give some results from the last twocases indicating the gaps in performance between 2-way andrestricted 2-way and the fact that the adaptive heuristics typ-ically follow the winner between the two branching schemes.For each instance and branching scheme we report CPU time,nodes, and the observed value of vc .Table 3 includes instances where 2-way is better than re-stricted 2-way, while Table 4 includes instances where re-stricted 2-way is better than 2-way. The adaptive branchingschemes are, in most cases, close to or even slightly supe-rior to 2-way branching in Table 3, while a similar observa-tion can be made with respect to restricted 2-way branchingfor Table 4. Respectively, the adaptive branching schemes areclearly superior to restricted 2-way in the Table 3, and to 2-way in Table 4. Generally, we can notice that although theadaptive branching schemes do not always achieve the bestperformance, they obtain a good trade-off between the per-formance of 2-way and restricted 2-way branching. Addition-ally, in many instances the adaptive branching schemes aresuperior to both 2-way and restricted 2-way (e.g. series-12and frb35-17-2). Note that the tables include instances whereone or both of the adaptive methods performed substantiallyworse than the winner among the standard branching schemes(e.g. ruler-25-8-a3 and haystacks-05).Comparing the heuristics, H sdiff and H ∧ are more efficientand robust than H cadv and H ∨ . However, we have not exper-imented extensively with secondary advisors for H cadv so far.The one used in the experiments ( wdeg ) is obviously closelyrelated to the primary VOH ( dom/wdeg ). Trying a more di-verse secondary advisor, i.e. a heuristic that utilizes differenttype of information, may yield better results. Note that using dom as the secondary advisor is clearly inferior compared to wdeg (results are omitted due to lack of space). This is notsurprising if we consider that wdeg is a much more effectiveVOH compared to dom .Taking a closer look at the results presented in Table 3 itis interesting to notice the behavior of the branching schemeson the first instance series12. Here, restricted 2-way is clearlyinefficient compared to 2-way. The latter branches on a vari-able different than the current one after a right branch 531times throughout search (i.e. vc = 531). On the other hand, H sdiff and H ∧ manage to outperform 2-way branching byonly branching on 4 (resp. 2) different variables after rightbranches. Restricted 2-way branching is outperformed by afactor of 7, by only making 4 (resp. 2) decisions against theVOH. Similar behavior can be observed in most instances ofTable 3. Even more so in Table 4 where restricted 2-way isbetter that 2-way, H sdiff and H ∧ follow the VOH very fewtimes when it chooses to branch on a variable other than thecurrent one.These results suggest that heuristic H sdiff in particular isable to “block” variable changes that have a degrading effecton the search effort. Heuristic H cadv also achieves this, but toa lesser extent, as is evident by the vc numbers. The behaviorof the H ∧ (resp. H ∨ ) heuristic is closely related to that of H sdiff (resp. H cadv ).To verify these, we rerun all the experiments and each timea different variable y than the current one x was selected ata right branch, we ordered all the variables according to their dom/wdeg value. Then we measured the distance ( dis ) be-tween x and y in this ordering (obviously y was always first).Results show that the average value of dis for H sdiff wassignificantly larger than the average dis for 2-way branching.For example in the series12 instance, average dis for H sdiff was 9 while for 2-way branching it was 1.9. For the geo50-20-d4-75-1 instance average dis for H sdiff and 2-way was 14 and1.6 respectively. These results demonstrate that H sdiff allowsvariable changes only when the selected variable is consider-ably superior to the current variable according to the VOH.Finally, in order to evaluate the statistical significance ofour experimental results, a statistical analysis through a setof paired t-tests was performed. We analyzed the CPU perfor- able 4. CPU times (t) in secs. and nodes (n) and variable changes (vc) for 2-way and the adaptive branching schemes using the dom/wdeg
VOH.
Instance 2 − way restricted H sdiff H cadv H ∧ H ∨ − way (0.1) ( wdeg )geo-d4-75-1 t 2298 1242 sat ) n 0.55M 0.28M 0.27M 0.45M 0.27M 0.45Mvc 1428 0 2 689 2 690geo-d4-75-2 t 122
37 57 37 57( sat ) n 48943 9153 12356 18995 12356 18995vc 642 0 2 58 2 58haystacks-05 t 41.7 unsat ) n 1.78M 0.18M 1.2M 1.78M 1.2M 1.78Mvc 20 0 7 20 7 20qcp-15-120-5 t 529
409 418 409 418( sat ) n 0.76M 0.6M 0.6M 0.61M 0.6M 0.61Mvc 3177 0 1 1347 1 1347abb313-7 t 498
313 313
429 313 429( unsat ) n 28388 17238 17238 21699 17238 21699vc 6 0 0 4 0 4ruler-25-7-a3 t 12.4 4.1 5.8 ( sat ) n 1444 255 291 190 291 190vc 28 0 3 7 3 7frb35-17-2 t 337 227 124 ( sat ) n 0.13M 0.1M 56508 42712 46935 42712vc 782 0 6 120 5 120 mance of the adaptive branching schemes compared to 2-wayand restricted 2-way, over the 400 instances. We measured themean difference in secs., standard deviation, t-value and the95% confidence interval. The risk level (called alpha level) wasset to 0.05. Results are collected in Table 5. The mean CPUreduction is always greater than zero. However, the negativevalues at the confidence interval indicates that this reduc-tion was not observed in all the tried instances. According tostandard tables of significance (available as an appendix inthe back of most statistics texts) we can confirm that t-valuesfor H sdiff were large enough to be significant. This is notclear for H cadv , which means that the observed improvementis not large enough to be clearly significant.We have also run experiments with the conflict driven VOH dom/alldel (not reported here due to lack of space) in whichadaptive branching schemes with heuristics H sdiff (0 . H cadv ( wdeg ) were again on average more efficient than thefixed branching schemes. Table 5.
Paired t-test measurements for evaluation of the signif-icance of the experimental results.
Mean SD t-value 95% C.I.2-way vs H sdiff H sdiff H cadv H cadv We compared the two most widely used branching schemesfor CSPs, 2-way and d -way branching. Results showed thatthe theoretical benefits of 2-way branching are confirmed inpractice once we move from a simple VOH like dom to a moresophisticated one like dom/ddeg . However, perhaps unexpect-edly, when a state-of-the-art heuristic like dom/wdeg is usedthen there exist many cases where 2-way branching is signifi-cantly inferior to d -way and a restricted version of 2-way thatis commonly used.We then introduced generic heuristics that can be usedto dynamically decide whether the VOH will be followedor not at certain points during search. The application of such heuristics results in an adaptive branching scheme thatswitches between 2-way branching and its restricted version,which is close to d -way branching. Experiments with instan-tiations of the generic heuristics confirm that search withadaptive branching outperforms search with a fixed branchingscheme on a wide range of problems.The work presented here is, to the best of our knowledge,the first attempt towards designing heuristics for adaptivebranching and contributes to the design and implementationof adaptive constraint solvers. REFERENCES [1] C. Bessi`ere and J.C. R´egin. MAC and combined heuristics: tworeasons to forsake FC (and CBJ?). In
Proceedings of CP-1996 ,pages 61–75, Cambridge MA, 1996.[2] F. Boussemart, F. Hemery, C. Lecoutre, and L. Sais. Boostingsystematic search by weighting constraints. In
Proceedings ofECAI-2004 , pages 146–150, Valencia, Spain, 2004.[3] D. Grimes and R.J. Wallace. Sampling strategies and variableselection in weighted degree heuristics. In
Proceedings of CP-2007 , pages 831–838, 2007.[4] R.M. Haralick and Elliott. Increasing tree search efficiencyfor constraint satisfaction problems.
Artificial Intelligence ,14:263–314, 1980.[5] J. Hwang and D. Mitchell. 2-Way vs. d-Way Branching forCSP. In
Proceedings of CP-2005 , pages 343–357, 2005.[6] V. Park. An empirical study of different branching strategiesfor constraint satisfaction problems, Master’s thesis, Universityof London, 2004.[7] D. Sabin and E.C. Freuder. Contradicting conventional wisdomin constraint satisfaction. In
Proceedings of CP-1994 , pages10–20, 1994.[8] D. Sabin and E.C. Freuder. Understanding and Improving theMAC Algorithm. In
Proceedings of CP-1997 , pages 167–181,1997.[9] B. Smith and P. Sturdy. Value Ordering for Finding All Solu-tions. In