Constraint Satisfaction Problems Flashcards
State in CSP
state is defined by variables, X, with values from domain
goal test in CSP
set of constraints specifying allowable combinations of values for subsets of variables
Variable based model
Solution is not a path but an assignment of values for a set of variables that satisfy all constraints
Complete solution
all variables are assigned values. Solutions are complete and consistent
consistent solution
does not violate any constraints. Solutions are complete and consistent
Constraint graph
nodes are varialbes, arcs are constraints
Varieties of CSPs
discrete variables - finite and infinite domains
continuous variables
unary constraints
constraints involve a single variable
3 types of constraints
unary, binary, high order
binary constraints
involve pairs of variables
higher-order constraints
involve 3 or more variables
apply local search for CSPs
allow states with some unsatisfied constraints; operators assign a value to a variable; variable selection, value selection
min conflicts heuristic
choose value that violates the fewest constraints
min-conflicts algorithm
Assign each variable a random value, defining the inital state
While state is not consistent: pic a variable that has a constraint violated, find a value for the variable that minimizes the total number of violated constraints (ver all variables)
Min Conflicts Algorithm Advantages
Simple and fast
Min Conflicts Algorithm Disadvantages
Only searches states that are reachable from the initial state (might not search entire state space); does not allow worse moves; not complete