{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

G-const-sat - (Where we postpone making difficult decisions...

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

View Full Document Right Arrow Icon
1 Constraint Satisfaction Problems (CSP) (Where we postpone making difficult decisions until they become easy to make) R&N: Chap. 5 1 What we will try to do ... Search techniques make choices in an often arbitrary order. Often little information is available to make each of them In many problems, the same states can be reached independent of the order in which choices are made (“commutative” actions) Can we solve such problems more efficiently by picking the order appropriately? Can we even avoid making any choice? 2 Constraint Propagation Place a queen in a square Remove the attacked squares from future consideration 3 6 6 5 5 5 5 5 5 5 6 7 Constraint Propagation 5 5 6 Count the number of non-attacked squares in every row and column Place a queen in a row or column with minimum number Remove the attacked squares from future consideration 4 3 4 4 4 3 3 3 4 5 Constraint Propagation 3 3 5 Repeat 5 4 3 3 3 3 4 3 Constraint Propagation 2 3 4 6
Background image of page 1

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

View Full Document Right Arrow Icon
2 4 2 3 3 3 1 Constraint Propagation 2 1 3 7 2 2 2 2 1 Constraint Propagation 1 8 Constraint Propagation 2 1 2 1 9 Constraint Propagation 1 1 10 Constraint Propagation 11 What do we need? More than just a successor function and a goal test We also need: A means to propagate the constraints imposed by one queen’s position on the positions of the other queens An early failure test Æ Explicit representation of constraints Æ Constraint propagation algorithms 12
Background image of page 2
3 Constraint Satisfaction Problem (CSP) Set of variables {X 1 , X 2 , …, X n } Each variable X i has a domain D i of possible values. Usually, D i is finite Set of constraints {C 1 C 2 C p } , C , …, C Each constraint relates a subset of variables by specifying the valid combinations of their values Goal: Assign a value to every variable such that all constraints are satisfied 13 Map Coloring SA Q NSW V WA NT 7 variables {WA,NT,SA,Q,NSW,V,T} Each variable has the same domain: {red, green, blue} No two adjacent variables have the same value: WA NT, WA SA, NT SA, NT Q, SA Q, SA NSW, SA V, Q NSW, NSW V T 14 8-Queen Problem 8 variables X i , i = 1 to 8 The domain of each variable is: {1,2,…,8} Constraints are of the forms: X i = k Î X j k for all j = 1 to 8, j i Similar constraints for diagonals All constraints are binary 15 Street Puzzle 1 2 3 4 5 N i = {English, Spaniard, Japanese, Italian, Norwegian} C i = {Red, Green, White, Yellow, Blue} D i = {Tea, Coffee, Milk, Fruit-juice, Water} J i = {Painter, Sculptor, Diplomat, Violinist, Doctor} A i = {Dog, Snails, Fox, Horse, Zebra} The Englishman lives in the Red house Who owns the Zebra? The Spaniard has a Dog The Japanese is a Painter The Italian drinks Tea The Norwegian lives in the first house on the left The owner of the Green house drinks Coffee The Green house is on the right of the White house The Sculptor breeds Snails The Diplomat lives in the Yellow house The owner of the middle house drinks Milk The Norwegian lives next door to the Blue house The Violinist drinks Fruit juice The Fox is in the house next to the Doctor’s
Background image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}