Sep 6, 2006 ------------- - Recall Constraint Graphs - Primary way of solving CSPs: Backtracking - really dfs - possibility of thrashing - primarily due to arc-inconsistency - but also due to node-inconsistency - Definition of node-inconsistency - Defn of arc-consistency and (inconsistency) - arc {V_i, V_j} is arc consistent iff for all a in D_i, there exists "a" b in D_j such that (a,b) is in R_ij - Can make a constraint graph arc consistent by - removing values in domain D_i for which there are no compatible values in D_j - An example of constraint propagation to restore - arc consistency - What can happen if arc consistency is enforced? - domains are emptied => no solution - all domains are of size 1 => one solution - all but one domains are of size 1, one domain has k values => k solutions - other => could be any number of solutions, including none - Algorithms - CLEANUP(Vi,Vj) - to make arc arc-consistent - Using CLEANUP - to create a full-fledged constraint propagation algo. - AC-1 (not so efficient) - AC-3 - only revisit those edges potentially changed by REVISIon - If (Vi,Vj) is updated, we only need to visit (Vk,Vi) where k<>i and k<>j - why? - Recall that arc-consistency cannot simplify problems completely - still some search might be required - Some more things we need to complete the big picture - interleaving constraint propagation and search - how to do CSP search better - Interleaving search and constraint propagation - At each level in the search tree, use the partial assignment of variables to create more constrained CSPs that might be amenable to constraint propagation (e.g., arc-consistency) - How to search better - having decided that some search is inevitable? - Two useful heuristics - most constrained variable - least constraining value - Why do these work? - CSPs are commutative in nature - order of var assignment doesn't matter