1 / 33

CP nets and Soft Constraints

CP nets and Soft Constraints. Formalisms for Preferences. CP-nets +ve: conditional, qualitative -ve: comparing outcomes Soft Constraints +ve: comparing outcomes, hard constraints -ve: quantitative. CP-nets vs SCSPs: in terms of complexity. CP-nets (qualitative, conditional)

shadow
Télécharger la présentation

CP nets and Soft Constraints

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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(dominancetesting): 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 SCSP CP-net c-semiring= Sfuzzyx Sfuzzy {a,a} {b,b} A A B b: a > a b: a > a a: b > b a: b > 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 ab ab ab Cannot be obtained by a SCSP Cannot be obtained by a CP-net

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

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

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

  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. Fish, white, peaches Fish, red, peaches Fish, white, berries Fish, red, berries meat, red, peaches meat, red, berries meat, white, peaches meat, white, berries Constrained CP-net: Example CP-net Main course fish>meat 3 2 Wine 3 Fruit 2 peaches > strawberries Constraints Fruit peaches3 strawberries 2 red Wine

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

  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. A B C D Mapping CP-nets to Soft Constraint nets w2 w1 VA VB Independent feature g variable Unconditional statement gsoft unary constraint VA,B Conditional statementg variable for parents ghard constraints gvariable for child w3 gsoftconstraint Vc Weights on all the soft contraints w4 VD

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

  16. Weighted CSPs Sweighted=<[0,+∞],min,+,+∞,0> w1 4 w2 4 VA VB Minimize total penalty Penalties: Maximum penalty assigned is |D|-1, If |D|=2 then p2=1 and p1=0 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

  17. Running example: CP-net weigheted SCSP Sweighted=<[0,+∞],min,+,+∞,0> fish  0 meat 1 2 Minimize total penalty Main course Penalties: Maximum penalty assigned is |D|-1, If |D|=2 then p2=1 and p1=0 (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

  18. SLO CSPs 1 w1 w2 1 VA VB A set of sequences of n integers = = < VA,B w3 1 max=|D|+1 max=2+1=3 Vc n=number of soft constraints, n=4 w4 1 Weights: all equal to 1 VD

  19. 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 iffpref(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) = mins( f1(Si|con1), ... ,wk x fk(Si|conk)) • S1>S2 iffmaxs(pref(S1), pref(S2))=pref(S1)

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

  21. Comparing the approximations Fuzzy is the roughest approximation

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

  23. Constrained 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

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

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

  26. 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)= FPO opt(N) sol(C)= FPO sol(C)

  27. Our 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)

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

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

  30. 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

  31. Computing Opt*(N) cp statement φ : x1> x2 >x3 Optimality constraints φ and cut best(Cx) [(φ and CX and X=x1 )↓var(Cx)-{X} ]→X=x1 φ and cut best(Cx) [(φ and CX and X=x2)↓var(Cx)-{X} ]→X=x1 or X=x2 Example: cp statement a: b>b Fuzzy Constraint C: b→0.6 , b→1 Optimality Constraints: a and cut1 (a and Cand b)) ↓A → b

  32. Summarizing • 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

  33. 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 • ...

More Related