Title: Assisting Domain Experts To Formulate
1Assisting Domain Experts To Formulate
SolveConstraint Satisfaction Problems
- Stuart Chalmers, Derek Sleeman
- Computing Science Dept, The University of
ABERDEEN, UK - email sleeman, schalmer_at_csd.abdn.ac.uk
2Outline
- Introduction to CSPs KA for CSPs
- Knowledge Acquisition MORE, MOLE SALT
- CSP formulation solving
- Capture / Acquire
- Transform
- Solve
- Conclusions/Future Work
- Using the semantic web to enhance CSP modelling
3Introduction CSPs are GOOD
- CSPs (Constraint Satisfaction Problems) -
powerful technique for problem solving, e.g.,
able to solve large, combinatorial tasks - User has to identify variables, ranges
associated with variables, relevant relationships
/ constraints pertinent to task - CSP solver seeks to find assignments to all
variables such that each constraint is satisfied - Constraint Programming represents one of the
closest approaches computer science has yet made
to the Holy Grail of programming the user states
the problem, the computer solves it. - E. Freuder
4But
- Expertise / background knowledge needed to create
CSPs the so called Modelling task. The analyst
needs to - Identify key variables, features and their
domains - Specify constraints over those entities
- Understand feedback from the CSP solver when
tasks are over- and under- specified
5How to get from thisto this?
- SEND
- MORE
- MONEY
- What numbers do the letters S,E,N,D,M,O,R,Y
- Represent?
- - use_module(library(clpfd)).
- mm(S,E,N,D,M,O,R,Y, Type) - domain(S,E,N,D,M,O
,R,Y, 0, 9), - S0, M0, all_different(S,E,N,D,M,O,R,Y),
sum(S,E,N,D,M,O,R,Y), - labeling(Type, S,E,N,D,M,O,R,Y).
- sum(S, E, N, D, M, O, R, Y) - 1000S 100E
10N D 1000M 100O 10R E 10000M
1000O 100N 10E Y. - Answer
- S 9, E 5, N 6, D 7,
- M 1, O 0, R 8, Y 2
6Typical Brain Teaser
- The Car Games is a simple problem that can be
describe as follow - Three persons took part in choosing a car in
Aberdeen at the weekend, each of them has a name
(Arthur, Brendan, Cormick), a height (tall,
medium, short) and the cars they chose have a
ranking with respect to their top speeds (1st,
2nd 3rd) - The other constraints are
- The medium persons car is ranked two places
higher than Arthurs. Arthurs car is blue, and
Cormicks car is not green - Arthur is the short person
- Cormick did not select the 1st ranking car
- Also, two persons cannot have the same name,
height or car-ranking
7Classical KA Systems
- MORE MOLE ask questions about the (diagnostic)
classes the observables - SALT (the Propose Revise PSM) asks for
- Updates to the current configuration
- Constraints to be imposed on the variables
- Fixes to be applied when a constraint is
violated - (Set of descriptors)
8Knowledge Acquisition for CSPs
- Frisch, Miguel et al. define 5 CSP problem
categories - Scheduling, Configuration, Assignment,
Construction, Positioning - We want to
- Find specific characteristics of these categories
create templates for each one - Assist user in choosing appropriate template for
their problem (OR use a series of linked
templates) - Help user to instantiate this/these templates
(knowledge elicitation) - Solve task as CSP (or make recommendations if no
solution found or problem under-specified)
93 Stages of CSP Solving
- Capture
- Elicit knowledge from the user using KA
interfaces - Fit to pre-defined template
- Transform
- Represent CSP using OWL
- Use Semantic Information to enhance CSP
- Solve
- Solve CSP using standard finite domain techniques
- Provide feedback to user on over/under
constrained problems
10KA Interface n
Capture
Task Specific Information
SWRL/OWL converter
SWRL/OWL Representation
Acquire Additional Semantic Information
WWW
Transformation
Enhanced SWRL/OWL Task Representation
SWRL/OWL to CSP mapping
Results or feedback (To be used in further task
specification)
Internal CSP Representation
Solving
CSP Solver
CSP solving engine
11Systematic approach to CSP task formulation
- Identify important objects / concepts
- Identify features associated with each object /
concept - Identify possible values of features
- Identify objects described in the task
- Identify other information / relationships
provided about the task
12Capturing User Information
- GUI Interface
- Split solving stages
- Add objects
- Add instances
- Add relationships between objects instances
(rules constraints)
13Transformation
- Constraints represented using CIF/SWRL
- Variables/Domains represented in OWL-lite
- CIF/SWRL
- Extends SWRL using CIF
- Allows fully quantified constraints to be
expressed naturally - Currently no W3C standard for expressing fully
quantified constraints on the Semantic Web - Allows us to use semantic web tools to aid in
problem modelling
14Transformation
-
-
-
-
- /
-
-
-
-
-
-
-
-
- rdfresource"http//www.w3.org/2003/11/swrlbgrea
terThan"/ - rdfresource"svar"/
- rdfdatatype"http//www.w3.org/2001/XMLSchemaint
"0 -
-
-
15Implementation
- AXIS Web Service GUI interfaces
- Various interfaces implemented
- Map colouring, cryptarithmetic problem, room
allocation problem - CIF/SWRL intermediary language
- Represent Constraints using CIF/SWRL
- Represent variables domains using OWL
- CHOCO finite domain CSP solver
- Currently only binary constraints
16Current Work
- Easy-of-use study (e.g., with KA UIs versus
pen-and-paper for Crypt Arithmetic, Graph
Colouring, Brain teasers) - CSP Feedback
- Provide feedback on problem
- Over-constrained no solution, highlight
constraints that are preventing solution being
found - Under-constrained too many solutions, show
unconstrained domains to prompt user to enter
more information
17Enhancing a task description using the Semantic
Web
- Recall that the domain expert extracts variable,
features etc from a task. Suppose he extracts Car
colour, manufacturer, price - The analyst uses a tool like ONTOSEARCH2
(www.ontosearch.org) to search for ontologies
which include concept car summaries their
features as Car colour, manufacturer,
price, speed,
18Questions
CIF/SWRL
http//www.aktors.org
http//www.csd.abdn.ac.uk/research/akt/cif/
www.ontosearch.org
19Adding semantic information
20Adding semantic information
21Adding semantic information
22Adding semantic information
- Augment problem specification with semantic data
- Can we aid the user in formulating their problem?
- Can we highlight features of the problem they
might not have recognised? - Take current problem description
- Run through ontosearch (www.ontosearch.org)
- Find additional problem descriptors
- Allow user to revise problem specification