Presentation on theme: "Knowledge Representation and Expert Systems by Sujan Pakala Stephen Brown."— Presentation transcript:
Knowledge Representation and Expert Systems by Sujan Pakala Stephen Brown
What are they? Diagnose a problems in a given domain Capable of justifying its actions and conclusions Applications: Medical diagnosis applications Locating equipment failures Interpreting measurement data
Shell Structure of Expert System Knowledge Base Inference Engine User Interface User Major Components: Knowledge Base Inference Engine User Interface The Shell contains the inference engine and the user interface.
Expert System Features Goal driven reasoning or backward chaining Data driven reasoning or forward chaining Coping with uncertainty Data representation User interface Generating Explanations
If – then Rules Most popular formalism for knowledge representation Additional features - modularity - incrementability - modifiability - transparency categorical vs. probabilistic knowledge knowledge elicitation Example – refer figure.
Kitchen_dry Hall_wet Bathroom_dry Window_closed No_rain Leak_in_bathroom Problem_in_kitchen No_water_from_outside Leak_in_kitchen Knowledge base as an Inference Network
Backward chaining Follow a chain of rules backwards Stating rules into knowledgebase: - as straightforward prolog rules – hall_wet. bathroom_dry. leak_in_bathroom :- hall_wet, kitchen_dry.
Contd.. Disadvantage - not suited for normal user - hence, not syntactically distinct Better way: - use ‘if’, ‘then’ etc. as operators- :-op(800, fx, if) - and write the rules as- if hall_wet and kitchen_dry then leak_in_bathroom. Major disadvantage: - user has to state all relevant info.
Generating Explanations Has the ability to explain its results. Two types of explanations: how the system reached a given conclusion why the system is asking a question
Coping with Uncertainty Much of the time, the final answer is not known with complete certainty. We can model uncertainty by assigning some qualification or measure of belief factor. In our knowledge base, we can add a certainty factor to our conclusions: if hall_wet and bathroom_dry then problem_in_kitchen : 0.9.
Example: User specifies certainty estimates: given(hall_wet, 1).% Hall is wet given(bathroom_dry, 1).% Bathroom is dry given(kitchen_dry, 0).% Kitchen is not dry given(no_rain, 0.8).% Probably no rain, but not sure given(window_closed, 0).% Window not closed
Continue Example: An interpreter for rules with certainties: certainty(P, Cert) :- given(P, Cert). certainty(Cond1 and Cond2, Cert) :- certainty(Cond1, Cert1), certainty(Cond2, Cert2), minimum(Cert1, Cert2, Cert). certainty(Cond1 or Cond2, Cert) :- certainty(Cond1, Cert1), certainty(Cond2, Cert2), maximum(Cert1, Cert2, Cert). certainty(P, Cert) :- if Cond then P : C1, certainty(Cond, C2), Cert is C1 * C2. ?- certainty( leak_in_kitchen, C). C = 0.8 Obtained: hall is wet & bathroom is dry problem in the kitchen : 0.9 Possibility of some rain no water from outside : 0.8 Leak in kitchen is min(.8,.9) = 0.8