1
Constraint Satisfaction
AI Class 7 — Ch. 6.1–6.4 (skip 6.3.3))
Cynthia Matuszek – CMSC 671
Based on slides by: Marie desJardin, Paula Matuszek, Luke Zettlemoyer, Dan Klein, Stuart Russell, Andrew Moore
Bookkeeping
- HW 2 questions?
- Please note: it must be due COB Blackboard time
- 11:59:XX is late!
- We will not let this slide again.
- Need to upload .py files – see Nikhil if it’s not working
2
…
Today’s Class
- Constraint Satisfaction Problems
- A.K.A., Constraint Processing / CSP paradigm
- Algorithms for CSPs
- Search Terminology
3
Constraint (n): A relation … between the values of one or more mathematical variables (e.g., x>3 is a constraint on x). Constraint satisfaction assigns values to variables so that all constraints are true. – http://foldoc.org/constraint
Constraint Satisfaction
- Con•straint /kənˈstrānt/, (noun):
- Something that limits or restricts someone or something.1
- Control that limits or restricts someone’s actions or behavior.1
- A relation … between the values of one or more mathematical
variables (e.g., x>3 is a constraint on x).2
- Assigns values to variables so that all constraints are true.2
- General Idea
- View a problem as a set of variables
- To which we have to assign values
- That satisfy a number of (problem-specific) constraints
4
[1] Merriam-Webster online. [2] The Free Online Computing Dictionary.
Overview
- Constraint satisfaction: a problem-solving
paradigm
- Constraint programming, constraint satisfaction
problems (CSPs), constraint logic programming…
- Algorithms for CSPs
- Backtracking (systematic search)
- Constraint agati0agation (k-consistency)
- Variable and value ordering heuristics
- Backjumping and dependency-directed backtracking
5
Search Vocabulary
- We’ve talked about caring about goals (end states) vs. paths
- These correspond to…
- Planning: finding sequences of actions
- The path to the goal is the important thing
- Paths have various costs, depths
- Heuristics to guide, fringe to keep backups
- Identification: assignments to variables representing
unknowns
- The goal itself is important, not the path
- CSPs are specialized for identification problems
6