Download presentation
Presentation is loading. Please wait.
1
The Physical Symbol Systems Hypothesis
Rule-Based Systems The Physical Symbol Systems Hypothesis What are Rule-Based Systems? Backward Chaining A Lisp Backward Chainer 4D2/362 RBS Backward Chaining
2
Physical Symbol System Hypothesis
A physical symbol system has the necessary and sufficient means for intelligent action a system, embodied physically, that is engaged in the manipulation of symbols an entity is potentially intelligent if and only if it instantiates a physical symbol system symbols must designate symbols must be atomic symbols may combine to form expressions Newell & Simon 1976 4D2/362 RBS Backward Chaining
3
4D2/362 RBS Backward Chaining
What does the PSSH mean? Intelligent action can be modelled by a system manipulating symbols. Nothing special about our wetware. Intelligence can be implemented on other platforms, e.g. silicon. 4D2/362 RBS Backward Chaining
4
Rule-Based Systems: Mycin
IF: (1) the stain of the organism is gram-positive, and (2) the morphology of the organism is coccus, and (3) the growth conformation of the organism is clumps. THEN there is suggestive evidence(0.7) that the identity of the organism is staphylococcus. PREMISE: ($AND (SAME CNTXT GRAM GRAMPOS) (SAME CNTXT MORPH COCCUS) (SAME CNTXT CONFORM CLUMPS) ACTION: (CONCLUDE CNTXT IDENT STAPHYLOCOCCUS TALLY .7) 4D2/362 RBS Backward Chaining
5
Rule-Based Systems: Dendral
IF there is a high peak at 71amu there is a high peak at 43amu there is a high peak at 86amu there is any peak at 58amu THEN there must be an N-PROPYL-KEYTONE3 substructure 4D2/362 RBS Backward Chaining
6
4D2/362 RBS Backward Chaining
Bronchiolitis 4D2/362 RBS Backward Chaining
7
4D2/362 RBS Backward Chaining
Bronchiolitis Kids presenting at an A&E with Bronchiolitis: Admit or Discharge? If Age in Months > 1.87 And SaO2 > 95.3 And Dehydration = None And HR <166 Then DISCHARGE IF Age in Months < 2 And HR > 160 Then ADMIT 4D2/362 RBS Backward Chaining
8
4D2/362 RBS Backward Chaining
Rule-Chaining If A and B then F If C and D and E then K If F and K then G If J and G then Goal We can Forward Chain from Premises to Goals or Backward Chain from Goals and try to prove them. 4D2/362 RBS Backward Chaining
9
Rule-Chaining as State Space Search
When to search forward or backward? Performance criteria: › Branching factor › # Premises v's # Goals Pragmatic Criteria › User interface › Data availability 4D2/362 RBS Backward Chaining
10
Production System Architecture
1 Rules Base: Table of rules representing the knowledge encoded in the system. 2. Data Base: Contains facts, details of the system's domain. 3. Inference Engine: Mechanism for deriving inferences from rules and data. 4D2/362 RBS Backward Chaining
11
4D2/362 RBS Backward Chaining
1. Select rules with conclusions matching the goal and create a search tree, each rule selected will become a node in the search tree and will have a goal stack associated with it. 2. Select one of these nodes as a sub-goal and repeat step 1. 3. If a goal is proved end by firing the correct string of rules. 4D2/362 RBS Backward Chaining
12
4D2/362 RBS Backward Chaining
Lisp Implementation ;;; facts & rules for example forward chaining system ;;; Based on R.J. Schalkoff (proclaim '(special *facts* *rules*)) (setq *facts* '(a b c d e j)) (setq *rules* '((rule r1 (IF a b) (THEN f)) (rule r2 (IF f k) (THEN g)) (rule r3 (IF c d e) (THEN k)) (rule r4 (IF j g)(THEN goal)) )) 4D2/362 RBS Backward Chaining
13
Two pairwise-recursive functions…
;;; 'verify-fact' you guessed it, this function verifies a ;;; fact it returns nil if it cannot verify the fact, otherwise ;;; it returns the search tree. (defun verify-fact (fact) (if (recall-fact fact) t (do ((rulelist (find-rules fact *rules*) (cdr rulelist)) (tree nil)) ((null rulelist) nil) (let ((tree (verify-antecedents (get-antecedents (car rulelist))))) (if tree (return (cons (car rulelist) tree))))))) 4D2/362 RBS Backward Chaining
14
Two pairwise-recursive functions…
;;; ;;; 'verify-antecedents' should be given the list of ;;; antecedents to a rule. If the rule is verifable it will ;;; return the search tree; otherwise nil. (defun verify-antecedents (antecedents) (do ((alist antecedents (cdr alist)) (temp nil nil) (tree nil)) ((null alist) tree) (setq temp (verify-fact (car alist))) (if (null temp) (return nil) (setq tree (cons (list (car alist) temp) tree))))) 4D2/362 RBS Backward Chaining
15
4D2/362 RBS Backward Chaining
In Operation… (verify-fact 'goal) ((RULE R4 (IF J G) (THEN GOAL)) (G ((RULE R2 (IF F K) (THEN G)) (K ((RULE R3 (IF C D E) (THEN K)) (E T) (D T) (C T))) (F ((RULE R1 (IF A B) (THEN F)) (B T) (A T))))) (J T)) 4D2/362 RBS Backward Chaining
16
Trace: verify-fact, verify-antecedents
(verify-fact 'goal) 0: (VERIFY-FACT GOAL) 1: (VERIFY-ANTECEDENTS (J G)) 2: (VERIFY-FACT J) 2: returned T 2: (VERIFY-FACT G) 3: (VERIFY-ANTECEDENTS (F K)) 4: (VERIFY-FACT F) 5: (VERIFY-ANTECEDENTS (A B)) 6: (VERIFY-FACT A) 6: returned T 6: (VERIFY-FACT B) 5: returned ((B T) (A T)) 4: returned ((RULE R1 (IF A B) (THEN F)) (B T) (A T)) 4: (VERIFY-FACT K) 5: (VERIFY-ANTECEDENTS (C D E)) 6: (VERIFY-FACT C) 6: returned T 6: (VERIFY-FACT D) 6: (VERIFY-FACT E) 4D2/362 RBS Backward Chaining
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.