Title: i may require adding new constraints, except for
1When A Little Reasoning Saves A Lot of Hard Work
Robert Woodward Berthe Y. Choueiry Constraint
Systems Laboratory Department of Computer
Science Engineering University of
Nebraska-Lincoln
2. Techniques Contributions
1. Context Focus
3. Illustration Minesweeper as a CSP
- Relevance
- Motivates research
- Facilitates teaching of complex concepts
mechanisms - Helps in outreach recruiting
- Demystifies human fascination with puzzles
- Algorithms for Constraint Propagation enforce
relational consistency properties R(i,m)C where - m is the number of constraints considered
- i is the number of variables considered
- A Constraint Satisfaction Problem (CSP) is
defined by
- A set of decisions to make (variables)
- A set of choices for each variable (values,
domain) - A set of constraints restricting the allowable
combinations of values (tuples) to variables
?
A
B
C
D
E
F
G
0,1
0,1
0,1
0,1
0,1
0,1
0,1
Modeling Minesweeper with Constraints
- i may require adding new constraints, except
for - i 1 ? domain filtering
- i ? ? constraint filtering
Exactly 2 mines
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
A B C D
0 0 0 1
1 0 1 1
0 1 1 0
1 1 1 0
B C E F
0 0 1 1
0 1 0 0
1 1 1 0
0 0 0 1
A D E F G
0 1 1 1 1
0 0 1 0 1
1 1 0 1 1
1 0 1 1 1
The task is find one solution (i.e., an
assignment of values to variables satisfying all
constraints) or all solutions
Exactly 3 mines
- Applications include scheduling resource
allocation, design product configuration,
software hardware verification, Puzzles, etc.
R(1,1)C
R(1,3)C
R(?,2)C
R(?,3)C
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
A
E
G
0,1
0,1
0,1
- CSPs are solved using
- 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). - Constraint Propagation it thinks about the
constraints to remove values (from variables)
tuples (from constraints) that cannot
participate in any solution.
A B C D
0 0 0 1
1 0 1 1
0 1 1 0
1 1 1 0
B C E F
0 0 1 1
0 1 0 0
1 1 1 0
0 0 0 1
A D E F G
0 1 1 1 1
0 0 1 0 1
1 1 0 1 1
1 0 1 1 1
A B C D
0 0 0 1
1 0 1 1
0 1 1 0
1 1 1 0
B C E F
0 0 1 1
0 1 0 0
1 1 1 0
0 0 0 1
A D E F G
0 1 1 1 1
0 0 1 0 1
1 1 0 1 1
1 0 1 1 1
Domain Filtering R(1,m)C Domain Filtering R(1,m)C
Polynomial space only for m2 Otherwise, exponential space
Two linear-space algorithms vvpSearch suitable for loose constraints AllSearch suitable for tight constraints
Constraint Filtering R(?,m)C Constraint Filtering R(?,m)C
Dual-AC3 only for m2 Otherwise, none existed
One exponential three linear-space algorithms Join-R(, m)C exponential space, conceptual Dual-AC2009 only for m2 Search-R(?,m)C suitable for loose constraints AllSearch-R(?,m)C suitable for tight constraints
A C
R R
R G
G R
G G
- 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
work
- The focus of our research is the development of
new algorithms for constraint propagation
?
Acknowledgments
- Robert Woodward
- Was supported by UCARE during 20072008
20082009. - Is the recipient of a Barry M. Goldwater
Scholarship for 20082010. - 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.