Presentation is loading. Please wait.

Presentation is loading. Please wait.

CP nets and Soft Constraints. Formalisms for Preferences CP-nets ◦ +ve: conditional, qualitative ◦ -ve: comparing outcomes Soft Constraints ◦ +ve: comparing.

Similar presentations


Presentation on theme: "CP nets and Soft Constraints. Formalisms for Preferences CP-nets ◦ +ve: conditional, qualitative ◦ -ve: comparing outcomes Soft Constraints ◦ +ve: comparing."— Presentation transcript:

1 CP nets and Soft Constraints

2 Formalisms for Preferences CP-nets ◦ +ve: conditional, qualitative ◦ -ve: comparing outcomes Soft Constraints ◦ +ve: comparing outcomes, hard constraints ◦ -ve: quantitative

3 CP-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 O1>O2 (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 O1>O2(dominance testing): easy

4 CP-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

5 CP-nets vs SCSPs: in terms of induced orders A B a: b > b b: a > a ab AB {a,a}{b,b} ab  (0.8,1) ab  (1,1) ab  (1,0.8) ab  (0.8,0.8) ab c-semiring= S fuzzy x S fuzzy CP-net Induced order SCSP Cannot be obtained by a CP-net Cannot be obtained by a SCSP

6 CP-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) Ceteris paribus statement a: b > c hard constraint a → b CP-net optimality constraints

7 From CP-net to a CSP Main course Wine fish white > red meat red > white fish>meat peaches > strawberries Main course Fish, white, peaches Fish, red, peaches Fish, white, berries Fish, red, berries meat, red, peaches meat, red, berries meat, white, peaches meat, white, berries CP-net Fruit peaches CSP corresponding to CP-net Fruit Wine Main Course Wine fish (fish, white) (meat, red)

8 CP-nets to CSPS CP-nets to CSPS A B a: b > b b: a > a ab AB {a,a}{b,b} ab CP-ne t Induced order corresponding CSP This order cannot be obtained by a SCSP ab No solutions!

9 Hard 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

10 Constrained CP-nets Conditional preferences Hard Constraints Soft constraints Interesting questions: ◦ Dominance testing: S1>S2? ◦ Find an optimal solution

11 Constrained CP-net: Example Main course Wine fish white > red meat red > white fish>meat peaches > strawberries Main course Fish, white, peaches Fish, red, peaches Fish, white, berries Fish, red, berries meat, red, peaches meat, red, berries meat, white, peaches meat, white, berries CP-net Constraints Fruit Wine red Fruit peaches  3 strawberries  2 3 3 2 2

12 If we are interested in dominance testing Unconditional preferences Hard constraints Conditional Preferences CP statements CP engine dominance testing (difficult) Soft constraints Soft constraints engine Dominance testing (polynomial)

13 Handling conditional, soft constraints and hard constraints From CP-nets to Soft Constraints Gain: ◦ Linear testing of dominance queries ◦ Uniform framework But: ◦ approximates preference ordering

14 Mapping CP-nets to Soft Constraint nets AB C D Independent feature  variable VAVA VBVB V A,B VcVc Unconditional statement  soft unary constraint Conditional statement  variable for parents  hard constraints  variable for child  soft constraint VDVD Weights on all the soft contraints w1 w2 w3 w4

15 Running example: CP-net  SCSP fish>meat fish: white>red meat: red >white peaches>strawberries Main course CP-net Fruit Wine Main course fish  p1 meat  p2 Fruit Wine peaches  p1 berries  p2 Unconditional statement  soft unary constraint Independent feature  variable Conditional statement  variable for parents  hard constraints  variable for child  soft constraint Weights on all the soft contraints (fish,white)  p1 (fish,red)  p2 (meat,red)  p1 (meat,red)  p2 w2 w1

16 Weighted CSPs Minimize total penalty Penalties: Maximum penalty assigned is |D|-1, If |D|=2 then p2=1 and p1=0 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 VAVA VBVB V A,B VcVc VDVD w1 w2 w3 w4 1 1 1 2 2 1 2 4 4

17 Weighted CSPs Minimize total penalty Penalties: Maximum penalty assigned is |D|-1, If |D|=2 then p2=1 and p1=0 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 VAVA VBVB V A,B VcVc VDVD w1 w2 w3 w41 2 4 4 S weighted =

18 Running example: CP-net  weigheted SCSP Minimize total penalty Penalties: Maximum penalty assigned is |D|-1, If |D|=2 then p2=1 and p1=0 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 S weighted = Main course fish  0 meat  1 Fruit Wine peaches  0 berries  1 (fish,white)  0 (fish,red)  1 (meat,red)  0 (meat,red)  1 1 2

19 SLO CSPs A set of sequences of n integers ==< max=|D|+1 max=2+1=3 n=number of soft constraints, n=4 Weights: all equal to 1 VAVA VBVB V A,B VcVc VDVD w1 w2 w3 w4 1 1 1 1

20 Dominance testing is linear Two solutions S1, S2: S1>S2? In general ◦ pref(Si) = w1 x f1(Si| con1 ) x... x wk x fk(Si| conk ) ◦ S1>S2 iff pref(S1) + pref(S2)=pref(S1) Weighted ◦ cost(Si) = w1x f1(Si| con1 ) +... + wk x fk(Si| conk ) ◦ S1>S2 iff min(cost(S1), cost(S2))=cost(S1) SLO ◦ pref(Si) = min s ( f1(Si| con1 ),...,wk x fk(Si| conk )) ◦ S1>S2 iff max s (pref(S1), pref(S2))=pref(S1)

21 Constrained CP-net Main course Wine fish white > red meat red > white fish>meat peaches > strawberries Main course CP-net Fruit peaches  3 strawberries  2 Constraints Fruit Wine red Main course fish  0 meat  1 Fruit Wine peaches  0 berries  1 (fish,white)  0 (fish,red)  1 (meat,red)  0 (meat,red)  1 1 2 red  0 white  + ∞ peaches  3 strawberries  2 (fish,red,peaches)>(meat,red, berries)? 4<5 Yes !

22 Approximating Acyclic CP-nets A C D B CP-net VAVA V A,B VBVB VCVC VDVD a  p1 _ a  p2 abc  p1 _ abc  p2… cd  p1 __ cd  p2… SCSP Minimize total penalty : Weighted = Maximize minimum preference: Fuzzy =

23 Comparing the approximations CP-nets < > ~ (incomparable) Weighted < >,= Fuzzy SLO < > < >, ~ Fuzzy is the roughest approximation

24 If we are interested in finding an optimal solution Unconditional preferences Hard constraints Conditional Preferences CP statements CP engine optimal outcome (linear if acyclic, otherwise exponential) Soft constraints Soft constraints engine Optimal outcome (exponential)

25 Constrained CP-net: optimality notions Feasible Pareto semantics: (Boutilier et al. 2004) O 1, O 2 complete assignments to X 1,…, X n then O 1 ≥ O 2 iff there is a chain of worsening flips from O 1 to O 2 and O 1 and O 2 are feasible/optimal Feasible Pareto Optimals (FPOs): optimals according to this semantics Approximated semantics: O 1, O 2 complete assignments to X 1,…, X n then O 1 ≥ O 2 iff there is a chain of worsening flips from O 1 to O 2 and each outcome in the chain is feasible/optimal Chain Feasible Pareto Optimals (CFPOs): optimals according to this semantics Approx Feasible Pareto

26 Finding feasible Pareto Optimals Given CP net N and set of constraints C If C unsatisfiable then STOP else...

27 Finding Feasible Pareto Optimals (1) CP-net N  CSP Opt(N) : optimals(N)=sol(Opt(N)) Ceteris paribus statement a: b > c hard constraint a → b CP-net optimality constraints

28 Our algorithm S=sol(C u opt(N)) = sol(C) ∩sol(Opt(N)) if S=sol(C) or S=sol(Opt(N)) ◦ then return S opt(N)sol(C)= FPO sol(C) opt(N)= FPO

29 Our algorithm else return sol(C u opt(N)) plus those solutions in sol(C) which are undominated sol(C) opt(N) sol(C) FPO opt(N)

30 Example Main course Wine fish white > red meat red > white fish>meat peaches > strawberries Main course Fish, white, peaches Fish, red, peaches Fish, white, berries Fish, red, berries meat, red, peaches meat, red, berries meat, white, peaches meat, white, berries CP-net Constraints Fruit Wine red Fruit peaches CSP corresponding to CP-net Main Course Wine fish (fish, white) (meat, red )

31 Running example sol(C u opt(N))= ∅ FPO=(fish,red, peaches) sol(C) FPO opt(N) Fish, white, peaches Fish, red, peaches Fish, white, berries Fish, red, berries meat, red, peaches meat, red, berries meat, white, peaches meat, white, berries

32 CP net => constraints a>-a, a&b: c>-c, -a v -b: -c>c a, (a&b) 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!

33 This 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) Computing Opt*(N) cp statement φ : x 1 > x 2 >x 3 Optimality constraints φ and cut best(Cx) [( φ and C X and X=x 1 ) ↓ var(Cx)-{X} ] → X=x 1 φ and cut best(Cx) [( φ and C X and X=x 2 ) ↓ var(Cx)-{X} ] → X=x 1 or X=x 2 Example: cp statement a: b>b Fuzzy Constraint C: b → 0.6, b → 1 Optimality Constraints: a and cut 1 (a and C and b)) ↓ A → b

35 Summarizing Finding a Feasible Pareto Optimal: 1) Write and solve the CP-net optimality constraints. 2) Intersect such a set with the set of feasibles. 3) 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: 1) 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

36 Weighted CSP approach C ∪ opt(N) ∪ opt*(N) Weights(C) > Weights(opt*(N)) > Weights(opt(N)) If solution of weight 0, then Pareto optimal ◦ sol(C) ∩ sol(opt(N)) ≠ {} If weight < Weights(C) then feasible & satisfy as many of (approximate) optimality constraints as possible...

37 Softly Constrained CP-net : example Main course Wine fish white > red meat red > white fish>meat peaches > strawberries Main course Fish, white, peaches Fish, red, peaches Fish, white, berries Fish, red, berries meat, red, peaches meat, red, berries meat, white, peaches meat, white, berries CP-net Wine white  0.2 red  1 Soft Constraint 0.2 1 1 1 Fruit Wine 0.2 1 Fish, red, peaches Fish, red, berries meat, red, peaches meat, red, berries Optimal

38 Publications 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 (Soft’04) 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 (CSCLP’04) 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.

39 Multi-agent frameworks Generic Preference Frameworks Temporal Preferences with Uncertainty Temporal Preferences

40 Results  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 Arrow’s theorem to partial orders  Generalizations of Sen’s Theorem to partial orders

41 Summary 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


Download ppt "CP nets and Soft Constraints. Formalisms for Preferences CP-nets ◦ +ve: conditional, qualitative ◦ -ve: comparing outcomes Soft Constraints ◦ +ve: comparing."

Similar presentations


Ads by Google