i may require adding new constraints, except for… o i =1 domain filtering o i = constraint...

1
i may require adding new constraints, except for… o i =1 domain filtering o i = constraint filtering Robert Woodward & Berthe Y. Choueiry Robert Woodward & Berthe Y. Choueiry Constraint Systems Laboratory • Department of Computer Science & Engineering • University of Nebraska- Constraint Systems Laboratory • Department of Computer Science & Engineering • University of Nebraska- Lincoln Lincoln When A Little Reasoning Saves A Lot of Hard Work When A Little Reasoning Saves A Lot of Hard Work A Constraint Satisfaction Problem (CSP) is defined by Applications include scheduling & resource allocation, design & product configuration, software & hardware verification, Puzzles, etc. CSPs are solved using o Search: it laboriously enumerates combinations of assignments of values to variables. Search can be done in a ‘smart’ way, but is in general tedious (i.e., exponential cost). o Constraint Propagation Constraint Propagation: it ‘thinks’ about the constraints to remove ‘values’ (from variables) & ‘tuples’ (from constraints) that cannot participate in any solution. A C R R R G G R G G 5, 6, 7, 8 7, 8, 9, 10, 11, 12 5, 6, 7, 8 A B C B<C A<B 2<C-A<5 Constraint Propagation by Domain Filtering A B C D E J I 0 0 0 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0 J I H G F E D 0 0 0 0 1 1 1 0 0 0 1 1 0 1 1 1 1 0 0 0 0 Exactly 2 mines Exactly 3 mines Algorithms for Constraint Propagation enforce relational consistency properties R(i,m)C where o m is the number of constraints considered o i is the number of variables considered The task is find one solution (i.e., an assignment of values to variables satisfying all constraints) or all solutions o A set of decisions to make (variables) o A set of choices for each variable (values, domain) o A set of constraints restricting the allowable combinations of values (tuples) to variables Domain Filtering: R(1,m)C Polynomial space only for m=2 Otherwise, exponential space Two linear-space algorithms o VVPSEARCH: suitable for loose constraints o ALLSEARCH: suitable for tight constraints Constraint Filtering: R(,m)C DUAL-AC3 only for m=2 Otherwise, none existed One exponential & three linear-space algorithms o JOIN-R(*, m)C: exponential space, conceptual o DUAL-AC2009 only for m=2 o SEARCH-R(,m)C: suitable for loose constraints R, G R, G R, G A B C Constraint Propagation by Constraint Filtering Acknowledgments 1. Context & Focus 2. Techniques & Contributions 3. Illustration: Minesweeper as a CSP Constraint propagation operates locally. It is ‘cheap’ (i.e., polynomial time) & can considerably reduce search effort. Thus, a little thinking can save a lot of Thus, a little thinking can save a lot of hard work hard work Search (ground truth) Constraint Filtering (+DF) Domain Filtering m=2 m=1 Exponentia l Efficient, use for tight constraints loose constraints Setting m Relevance o Motivates research o Facilitates teaching of complex concepts & mechanisms o Helps in outreach & recruiting o Demystifies human fascination with puzzles Modeling Minesweeper with Constraints R(,2)C vs. R(1,3)C o Both solve the puzzle o R(,2)C cheaper R(,m)C is Stronger Than R(1,m)C The focus of our research is the development of new algorithms for constraint propagation m = The Larger m, the Stronger the Propagation m is the number of constraints examined The larger m o The more cells uncovered o … the larger the cost A B C D 0001 1011 0110 1110 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 A B C D E F G B C E F 0011 0100 1110 0001 A D E F G 01111 00101 11011 10111 R(1,1)C R(1,3)C R(,2)C R(,3)C 0, 1 G 0, 1 A 0, 1 E 0, 1 G A B C D 0001 1011 0110 1110 B C E F 0011 0100 1110 0001 A D E F G 01111 00101 11011 10111 A B C D 0001 1011 0110 1110 B C E F 0011 0100 1110 0001 A D E F G 01111 00101 11011 10111 Robert Woodward o Was supported by UCARE during 2007—2008 & 2008— 2009. o Is the recipient of a Barry M. Goldwater Barry M. Goldwater Scholarship Scholarship for 2008—2010. Work on Minesweeper as a CSP was started by Josh Snyder & continued by Ken Bayer under CAREER Award #0133568 from the National Science Foundation. Ongoing evaluations are in collaboration with Shant Karakashian.

Post on 20-Dec-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: i may require adding new constraints, except for… o i =1  domain filtering o i =   constraint filtering Robert Woodward & Berthe Y. Choueiry Constraint

i may require adding new constraints, except for…o i =1 domain filteringo i = constraint filtering

Robert Woodward & Berthe Y. ChoueiryRobert Woodward & Berthe Y. ChoueiryConstraint Systems Laboratory • Department of Computer Science & Engineering • University of Nebraska-LincolnConstraint Systems Laboratory • Department of Computer Science & Engineering • University of Nebraska-Lincoln

When A Little Reasoning Saves A Lot of Hard WorkWhen A Little Reasoning Saves A Lot of Hard Work

A Constraint Satisfaction Problem (CSP) is defined by

Applications include scheduling & resource allocation, design & product configuration, software & hardware verification, Puzzles, etc.

CSPs are solved usingo Search: it laboriously enumerates combinations of

assignments of values to variables. Search can be done in a ‘smart’ way, but is in general tedious (i.e., exponential cost).

o Constraint PropagationConstraint Propagation: it ‘thinks’ about the constraints to remove ‘values’ (from variables) & ‘tuples’ (from constraints) that cannot participate in any solution.

A C

R R

R G

G R

G G

5, 6, 7, 8

7, 8, 9, 10, 11, 12

5, 6, 7, 8A B

CB<C

A<B

2<C-A<5

Constraint Propagationby Domain Filtering

A B C D E J I0 0 0 0 0 1 1

0 0 0 0 1 0 1

… … … … … … …

1 1 0 0 0 0 0

J I H G F E D0 0 0 0 1 1 1

0 0 0 1 1 0 1

… … … … … … …

1 1 1 0 0 0 0

Exactly 2 mines

Exactly 3 mines

Algorithms for Constraint Propagation enforce relational consistency properties R(i,m)C whereo m is the number of constraints consideredo i is the number of variables considered

The task is find one solution (i.e., an assignment of values to variables satisfying all constraints) or all solutions

o A set of decisions to make (variables)o A set of choices for each variable

(values, domain)o A set of constraints restricting the

allowable combinations of values (tuples) to variables

Domain Filtering: R(1,m)C

Polynomial space only for m=2 Otherwise, exponential space

Two linear-space algorithmso VVPSEARCH: suitable for loose constraintso ALLSEARCH: suitable for tight constraints

Constraint Filtering: R(,m)C

DUAL-AC3 only for m=2 Otherwise, none existed

One exponential & three linear-space algorithmso JOIN-R(*, m)C: exponential space, conceptualo DUAL-AC2009 only for m=2o SEARCH-R(,m)C: suitable for loose constraintso ALLSEARCH-R(,m)C: suitable for tight constraints

R, G

R, G

R, GA

B

C

Constraint Propagationby Constraint Filtering

Acknowledgments

1. Context & Focus 2. Techniques & Contributions 3. Illustration: Minesweeper as a CSP

Constraint propagation operates locally. It is ‘cheap’ (i.e., polynomial time) & can considerably reduce search effort.

Thus, a little thinking can save a lot of hard workThus, a little thinking can save a lot of hard work

Search (ground truth)Constraint Filtering (+DF)

Domain Filteringm=2m=1

Exponential

Efficient, use for tight constraints loose constraints

Setting m

Relevanceo Motivates research o Facilitates teaching of complex concepts & mechanismso Helps in outreach & recruitingo Demystifies human fascination with puzzles

Modeling Minesweeper with Constraints

R(,2)C vs. R(1,3)Co Both solve the puzzleo R(,2)C cheaper

R(,m)C is Stronger Than R(1,m)C

The focus of our research is the development of new algorithms for constraint propagation

m =

The Larger m, the Stronger the Propagation

m is the number of constraints examined The larger m

o The more cells uncoveredo … the larger the cost

A B C D0 0 0 11 0 1 10 1 1 01 1 1 0

0,1 0,1 0,1 0,10,1 0,10,1A B C D E F G

B C E F0 0 1 10 1 0 01 1 1 00 0 0 1

A D E F G0 1 1 1 10 0 1 0 11 1 0 1 11 0 1 1 1

R(1,1)C

R(1,3)C

R(,2)C

R(,3)C

0,1G

0,1A 0,1E 0,1G

A B C D0 0 0 11 0 1 10 1 1 01 1 1 0

B C E F0 0 1 10 1 0 01 1 1 00 0 0 1

A D E F G0 1 1 1 10 0 1 0 11 1 0 1 11 0 1 1 1

A B C D0 0 0 11 0 1 10 1 1 01 1 1 0

B C E F0 0 1 10 1 0 01 1 1 00 0 0 1

A D E F G0 1 1 1 10 0 1 0 11 1 0 1 11 0 1 1 1

Robert Woodwardo Was supported by UCARE during 2007—2008 & 2008—2009.o Is the recipient of a Barry M. Goldwater ScholarshipBarry M. Goldwater Scholarship for 2008—

2010.

Work on Minesweeper as a CSP was started by Josh Snyder & continued by Ken Bayer under CAREER Award #0133568 from the National Science Foundation.

Ongoing evaluations are in collaboration with Shant Karakashian.