Presentation is loading. Please wait.

Presentation is loading. Please wait.

Expert systems facts & rules inference engines certainty user interfaces systems structure.

Similar presentations


Presentation on theme: "Expert systems facts & rules inference engines certainty user interfaces systems structure."— 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


Download ppt "Expert systems facts & rules inference engines certainty user interfaces systems structure."

Similar presentations


Ads by Google