Chapter 6 - CS Search
Chapter 6 - CS Search
Intelligence
Constraint satisfaction problems
Constraint satisfaction problems (CSPs)
Standard search problem:
• state is a “black box “
• that supports goal test, evaluation, successor
Goal test can be any function over states
Successor function can also be anything
CSP:
• A special subset of search problems
• state is defined by variables Xi with values from domain Di
• goal test is a set of constraints specifying
• allowable combinations of values for subsets of variables
DEFINING CONSTRAINT SATISFACTION PROBLEMS
Each domain Di consists of a set of allowable values, {v1, . . . , vk} for variable
Xi.
Each constraint Ci consists of a pair <scope, rel> , where scope is a tuple of
variables that participate in the constraint and rel is a relation that defines
the values that those variables can take on.
Relations
if X1 and X2 both have the domain {A,B}, then the constraint saying the two
variables must have different values can be written as:
OR
To solve a CSP, we need to define a state space and the notion of a solution.
• or