Title: CP nets and Soft Constraints
1CP nets and Soft Constraints
2Formalisms for Preferences
- CP-nets
- ve conditional, qualitative
- -ve comparing outcomes
- Soft Constraints
- ve comparing outcomes, hard constraints
- -ve quantitative
3CP-nets vs SCSPs in terms of complexity
- CP-nets (qualitative, conditional)
- Find an optimal hard (easy if acyclic)
- Testing if an assignment is optimal hard (easy
if acyclic) - Is O1gtO2 (dominance testing) hard
- Soft Constraints (quantitative, hard constraints)
- Find an optimal hard (easy if a tree)
- Testing if an assignment is optimal hard (easy
if a tree) - Is O1gtO2(dominance testing) easy
4CP-nets vs SCSPs in terms of induced orders
- In terms of the orders on the solutions, the two
formalisms are incomparable - CP-nets
- induce preorders over the set of solutions
- reflexive
- transitive
- but there are partial orders which a CP-net
cannot induce - Soft constraints
- induce partial orders over the set of solutions
- reflexive
- transitive
- antisymmetric (no cycles)
- any partial order can be induced by a SCSP
5CP-nets vs SCSPs in terms of induced orders
SCSP
CP-net
c-semiring Sfuzzyx Sfuzzy
a,a
b,b
A
A
B
ab ? (0.8,1) ab? (1,1) ab ? (1,0.8) ab ?(0.8,0.8)
B
Induced order
Induced order
ab
ab
ab
ab
ab
Cannot be obtained by a CP-net
Cannot be obtained by a SCSP
6CP-nets vs SCSPs in terms of optimal solutions
- In terms of optimal solutions, CP-nets are less
expressive than hard constraint problems (and,
thus, of soft constraint problems) - From a CP-nets N to a CSP P such that
Optimals(N)Solutions(P)
CP-net optimality constraints
Ceteris paribus statement a b gt c
hard constraint a ? b
7From CP-net to a CSP
CP-net
Main course
fishgtmeat
Wine
Fruit
peaches gt strawberries
CSP corresponding to CP-net
(fish, white) (meat, red)
Fruit
peaches
Main Course
Wine
fish
8 CP-nets to CSPS
corresponding CSP
CP-net
A
A
B
B
Induced order
ab
No solutions!
ab
ab
ab
This order cannot be obtained by a SCSP
9Hard constraint are more general in terms of
optimals
- Consider a binary hard constraint defined on A
with domain a1,a2 and B with domain b1,b2
such that only a1b1 and a1b2 are feasible - There is no CP-net which can model this set of
optimals since a1b1 and a1b2 are one flip away
and a flip is either improving or worsening
10Constrained CP-nets
- Conditional preferences
- Hard Constraints
- Soft constraints
- Interesting questions
- Dominance testing S1gtS2?
- Find an optimal solution
11Constrained CP-net Example
CP-net
Main course
fishgtmeat
3
2
Wine
3
Fruit
2
peaches gt strawberries
Constraints
Fruit
peaches?3 strawberries ?2
Wine
red
12If we are interested in dominance testing
13Handling conditional, soft constraints and hard
constraints
- From CP-nets to Soft Constraints
- Gain
- Linear testing of dominance queries
- Uniform framework
- But
- approximates preference ordering
14Mapping CP-nets to Soft Constraint nets
w2
w1
VA
VB
Independent feature g variable
Unconditional statement gsoft unary constraint
VA,B
Conditional statement g variable for parents
ghard constraints
gvariable for child
w3
gsoft constraint
Vc
Weights on all the soft contraints
w4
VD
15Running example CP-net ?SCSP
CP-net
fish ? p1 meat ?p2
w1
Main course
Main course
(fish,white)?p1 (fish,red)?p2 (meat,red)?p1 (meat,
red)?p2
w2
Wine
Wine
Fruit
fishgtmeat fish whitegtred meat red
gtwhite peachesgtstrawberries
Fruit
peaches ? p1 berries ?p2
16Weighted CSPs
2
4
w1
w2
1
1
2
4
VA
VB
Minimize total penalty
Penalties Maximum penalty assigned is D-1, If
D2 then p21 and p10
VA,B
Weights To respect the ceteris paribus
condition Violation at higher level must be
worse than violation at lower level. For each
new level update all the weights e any edge
to a child
1
2
w3
Vc
w4
1
VD
17Weighted CSPs
w1
4
Sweightedlt0,8,min,,8,0gt
w2
4
VA
VB
Minimize total penalty
Penalties Maximum penalty assigned is D-1, If
D2 then p21 and p10
VA,B
Weights To respect the ceteris paribus
condition Violation at higher level must be
worse than violation at lower level. For each
new level update all the weights e any edge
to a child
w3
2
Vc
w4
1
VD
18Running example CP-net ?weigheted SCSP
Sweightedlt0,8,min,,8,0gt
fish ? 0 meat ?1
2
Minimize total penalty
Main course
Penalties Maximum penalty assigned is D-1, If
D2 then p21 and p10
(fish,white)?0 (fish,red)?1 (meat,red)?0 (meat,red
)?1
1
Weights To respect the ceteris paribus
condition Violation at higher level must be
worse than violation at lower level. For each
new level update all the weights e any edge
to a child
Wine
Fruit
peaches ? 0 berries ?1
19SLO CSPs
1
w1
w2
1
VA
VB
A set of sequences of n integers
lt
VA,B
w3
1
maxD1
max213
Vc
nnumber of soft constraints,
n4
w4
1
Weights all equal to 1
VD
20Dominance testing is linear
- Two solutions S1, S2 S1gtS2?
- In general
- pref(Si) w1 x f1(Sicon1) x ... x wk x
fk(Siconk) - S1gtS2 iff pref(S1) pref(S2)pref(S1)
- Weighted
- cost(Si) w1x f1(Sicon1) ... wk x
fk(Siconk) - S1gtS2 iff min(cost(S1), cost(S2))cost(S1)
- SLO
- pref(Si) mins( f1(Sicon1), ... ,wk x
fk(Siconk)) - S1gtS2 iff maxs(pref(S1), pref(S2))pref(S1)
21Constrained CP-net
fish ? 0 meat ?1
2
Main course
CP-net
Main course
fishgtmeat
(fish,white)?0 (fish,red)?1 (meat,red)?0 (meat,red
)?1
1
Wine
red?0 white?8
Wine
Fruit
peaches gt strawberries
Fruit
peaches ? 0 berries ?1
peaches?3 strawberries ?2
Constraints
(fish,red,peaches)gt(meat,red, berries)? 4lt5 Yes!
Wine
red
Fruit
peaches?3 strawberries ?2
22Approximating Acyclic CP-nets
CP-net
Minimize total penalty Weighted ltR, min,,
8,0gt
Maximize minimum preference Fuzzy lt0,1, max,
min ,0,1gt
23Comparing the approximations
Fuzzy is the roughest approximation
24If we are interested in finding an optimal
solution
25Constrained CP-net optimality notions
- Feasible Pareto semantics (Boutilier et al.
2004) - O1, O2 complete assignments to X1,, Xn then
- O1 O2 iff there is a chain of worsening flips
from - O1 to O2 and O1 and O2 are feasible/optimal
- Feasible Pareto Optimals (FPOs)
- optimals according to this semantics
- Approximated semantics
- O1, O2 complete assignments to X1,, Xn then
- O1 O2 iff there is a chain of worsening flips
from - O1 to O2 and each outcome in the chain is
feasible/optimal - Chain Feasible Pareto Optimals (CFPOs)
- optimals according to this semantics
Approx
Feasible Pareto
26Finding feasible Pareto Optimals
- Given CP net N and set of constraints C
- If C unsatisfiable then STOP else ...
27Finding Feasible Pareto Optimals (1)
- CP-net N ? CSP Opt(N) optimals(N)sol(Opt(N))
CP-net optimality constraints
Ceteris paribus statement a b gt c
hard constraint a ? b
28Our algorithm
- Ssol(C u opt(N)) sol(C)nsol(Opt(N))
- if Ssol(C) or Ssol(Opt(N))
- then return S
opt(N) FPO
opt(N)
sol(C) FPO
sol(C)
29Our algorithm
- else return sol(C u opt(N))
- plus those solutions in sol(C) which are
undominated
FPO
opt(N)
sol(C)
FPO
opt(N)
sol(C)
30Example
CP-net
Main course
fishgtmeat
Wine
Fruit
peaches gt strawberries
Constraints
CSP corresponding to CP-net
Wine
red
(fish, white) (meat, red)
peaches
Fruit
Main Course
Wine
fish
31Running example
- sol(C u opt(N))Ø
- FPO(fish,red, peaches)
opt(N)
FPO
sol(C)
32CP net gt constraints
- agt-a, ab cgt-c, -a v -b -cgtc
- a, (ab) implies c, (-a v -b) implies -c
- optimals of CP net satisfying assignments of
these constraints - but Pareto optimals may not be optimals of CP net!
33This may be expensive!
- Even finding one solution may require dominance
testing! - ? compute approximation Chain Feasible Pareto
optimals - Algorithm
- Input CP-net N, Hard Constraints C
- CP-net ? CSP Opt(N)
- Solve Opt(N) ?Opt(N)
- there is no solution iff C has no solution
34 Computing Opt(N)
- cp statement f x1gt x2 gtx3
- Optimality constraints
- f and cut best(Cx) (f and CX and Xx1
)?var(Cx)-X ?Xx1 - f and cut best(Cx) (f and CX and
Xx2)?var(Cx)-X ?Xx1 or Xx2 - Example
- cp statement a bgtb
- Fuzzy Constraint C b?0.6 , b?1
- Optimality Constraints
- a and cut1 (a and C and b)) ?A ? b
35Summarizing
- Finding a Feasible Pareto Optimal
- Write and solve the CP-net optimality
constraints. - Intersect such a set with the set of feasibles.
- If empty perform dominance tests among feasibles
- Pros w.r.t. state of the art
- Handles cyclic CP-nets
- Can find two or more optimals with no dominance
testing - Finding Approximated Optimals
- Write and solve the constrained CP-net optimality
constraints - Pros handles cyclic CP-nets and requires no
dominance testing - Cons superset of Feasible Pareto Optimals
36Weighted CSP approach
- C ? opt(N) ? opt(N)
- Weights(C) gt Weights(opt(N)) gt Weights(opt(N))
- If solution of weight 0, then Pareto optimal
- sol(C) n sol(opt(N)) ?
- If weight lt Weights(C) then feasible satisfy as
many of (approximate) optimality constraints as
possible - ...
37Softly Constrained CP-net example
CP-net
Main course
0.2
fishgtmeat
1
0.2
Wine
1
Fruit
peaches gt strawberries
1
0.2
1
Soft Constraint
0.2
38Publications on CP-nets and Constraints
- F. Rossi, K.B. Venable and T. Walsh, CP-networks
semantics, complexity, approximations and
extensions, in Proc. CP02 Workshop on Soft
Constraints (SOFT'02), Ithaca (NY), 2002. - C. Domshlak, F. Rossi, K.B. Venable and T. Walsh,
Reasoning about soft constraints and conditional
preferences complexity results and approximation
techniques in Proc. IJCAI 03 (International Joint
Conference on Artificial Intelligence), Morgan
Kaufmann, 2003, pag. 215-220. - Â
- S. Prestwich, F. Rossi, K. B. Venable, T. Walsh.
Constrained CP-nets. - Sixth International Workshop on Soft
Constraints and Preferences (Soft04) - colocated with 10th International
Conference on Principles and Practice of - Constraint Programming (CP-04), Toronto,
Canada, September 2004. - S. Prestwich, F. Rossi, K. B. Venable and T.
Walsh. Constrained CP-nets. - Proceedings of the Joint Annual Workshop
of ERCIM/CoLogNet on Constraint Solving and
Constraint Logic Programming (CSCLP04) Lausanne,
2004. - S. Prestwich, F. Rossi, K. B. Venable, T. Walsh.
Softly Constrained CP- - nets. Doctoral Paper in Proceedings of the
10th International Conference on - Principles and Practice of Constraint
Programming (CP 2004), LNCS 3258, - Springer, Toronto, Canada, September 2004.
- S. Prestwich, F. Rossi, K. B. Venable, T. Walsh.
Constrained-based Preferential Optimization. In
Proceedings of the Twentieth National Conference
on Artificial Intelligence (AAAI-05). Pittsburgh,
USA, 2005. -
39Multi-agent frameworks
Generic Preference Frameworks
Temporal Preferences with Uncertainty
Temporal Preferences
40Results
- Aggregating Preferences
- Definition of multiple CP-nets
- Extension of the CP-net semantics to deal with
indifference - Study of different aggregation criteria of
partially ordered preferences - Impossibility and possibility results on fairness
of aggregation criteria with partially ordered
preferences - Generalization of Arrows theorem to partial
orders - Generalizations of Sens Theorem to partial
orders
41Summary
- Preferences are everywhere
- Our approach to handle preferences
- Temporal Preferences
- Temporal Constraint Satisfaction Problems with
Preferences - Finding Optimal solutions
- Learning local temporal preferences
- Temporal Preferences and Uncertainty
- Temporal Constraint Satisfaction Problems with
Preferences and Uncertainty - Optimal Controllability
- Conditional Preferences
- Approximating CP nets with soft constraints
- Constrained CP nets
- Aggregating Preferences
- mCP nets
- Fairness of Preferences aggregation