Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgements
- 1 Introduction
- 2 Search Spaces
- 3 Blind Search
- 4 Heuristic Search
- 5 Stochastic Local Search
- 6 Algorithm A* and Variations
- 7 Problem Decomposition
- 8 Chess and Other Games
- 9 Automated Planning
- 10 Deduction as Search
- 11 Search in Machine Learning
- 12 Constraint Satisfaction
- Appendix: Algorithm and Pseudocode Conventions
- References
- Index
12 - Constraint Satisfaction
Published online by Cambridge University Press: 30 April 2024
- Frontmatter
- Contents
- Preface
- Acknowledgements
- 1 Introduction
- 2 Search Spaces
- 3 Blind Search
- 4 Heuristic Search
- 5 Stochastic Local Search
- 6 Algorithm A* and Variations
- 7 Problem Decomposition
- 8 Chess and Other Games
- 9 Automated Planning
- 10 Deduction as Search
- 11 Search in Machine Learning
- 12 Constraint Satisfaction
- Appendix: Algorithm and Pseudocode Conventions
- References
- Index
Summary
What is common between solving a sudoku or a crossword puzzle and placing eight queens on a chessboard so that none attacks another? They are all problems where each number or word or queen placed on the board is not independent of the others. Each constrains some others. Like a piece in a jigsaw puzzle that must conform to its neighbours. Interestingly, all these puzzles can be posed in a uniform formalism, constraints. The constraints must be respected by the solution – the constraints must be satisfied. And a unified representation admits general purpose solvers. This has given rise to an entire community engaged in constraint processing. Constraint processing goes beyond constraint satisfaction, with variations concerned with optimization. And it is applicable on a vast plethora of problems, some of which have been tackled by specialized algorithms like linear programming and integer programming.
In this chapter we confine ourselves to finite domain constraint satisfaction problems (CSPs) and study different approaches to solving them. We highlight the fact that CSP solvers can combine search and logical inferences in a flexible manner.
A constraint network R or a CSP is a triple,
R = <X, D, C>
where X is a set of variable names, D is a set of domains, one for each variable, and C is a set of constraints on some subsets of variables (Dechter, 2003). We will use the names X = ﹛x1, x2, …, xn﹜ where convenient with the corresponding domains D = ﹛D1, D2, …, Dn﹜. The domains can be different for each variable and each domain has values that the variable can take, Di = ﹛ai1, ai2, …, aik﹜. Let C = ﹛C1, C2, …, Cm﹜ be the constraints. Each constraint Ci has a scope Si R X and a relation Ri that is a subset of the cross product of the domains of the variables in Si. Based on the size of Si, we will refer to the constraints as unary, binary, ternary, and so on. A CSP is often depicted by a constraint graph and a matching diagram, as described in the examples to follow.
We will confine ourselves to finite domain CSPs, in which the domain of each variable is discrete and finite. We will also specify the relations in extensional form well suited for our algorithms.
- Type
- Chapter
- Information
- Search Methods in Artificial Intelligence , pp. 393 - 440Publisher: Cambridge University PressPrint publication year: 2024