# Lecture06HO - CS440/ECE448: Intro to Articial Intelligence!...

This preview shows pages 1–4. Sign up to view the full content.

Lecture 6: More on constraint satisfaction problems Prof. Julia Hockenmaier juliahmr@illinois.edu http://cs.illinois.edu/fa11/cs440 CS440/ECE448: Intro to ArtiFcial Intelligence Tuesday ʼ s key concepts Constraint satisfaction problems: Given: a set of n variables X 1 ..X n , with domains (sets of possible values) D 1 …D n , and a set of m constraints C 1 … C m Task: assign a value from D i for each X i subjects to the constraints. CSP 1: Map coloring (Binary constraints) Map coloring: a solution for N=3 4 CS440/ECE448: Intro AI

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Constraint satisfaction problems are deFned by… - a set of variables X : {WA, NT, QLD, NSW, VA, SA, TA} - a set of domains D i (possible values for variable x i ): D WA = {red, blue, green} - a set of constraints C : { ʪ (WA,NT) , WA NT ʫ , (WA,QLD), WA QLD ,…} scope relation 5 CS440/ECE448: Intro AI States and solutions Each state is a complete or partial assignment of values to variables: state35 = {WA=red, NT=blue, QLD= green, NSW= red, VA= green, SA= blue, TA= red}; state23 = {WA = red} Legal assignments don ʼ t violate any constraints. Solutions are complete legal assignments 6 CS440/ECE448: Intro AI Binary constraints: constraint graph QLD NT NSW VA TA SA WA CS440/ECE448: Intro AI 7 Consistency Node consistency: X is node-consistent iff each element in D X satisFes unary constraints on X Arc consistency: X is arc-consistent iff for each C(X, Y) and for each x ˥ D X there is a y ˥ D Y such that the assignment {X=x, Y=y} satisFes C(X,Y). Path consistency: {X,Y} are path consistent wrt. Z iff for every x ˥ D X and y ˥ D X there is a z ˥ D Z such that the assignment {X=x,Y=y,Z=z} satisFes C(X,Z) and C(Y,Z) 8 CS440/ECE448: Intro AI
AC-3 // Is the CSP c arc-consistent? function AC3(CSP c) input: CSP c = (X,D,C) local: queue q ˡ all arcs C(X,Y) in c while q () do: // Can C(X,Y) be satisfied? (X,Y) = pop(q);

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/13/2011 for the course CS 440 taught by Professor Levinson,s during the Spring '08 term at University of Illinois, Urbana Champaign.

### Page1 / 10

Lecture06HO - CS440/ECE448: Intro to Articial Intelligence!...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online