1 / 17

Resolving Rule Conflicts

Resolving Rule Conflicts. Assign explicit priorities to rules Specificity of a rule’s antecedents R1: IF car will not start THEN battery is dead R2: IF car will not start AND headlights will not work THEN battery is dead Order in which rule are entered in kbase

tasha
Télécharger la présentation

Resolving Rule Conflicts

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. Resolving Rule Conflicts • Assign explicit priorities to rules • Specificity of a rule’s antecedents R1: IF car will not start THEN battery is dead R2: IF car will not start AND headlights will not work THEN battery is dead • Order in which rule are entered in kbase • timestamp, rule entered first given priority • Order of rules in kbase • Recency of facts entered • real-time ES

  2. Certainty factors • higher CF rule fires first • rule that gives higher confidence to goal being pursued

  3. Certainty Theory • Representing uncertain evidence • Representing uncertain rules • Combining evidence from multiple sources eg. IF A and B THEN X cf 0.8 IF C THEN X cf 0.7 What is the certainty of X? • -1<= CF <= 1 • -100 <= CF <= 100 • Used in • rule conclusions, values of variables in premise, answers to user queries

  4. Certainty theory • Commutative property • if more than one rule gathers information, then the combined CF value can not be dependent upon the order of the processing of the rules • Asymptotic property • the certainty model should incrementally add belief to a hypothesis as new positive evidence is obtained; however, unless we encounter some evidence that absolutely confirms the hypothesis, we cannot be totally certain. • Thus, confirming evidence increases out belief, but unless absolute certainty is found, cf approaches 1, but never equals 1.

  5. Rule: IF E THEN H CF(Rule) CF(H,E) = CF(E) * CF(Rule) Example: IF econ-two-years = strong THEN likelihood-of-inflation = strong CF 40 Given econ-two-years = strong with cf=70 CF(likelihood-of-inflation = strong ) = (40 * 70)/100 = 28

  6. Conjunctive: IF E1 and E2 and … and En THEN H CF(Rule) CF(H, E1 and E2 and … and En) = min{CF(Ei)}* CF(Rule) • Disjunctive IF E1 or E2 or … or En THEN H CF(Rule) CF(H, E1 or E2 or … or En) = max{CF(Ei)}* CF(Rule)

  7. Certainty propagation in similarly concluded rules R1: IF E1 THEN H CF1 R2: IF E2 THEN H CF2 (supporting evidence increases our belief) CFcombine(CF1,CF2) = CF1 + CF2(1 - CF1), when both > 0 = (CF1+ CF2) / (1 - min(|CF1|, |CF2|), when one < 0 = CF1+ CF2(1+ CF1), when both < 0.

  8. Premise with AND (conjunctive) Example: IF economy-two-years = strong AND availability-of-investment-capital = low THEN likelihood-of-inflation = strong CF of condition = min(cf1, cf2) • Premise with AND (conjunctive) Example: IF economy-two-years = poor OR unemployment-outlook = poor THEN economic-outlook = poor CF of condition = max(cf1, cf2)

  9. Premise with both AND and OR Example: IF has-credit-card = yes (cf= 80) OR cash = ok (cf = 90) AND payments = ok (cf = 85) THEN approval = ok (has-credit-card = yes AND payments = ok) [min(80,85)] OR (cash = ok AND payments = ok) [min(90,85)] CF = 80 + 85 - (80*85)/100 = 97 (some systems use this) CF = max(80,85) = 85 (some systems use this)

  10. Example: R1: IF weatherman says it will rain THEN it will rain CF 0.8 R2: IF farmer says it will rain THEN it will rain CF 0.8 Case (a): Weatherman and farmer are certain in rain CF(E1) = CF(E2) = 1.0 CF(H, E1) = CF(E1) * CF(Rule1) = 1.0*0.8 = 0.8 CF(H, E2) = CF(E2) * CF(Rule2) = 1.0*0.8 = 0.8 CFcombine(CF1, CF2) = CF1+ CF2(1- CF1) = 0.8+0.8(1-0.8) = 0.96 CF of a hypothesis which is supported by more than one rule, can be incrementally increased by supporting evidence from both rules.

  11. Case (b):Weatherman certain in rain, farmer certain in no rain CF(E1) = 1.0, CF(E2) = -1.0 CF1 = 0.8, CF2 = -0.8 CFcombine(CF1, CF2) = (0.8 + (-0.8)) / (1 - min(0.8, 0.8)} = 0 (unknown) Case (b): CF(E1) = -0.8, CF(E2) = -0.6 CFcombine(CF1, CF2) = -0.64 - 0.48(1 - 0.64) = -0.81 Incremental decrease in certainty from more than one source of disconfirming evidence Case (c): CFcombine(CF1, CF2, CF3,….) = 0.999 = CFold Single piece of disconfirming evidence CFnew = -0.8 Cfcombine = (0.999 - 0.8) / (1 - 0.8) = 0.995 Single piece of disconfirming evidence does not have a major impact on many pieces of confirming evidence.

  12. Certainty Threshold • CF-condition < Threshold => rule fails to fire Rule condition fails if CF(premise) < Threshold But if rule fires, and after that CF(conclusion) < Threshold the conclusion will still be asserted.

  13. Interpreting CF values Definitely not -1.0 Almost certainly not -0.8 Maybe 0.4 Probably not -0.6 Probably 0.6 Maybe not -0.4 Almost certainly 0.8 Unknown -0.2 to 0.2 Definitely 1.0 • Acquiring CF from experts • Prompting users for CF values

  14. Example R1: IFthe weather looks lousy (E1) OR I am in a lousy mood (E2) THEN I shouldn’t go to the ball game CF 0.9 (H1) R2: IF I believe it is going to rain (E3) THEN the weather looks lousy CF 0.8 (E1) R3: IF I believe it is going to rain (E3) AND the weatherman says it is going to rain (E4) THEN I am in a lousy mood CF 0.9 (E2) R4: IF the weatherman says it is going to rain (E4) THEN the weather looks lousy CF 0.7 (E1) R5: IF the weather looks lousy (E1) THEN I am in a lousy mood CF 0.95 (E2)

  15. Assume user enters following facts: • I believe it is going to rain, CF(E3) = 0.95 • Weatherman says it is going to rain, CF(E4) = 0.8 • Goal: I shouldn’t go to the ball game (H1) • Step 1: Pursue R1: Pursue premise of R1 “weather looks lousy” (E1): R2 and R4 • Step 2: Pursue R2 CF(E1, E3) = CF(E3) * CF(Rule R2) = 0.8*0.95 = 0.76 • Step 3: Pursue R4 CF(E1, E4) = CF(E4)*CF(Rule R4) = 0.7*0.85=0.60 • Step 4: Combine evidence for E1 CF(E1) = CF(E1,E3) + CF(E1,E4)*(1 - CF(E1,E3)) = 0.76 + 0.60* (1.0 - 0.76) = 0.90

  16. Step 5: Pursue premise 2 of Rule 1 (E2) : R3 and R5 • Step 6: Pursue R5 CF(E2, E1) = CF(E1)* CF(Rule R5) = 0.95*0.9 = 0.86 • Step 7: Pursue R3 CF(E2, E3 and E4) = min{CF(E3), CF(E4)} * CF(Rule R3) = min{0.95,0.85}*0.9 = 0.77 • Step 8: Combine evidence for E2: “I am in a lousy mood” CF(E2) = CF(E2, E1) + CF(E2, E3 and E4) ( 1 - CF(E2, E1)) = 0.86 + 0.77 ( 1- 0.86) = 0.97 • Step 9: return to Rule R1 From steps 4 and 9 CF(H1, E1 or E2) = max{CF(E1), CF(E2)} * CF(Rule R1) = max{0.9,0.97}*0.9 = 0.87 = CF(I shouldn’t go to the ball game) Conclusion: I almost definitely shouldn’t go to the ball game.

  17. Controlling search with CF • Meta rules • Example: IF CF(Problem is in electrical system) < 0.5 THEN PURSUE problem is fuel system

More Related