1 / 17

expert systems

expert systems. facts & rules inference engines certainty user interfaces systems structure. facts & rules. facts... (gives daisy milk) (lives-in daisy pasture) (has daisy hair) (eats daisy grass) rules... (Rule 1 (has ?x hair) => (is ?x mammal))

gaurav
Download Presentation

expert systems

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. expert systems • facts & rules • inference engines • certainty • user interfaces • systems structure

  2. facts & rules facts... (gives daisy milk) (lives-in daisy pasture) (has daisy hair) (eats daisy grass) rules... (Rule 1 (has ?x hair) => (is ?x mammal)) (Rule 2 (is ?x mammal) (has ?x hoofs) => (is ?x ungulate)) (Rule 3 (is ?x ungulate) (chews ?x cud) (goes ?x moo) => (is ?x cow))

  3. forward chaining exhaustive application of rules over facts... forward chain UNTIL no change occurs DO FOR each rule in the ruleset DO IF all antecedents are facts AND not all consequents are facts THEN add consequents to facts (avoid duplicates) & note that a change has occurred

  4. forward chaining example (defvar facts1 '((big elephant) (small mouse) (small sparrow) (big whale) (ontop elephant mouse) )) (defvar rules1 '((Rule 1 (heavy ?x) (small ?y) (ontop ?x ?y) => (squashed ?y) (sad ?x)) (Rule 2 (big ?x) => (heavy ?x)) (Rule 3 (light ?x) => (portable ?x)) (Rule 4 (small ?x) => (light ?x)) )) > (fwd-chain rules1 facts1)) ((portable sparrow) (portable mouse) (squashed mouse) (sad elephant) (heavy whale) (heavy elephant) (light sparrow) (light mouse) (big elephant) (small mouse) (small sparrow) (big whale) (ontop elephant mouse))

  5. backward chaining goal directed... bwd-chain( goal, rules ) IF goal is in facts THEN report success FOR each rule in ruleset DO IF goal is one of rule's consequents THEN call bwd-chain on each antecedent & check result IF all tests are proved THEN add consequents to facts & report success

  6. backward chaining example (setf *rules* '((Rule 1 (has ?x warm-blood) => (is ?x mammal)) (Rule 2 (is ?x mammal) (has ?x hoofs) => (is ?x ungulate)) (Rule 3 (is ?x ungulate) (chews ?x cud) (goes ?x moo) => (is ?x cow)) (Rule 4 (lives-in ?x pasture) (eats ?x grass) => (chews ?x cud) (is ?x herbivore)) (Rule 5 (has ?x hair) => (is ?x mammal)) (Rule 6 (gives ?x milk) => (is ?x mammal)) (Rule 7 (is ?x herbivore) (is ?x ungulate) (gives ?x milk) => (is ?x cow)))) (setf *facts* '((gives daisy milk) (lives-in daisy pasture) (has daisy hair) (eats daisy grass) (has daisy hoofs) ))

  7. backward chaining example ... see attached...

  8. approaching ExSys • rule structure • other Kn forms • certainty factors • user interfaces • mixing inference engines • systems structure

  9. rule structure • and, or, not • run program code

  10. other Kn forms • hierarchies, etc • frames ... watch this space ...

  11. certainty factors correct facts + absolute inference rules = guaranteed conclusions uncertain evidence + rough inference rules = expert advice

  12. certainty factors (CVs) • range -1 (absolute false) to +1 (absolute true) • facts have CVs • rules CVs - attenuation factors • rule antecedent CVs combined... and / or / not => min / max / negate • ... result multiplied by attenuation factor... • ...to give consequent CVs

  13. Combining CVs from multiple rules assume 2 rules giving cv1 & cv2... • cv1 & cv2 are both +ve cv1 + cv2 - (cv1 * cv2) • cv1 & cv2 are both –ve cv1 + cv2 + (cv1 * cv2) • one +ve & the other –ve (cv1 + cv2) / (1 - min( abs(cv1), abs(cv2) ))

  14. user interfaces usability engineering feedback • what? • why? • how?

  15. system structure

  16. conflict resolution • refraction do not re-use rule until conditions changed • recency prefer rules most recently found in WS • specificity prefer most specific • confidence prefer "better rules"

  17. other design issues • mixing inference engines • Kn acquisition • Kn engineering

More Related