2. Introduction:
● The principle objective of backward chaining is to prove
some goal or hypothesis
● The process begins by collecting GOAL RULES
● The premise of the goal rules may be supported by
other rules, so they are set as Sub-Goals
3. Introduction:
● The inference engine searches through the system’s
rules in a recursive fashion.
● Backward Chaining inference engine will reach some
premise that is not supported by any of the system’s
rules (a Primitive) --> Ask User
4. Introduction:
● The answer is placed in the current memory
● The process continue until all goals and sub-goals are
searched memory contains all information provided by
user and inferred by rules.
5. Medical Consultation Systems
MYCIN was an early expert system that used artificial
intelligence to identify bacteria causing severe infections,
such as bacteremia and meningitis, and to recommend
antibiotics, with the dosage adjusted for patient's body
weight
6. Medical Consultation Systems
● Like MYCIN , performs diagnosis for infectious blood
diseases
● Unlike MYCIN , doesn’t identify organ but rather the
nature of the infection
● 3 different expert systems: Diagnosis, Prescription,
Prescription Changes
7. Megningitis Diagnosis Expert System
● The system has only one goal :
Prove or disprove “Infection is
meningitis”
● One Goal rule : RULE 1
This can be proven if the user
already knows that the patient
has meningitis or the system
can infer it.
8. Megningitis Diagnosis Expert System
● The system has only one goal :
Prove or disprove “Infection is
meningitis”
● One Goal rule : RULE 1
This can be proven if the user
already knows that the patient
has meningitis or the system
can infer it.
● RULE 2,3,4 : search the test results
9. Megningitis Diagnosis Expert System
● The system has only one goal :
Prove or disprove “Infection is
meningitis”
● One Goal rule : RULE 1
This can be proven if the user
already knows that the patient
has meningitis or the system
can infer it.
● RULE 2,3,4 : search the test results
● RULE 5 : searches the area of
patient symptoms
10. Meningitis diagnosis rules
● STEP 1: Find rules with hypothesis in
“THEN” part
EMPTY
Working Memory
● STEP 2: see if first premise in RULE
1 is listed in working memory
NO
11. Meningitis diagnosis rules
EMPTY
Working Memory
● STEP 3: see if this premise exists in
“THEN” part of any rule
- NO
● STEP 4: This premise is a primitive
Question : “Do you know if patient has
Meningitis ?”
Answer : NO
Patient known to have
Meningitis - FALSE
12. Meningitis diagnosis rules
EMPTY
Working Memory
● STEP 5: look at second premise in
RULE 1 and see if it’s in working
memory
- NO
● STEP 6: see if this premise exists in
“THEN” part of any rule
Patient known to have
Meningitis - FALSE
13. Meningitis diagnosis rules
EMPTY
Working Memory
● STEP 7: see if first premise in RULE
2 is listed in working memory
- NO
● STEP 8: see if this premise exists in
“THEN” part of any rule
Patient known to have
Meningitis - FALSE
14. Meningitis diagnosis rules
EMPTY
Working Memory
● STEP 9: Q: Were test run?
A:
YES
Patient known to have
Meningitis - FALSE
Tests run- TRUE
● STEP 10: Q: Were culture seen?
A:
YES
Culture seen- TRUE
16. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 11:
Q: The appearance of the culture is
coccus?
A: Why
System: This will aid in determining if cultures
look like Meningitis
17. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 11:
Q: The appearance of the culture is
coccus?
A: Why
System: This will aid in determining if cultures
look like Meningitis
18. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 12:
User: Why?
System: This will determining if “we suspect
meningitis from test results”
19. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 13:
Q: The appearance of the culture is
coccus?
A: No Appearance of cultures is
coccus-FALSE
20. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 14: look at second premise in
RULE 2 and see if it’s in working
memory
- No
Appearance of cultures is
coccus-FALSE
21. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 15: see if this premise exists
in “THEN” part of any rule
Appearance of cultures is
coccus-FALSE
22. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 16: All premises of RULE 5
are unknown and primitives
Questions Appearance of cultures is
coccus-FALSE
Suffering persistent
headaches- TRUE
Q: Has the patient been suffering
persistent headaches ?
A: YES
23. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 16: All premises of RULE 5
are unknown and primitives
Questions Appearance of cultures is
coccus-FALSE
Suffering persistent
headaches- TRUE
Q: Has the patient been suffering
dizziness?
A: YES
Suffering dizziness- TRUE
24. Meningitis diagnosis rules
EMPTY
Working Memory
Patient known to have
Meningitis - FALSE
Tests run- TRUE
Culture seen- TRUE
● STEP 16: All premises of RULE 5
are unknown and primitives
Questions Appearance of cultures is
coccus-FALSE
Suffering persistent
headaches- TRUE
Q: Has the patient been lethargic?
A: YES Patient been lethargic -
TRUE
25. MCS: Example 2
SYSTEM: My first recommendation is the
following:
AMPICILLIN
Dose: 3.8g (30ml)
GENTAMICIN
Dose: 131mg (3.2ml)
26. MCS Example 3
The goal of the
alternative prescription
system is to allow the
user to choose some
alternative drug, which
the system will then
check for effectiveness
and safety.
27. Alternative Prescription rules
Working Memory
● STEP 1:
Drug recommendation
AMPICILLIN-TRUE
Drug recommendation
GENTAMICIN-TRUE
System : The following drugs are
recommended:
Drug1 = AMPICILLIN
Drug2 = GENTAMICIN
28. Alternative Prescription rules
Working Memory
● STEP 2:
System : Do you want to consider
another prescription?
User: YES
Drug recommendation
AMPICILLIN-TRUE
Drug recommendation
GENTAMICIN-TRUE
29. Alternative Prescription rules
Working Memory
● STEP 3:
System : Which drug would you
like to delete?
User: AMPICILLIN
COMMENT: System binds
?deleted _drug to AMPICILLIN
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
30. Alternative Prescription rules
Working Memory
● STEP 4:
System : What drug would you like
to add?
User: STREPTOMYCIN
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
31. Alternative Prescription rules
● STEP 5:
System : The requested drug
STREPTOMYCIN comes from the drug
class AMINOGLYCOSIDES and would not
be an effective replacement for
AMPICILLIN which comes from the drug
class PENICILLINS. To be elective, the
alternative drug should come from the
same drug class.
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
Working Memory
Alternative drug considered - FALSE
32. Alternative Prescription rules
● STEP 6:
System : Would you like to try another
drug?
User: YES
COMMENT: RULE 9 fires and a
number of facts are retracted and the
system is cycled.
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
Alternative drug considered – FALSE
Working Memory
33. Alternative Prescription rules
Working Memory
● STEP 7:
System : What drug would you like to add?
User: PENICILLIN
COMMENT. The system again determine
the classes of the deleted and requested
drugs, and checks to see that they come
from the same class-
RULE 6.
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
Alternative drug considered – FALSE
34. Alternative Prescription rules
● STEP 8:
System : The requested drug PENICILLIN comes from
the drug class PENICILLINS and would be an effective
replacement for AMPICILLIN which also comes from the
drug class PENICILLINS.
COMMENT:
The system now is satisfied that the new requested drug
is an effective replacement for the deleted drug. It next
checks to see if the drug should be safe for the patient on
the basis of the patient's age.
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
Alternative drug considered – FALSE
Working Memory
Requested Drug effective -
TRUE
35. Alternative Prescription rules
● STEP 9:
System : What is the age of the patient in years?
User: 30
COMMENT: The system now must check to see if the patient is old
enough to take the drug – Rule 8. The system calls the external program
“AGE” which obtains the minimum allowable age for the requested drug
from the database “DRUGS.”
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
Alternative drug considered – FALSE
Requested Drug effective - TRUE
Working Memory
36.
37. Alternative Prescription rules
● STEP 10:
System : The patient is 30 years
old which is fine for the drug
PENICILLIN which has minimum
safe age requirement of 15
years.
Working Memory
Drug recommendation AMPICILLIN-
TRUE
Drug recommendation
GENTAMICIN-TRUE
Alternative drug considered – FALSE
Requested Drug effective - TRUE
Requested Drug safe - TRUE