370 likes | 483 Views
CSRL. CSRL. CSRL. “Why develop yet another language?”. Because it looks like this…. (specialist gas (declarations (superspecialist fuel)) (knowledge-groups (summary (table (conditions (ask-tfu? (did the problem start after the last fillup?))
E N D
CSRL CSRL CSRL “Why develop yet another language?”
Because it looks like this… (specialist gas (declarations (superspecialist fuel)) (knowledge-groups (summary (table (conditions (ask-tfu? (did the problem start after the last fillup?)) (ask-tfu? (has the problem gotten worse since the last fillup?)) (ask-tfu? (have you tried a higher grade of gas?))) (match (if (t ? ?) then 3) (if (f t ?) then 3) (if (f f f) then 3) (if (u u u) then 0) (if (? ? ?) then -3))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine)))
Why is the code like that? • Programming language can model the way experts reason. • Two ways medical experts diagnose a case • 1) Can diagnose “easy” cases • 2) Or they know enough to send the patient to the right specialist.
The Plan What is CSRL exactly. Issues like uncertainty, handling multiple diseases, generic tasks. Control System. Real uses of the system Compare to Mycin and Internist # of slides 32
Other Expert Systems CSRL Inference Engine Inference Engine and Knowledge Base Knowledge Base Quick History • MDX was developed first • Diagnoses Cholestasis (a liver disease) • Automech was a system developed after using CSRL. • Diagnoses fuel problems • Main difference from other systems is:
Fuel System Problems Bad Fuel Problems Fuel Mixture Problems Low Octane Water in fuel Dirt in fuel Classification Hierarchy of Automech More Specific
Terms Specialist – each node in the classification tree. Hypothesis – a possible disease Establish – a hypothesis is confirmed Knowledge Group – where the knowledge is stored in the form of symbolic certainty factor
Declaring a specialist (Specialist BadFuel (declare (superspecialist FuelSystem) (subspecialists LowOctane WaterInFuel DirtInFuel)) (kgs…) (messages…) )
Specialists Can.. • Activate subspecialists to confirm a hypothesis (Establish – Refine) • Confirm a hypothesis (kgs) • Rule out a hypothesis (kgs) • Direct the reasoning of other specialists (Suggestion messages)
Messages (Establish – Refine) • (Establish (if (GE relevant 0) then (SetCertainty self summary) else (SetCertainty self relevant) • (Refine (for specialist in subspecialists do (Call specialist with Establish) (if (+? Specialist) then (Call specialist with refine)))
Message: Establish Fuel System Problems (Establish Mixture) (Rejected Mixture –3) Fuel Mixture Problems
Messages: Refine Fuel System Problems (Refine Vacuum) Fuel Mixture Problems Vacuum (Establish Carburetor-gasket ) (Establish Vacuum-hoses ) Carburetor-gasket Vacuum-hoses
Messages (Suggestion) • Suggest what the subspecialist should consider • Done for efficiency
Message: Suggestion Fuel System Problems (Refine Vacuum (suggest Carburetor-gasket)) Fuel Mixture Problems Vacuum (Establish Carburetor-gasket ) Carburetor-gasket Vacuum-hoses
Knowledge Groups Match data against patterns to produce certainty factor. Certainty factor is a symbolic value between –3 and 3. (more on this later) +2 or +3 mean Established
Final Outcome Fuel System Problems ((Established Carburetor-gasket 3) (Unknown Vacuum-hoses 1 )) Fuel Mixture Problems Vacuum (Established Carburetor-gasket 3) (Unknown Vacuum-hoses 1 ) Carburetor-gasket Vacuum-hoses Question asked of user: Can you see cracks in the carburetor gasket? And Is the diagnosis finished?
Output • Output: (answer (rejected delivery –2) (rejected mixture –3) (established vacuum 3) (rejected bad-gas –3) (established carburetor-gasket 3) (unknown vacuum-hoses 1) (established fuel-problems 2))
Key things • Knowledge is used in the right contexts • Knowledge is directly involved in the problem solving • Suggestion messages could have made it faster
CSRL CSRL Issues
Uncertainty No global calculus keeps added uncertainty error to a minimum Abstractions chosen by expert in context
Control Focus of control changes based on which specialist is active Control is distributed A specialist may be activated by a parent By another specialist through suggestion rules
BlackBoard • Why? • Interface between knowledge sources • Allow for concurrency • Hold the state of the system • Examples: • One disease may be secondary to another • The disease may have more than one cause
BlackBoard • 4 different sections of the blackboard • Active-hypotheses • Established-hypotheses • Rejected-hypotheses • Suspended-hypotheses – hypotheses for which a specialist has not found sufficient evidence to justify pursuing them.
BlackBoard • A specialist activates and is placed in the Active list. • If it gets establishes, it will place it’s name in Established-Hypotheses with it’s manifestations and “recommendations” for its subspecialist. • It will activate it’s successors. • Remove itself from Active-List • If it rejects, it will enter its name on the Rejected-Hypotheses list along with all the negative evidence. Then deactivate. • If a specialist suspends itself, it places itself on the Suspended-Hypotheses followed by a list of manifestations. *Note: If all the subspecialists of a specialist have rejected or suspended themselves then the parent must also be rejected or suspended.
Overview Critic Assembles a composite hypothesis that best explains the data. Ensure that all suspended specialist’s manifestations have been explained by established hypotheses Or How? Take list of unexplained manifestations(symptoms) and see if suspended specialists can explain them.
Multiple Diseases • Problem: • Diseases with Additive Symptoms • Cardiac cirrhosis causes elevation of bilirubin up to 3mg/dl • Cholestasis can account for excess of 5mg/dl • What if the blood test shows 9mg/dl?
Multiple Diseases • Solution: Add more message types, can-account-for and re-establish • (Established Cholestasis 2) likely • (Established (CardiacCirrhosis 1) possible • Then, higher level specialist integrate results.
Multiple Diseases • Cholestasis returns: [(establishedAt +2 (canAccountFor (bilirubin 9)) • Liver responds: [(re-establish (assume (bilirubin 6))
Generic Tasks • CSRL is classification and hypothesis matching • Not heuristic classification • Because does not do data-abstraction (ex. Blood count 5 = Blood count low)
Strengths and Weaknesses • Strengths: • No global calculus • Readable and code that models experts reasoning. • Weaknesses: • Limited to classification and hypothesis matching. • Not a full programming language.
Other Systems: Automech • Domain: Car fuel system diagnosis • Organization: 34 specialists. • Results: • Easy for non-computer experts to understand • Easy to debug • Took 4 people five man-months of time to develop, 30% was expert time.
Other Systems: Red • Red: anti-body identification • Organization: Three components. • CSRL is used to rule out antibodies Overview DB CSRL
Other Expert Systems Mycin - uses a hierarchy, but limited to knowledge that can be expressed as rules Internist – decision based heavily on scoring function for manifestations. Casnet – performs heavy calculations. Uses a causal network to map states to tests.
Other Expert Systems CSRL Inference Engine Inference Engine and Knowledge Base Knowledge Base Conclusions CSRL organizes knowledge in a hierarchy of specialists Knowledge is directly involved in the problem solving It is flexible to handle issues such as multiple diseases.
Discussion CSRL CSRL