Skip to main content

Conflict history based heuristic for constraint satisfaction problem solving

Abstract

The variable ordering heuristic is an important module in algorithms dedicated to solve Constraint Satisfaction Problems (CSP), while it impacts the efficiency of exploring the search space and the size of the search tree. It also exploits, often implicitly, the structure of the instances. In this paper, we propose Conflict-History Search (CHS), a dynamic and adaptive variable ordering heuristic for CSP solving. It is based on the search failures and considers the temporality of these failures throughout the solving steps. The exponential recency weighted average is used to estimate the evolution of the hardness of constraints throughout the search. The experimental evaluation on XCSP3 instances shows that integrating CHS to solvers based on MAC (Maintaining Arc Consistency) and BTD (Backtracking with Tree Decomposition) achieves competitive results and improvements compared to the state-of-the-art heuristics. Beyond the decision problem, we show empirically that the solving of the constraint optimization problem (COP) can also take advantage of this heuristic.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Notes

  1. 1.

    http://www.xcsp.org.

  2. 2.

    http://www.xcsp.org/series.

  3. 3.

    http://www.cril.univ-artois.fr/XCSP18/.

  4. 4.

    Given the poor results of MAC with IBS, including IBS leads to a less relevant comparison on instances solved by MAC with each heuristic since it significantly decreases the number of such instances.

  5. 5.

    http://www.cril.univ-artois.fr/XCSP19.

References

  1. Bachiri, I., Gaudreault, J., Quimper, C., Chaib-draa, B.: RLBS: an adaptive backtracking strategy based on reinforcement learning for combinatorial optimization. In: Proceedings of ICTAI, pp. 936–942 (2015)

  2. Balafrej, A., Bessiere, C., Paparrizou, A.: Multi-armed bandits for adaptive constraint propagation. In: Proceedings of IJCAI, pp. 290–296 (2015)

  3. Battiti, R., Campigotto, P.: An Investigation of Reinforcement Learning for Reactive Search Optimization, pp. 131–160. Springer Berlin Heidelberg, Berlin, Heidelberg (2012)

  4. Bessière, C., Chmeiss, A., Saïs, L.: Neighborhood-based variable ordering heuristics for the constraint satisfaction problem. In: Proceedings of CP, pp. 565–569 (2001)

  5. Bessière, C., Régin, J.C.: MAC and Combined Heuristics: Two Reasons to Forsake FC (and CBJ?) on Hard Problems. In: Proceedings of CP, pp. 61–75 (1996)

  6. Boussemart, F., Hemery, F., Lecoutre, C., Saïs, L.: Boosting systematic search by weighting constraints. In: Proceedings of ECAI, pp. 146–150 (2004)

  7. Brélaz, D.: New methods to color vertices of a graph. Commun. ACM 22(4), 251–256 (1979)

    MathSciNet  Article  Google Scholar 

  8. Cabon, C., de Givry, S., Lobjois, L., Schiex, T., Warners, J.P.: Radio link frequency assignment. Constraints 4, 79–89 (1999)

    Article  Google Scholar 

  9. Chu, G., Stuckey, P.J.: Learning value heuristics for constraint programming. In: Integration of AI and OR Techniques in Constraint Programming, pp. 108–123. Springer International Publishing, Cham (2015)

  10. Eén, N., Sörensson, N.: An extensible SAT-solver. In: Proceedings of SAT, pp. 502–518 (2003)

  11. Gay, S., Hartert, R., Lecoutre, C., Schaus, P.: Conflict Ordering search for scheduling problems. In: Pesant, G. (ed.) Proceedings of CP, pp. 140–148 (2015)

  12. Geelen, P.A.: Dual viewpoint heuristics for binary constraint satisfaction problems. In: Proceedings of ECAI, pp. 31–35 (1992)

  13. Golomb, S.W., Baumert, L.D.: Backtrack programming. J. ACM 12, 516–524 (1965)

    MathSciNet  Article  Google Scholar 

  14. Gomes, C.P., Selman, B., Crato, N., Kautz, H.A.: Heavy-tailed phenomena in satisfiability and constraint satisfaction problems. J. Autom. Reason. 24(1/2), 67–100 (2000)

    MathSciNet  Article  Google Scholar 

  15. Habet, D., Jégou, P., Kanso, H., Terrioux, C.: BTD\(\_12\) and miniBTD\(\_12\). In: Proceedings of the XCSP3 Competition, pp. 68–69 (2018)

  16. Habet, D., Terrioux, C.: Conflict history based search for constraint satisfaction problem. In: Proceeding of SAC, Knowledge Representation and Reasoning Technical Track, pp. 1117–1122 (2019)

  17. Haralick, R.M., Elliot, G.L.: Increasing tree search efficiency for constraint satisfaction problems. AIJ 14, 263–313 (1980)

    Google Scholar 

  18. Hebrard, E., Siala, M.: Explanation-based weighted degree. In: Proceedings of CPAIOR, pp. 167–175 (2017)

  19. Holland, A., O’Sullivan, B.: Weighted super solutions for constraint programs. In: Proceedings of AAAI, pp. 378–383 (2005)

  20. Hooker, J.N.: Testing heuristics: we have it all wrong. J. Heuristics 1(1), 33–42 (1995)

    Article  Google Scholar 

  21. Jégou, P., Kanso, H., Terrioux, C.: Towards a dynamic decomposition of CSPs with separators of bounded size. In: Proceedings of CP, pp. 298–315 (2016)

  22. Jégou, P., Kanso, H., Terrioux, C.: BTD and miniBTD. In: XCSP3 Competition (2017)

  23. Jégou, P., Kanso, H., Terrioux, C.: BTD and miniBTD. In: Proceedings of the XCSP3 Competition, pp. 66–67 (2018)

  24. Jégou, P., Terrioux, C.: Hybrid backtracking bounded by tree-decomposition of constraint networks. AIJ 146, 43–75 (2003)

    MathSciNet  MATH  Google Scholar 

  25. Lecoutre, C., Sais, L., Tabary, S., Vidal, V.: Last conflict based reasoning. In: Proceedings of ECAI, pp. 133–137 (2006)

  26. Lecoutre, C., Sais, L., Tabary, S., Vidal, V.: Nogood recording from restarts. In: Proceedings of IJCAI, pp. 131–136 (2007)

  27. Lecoutre, C., Sais, L., Tabary, S., Vidal, V.: Recording and minimizing nogoods from restarts. JSAT 1(3–4), 147–167 (2007)

    MATH  Google Scholar 

  28. Liang, J.H., Ganesh, V., Poupart, P., Czarnecki, K.: Exponential recency weighted average branching heuristic for SAT solvers. In: Proceedings of AAAI, pp. 3434–3440 (2016a)

  29. Liang, J.H., Ganesh, V., Poupart, P., Czarnecki, K.: Learning rate based branching heuristic for SAT solvers. In: Proceedings of SAT, pp. 123–140 (2016b)

  30. Liberatore, P.: On the complexity of choosing the branching literal in DPLL. Artif. Intell. 116(1–2) (2000)

  31. Marques-Silva, J., Sakallah, K.A.: GRASP: a search algorithm for propositional satisfiability. IEEE Trans. Comput. 48(5), 506–521 (1999)

    MathSciNet  Article  Google Scholar 

  32. Michel, L., Hentenryck, P.V.: Activity-based search for black-box constraint programming solvers. In: Proceedings of CPAIOR, pp. 228–243 (2012)

  33. Moskewicz, M.W., Madigan, C.F., Zhao, Y., Zhang, L., Malik, S.: Chaff: engineering an efficient SAT solver. In: Proceedings of DAC, pp. 530–535 (2001)

  34. Nadel, B.: Tree search and arc consistency in constraint-satisfaction algorithms, pp. 287–342. In: Search in Artificial Intelligence. Springer-Verlag (1988)

  35. Refalo, P.: Impact-based search strategies for constraint programming. In: Proceedings of CP, pp. 557–571 (2004)

  36. Robertson, N., Seymour, P.D.: Graph minors II: algorithmic aspects of treewidth. Algorithms 7, 309–322 (1986)

    MathSciNet  Article  Google Scholar 

  37. Rossi, F., van Beek, P., Walsh, T.: Handbook of Constraint Programming, Foundations of Artificial Intelligence, vol. 2. Elsevier (2006)

  38. Sabin, D., Freuder, E.C.: Contradicting conventional wisdom in constraint satisfaction. In: Proceedings of ECAI, pp. 125–129 (1994)

  39. Schulte, C.: Programming branchers. In: Schulte, C., Tack, G., Lagerkvist, M.Z. (eds.) Modeling and Programming with Gecode (2018). Corresponds to Gecode 6.0.1

  40. Simonin, G., Artigues, C., Hebrard, E., Lopez., P.: Scheduling scientific experiments for comet exploration. Constraints 20(1), 77–99 (2015)

  41. Sutton, R.S., Barto, A.G.: Reinforcement Learning: An Introduction, 1st edn. MIT Press, Cambridge (1998)

    MATH  Google Scholar 

  42. Wattez, H., Koriche, F., Lecoutre, C., Paparrizou, A., Tabary, S.: Learning variable ordering heuristics with multi-armed bandits and restarts. In: Proceedings of ECAI (2020)

  43. Wattez, H., Lecoutre, C., Paparrizou, A., Tabary, S.: Refining constraint weighting. In: Proceedings of ICTAI, pp. 71–77 (2019)

  44. Xia, W., Yap, R.H.C.: Learning robust search strategies using a bandit-based approach. In: Proceedings of AAAI, pp. 6657–6665 (2018)

Download references

Acknowledgements

This work has been funded by the French Agence Nationale de la Recherche, Reference ANR-16-CE40-0028.

Author information

Affiliations

Authors

Corresponding author

Correspondence to Djamal Habet.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This paper is an extension of the work published in Habet and Terrioux (2019).

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Habet, D., Terrioux, C. Conflict history based heuristic for constraint satisfaction problem solving. J Heuristics (2021). https://doi.org/10.1007/s10732-021-09475-z

Download citation

Keywords

  • CSP solving
  • Variable ordering heuristic
  • Conflict history
  • Exponential recency weighted average