2 What is there in an expert system? Components of an expert systemKnowledge acquisition and knowledge engineeringExplanationsUser interfaceExpert system shellsExpert systems demos
3 IntroductionExpert systems solve real problems which normally would require a specialized human expert (such as a doctor or a lawyer).Knowledge characteristics:heuristic in nature,based on ``rules of thumb''
5 Types of problemsdiagnosis (e.g., of a system fault, disease or student error)design (of a computer systems, hotel etc)interpretation (of, for example, geological data
6 Rule Based Production Systems Most ES are rule-based production systemsTheir knowledge is represented in the form of production rules to provide diagnoses or advice on the basis of input data.Production rules are if-then rulesIF it rains, then you will get wetIF it rains, then you should wear a coat
7 Components of an expert system UserInter-faceExplanationsystemInference engineKnowledge base editorCase specific data: Working storageKnowledge baseExpert system shell
8 Expert system knowledge base Domain inference rules and object descriptionsCase specific dataKnowledge base editor: creating and updating the knowledge base
9 Knowledge acquisition and knowledge engineering Domain expertKnowledge engineerKnowledge acquisition : The process of "extracting" the knowledge from the domain expert and representing the knowledge in a suitable form that can be used by the expert system
11 Inference EngineForward chaining: derive all conclusions given certain factsSelect applicable rulesChoose a rule (conflict resolution)Execute the rule and update the case-specific dataBackward chaining: prove a given goal by verifying the conditions in the IF-THEN rulesCoping with uncertaintyMixed reasoning
12 Forward ChainingForward chaining is a reasoning model that works from a set of facts and rules towards a set of conclusions, diagnoses or recommendations.When a fact matches the antecedent of a rule, the rule fires, and the conclusion of the rule is added to the database of facts.
13 Conflict Resolution More than one rule will may be used A conflict resolution strategy decides which rule to use.Strategies:give rules priorities and use the conclusion that has the highest priority.apply the rule with the longest antecedentapply the rule whose condition was most recently added to the database.
14 Rete Algorithm for Forward Chaining Reorganize the rules in a network so that the conditions are linked to the rules, i.e. rules are indexed by their antecedentsWhen a new conclusion is made or a new fact arrives, examine only those rules whose antecedents contain the new conclusions or factsThe algorithm makes forward chaining much faster at the expense of greater memory requirements
15 Backward Chaining Used when a particular conclusion is to be proved. Works back from a conclusion towards the original facts.When a conclusion matches the conclusion of a rule in the database, the system tries to prove the antecedents of the rule.
16 Coping with uncertainty The ability of the system to reason with rules and data which are not precisely known.Certainty factors:Apply to the known facts: how much we trust the recorded factsApply to the rules: how much we trust the rules
17 Meta Rules Meta rules : knowledge about how the system works. Example of meta rules:The rules that determine the conflict resolution strategyMeta rules might define that knowledge from Expert A is to be trusted more than knowledge from Expert B.
18 Meta Rules Implementation of meta rules: Implicit – in the inference engine (e.g. conflict resolution)Explicit - treated by the system like normal rules, but are given higher priority
19 Mixed ReasoningCollect initial data and use forward reasoning to determine a set of possible conclusionsUse backward reasoning to prove or disprove each conclusion
20 Example of Mixed Reasoning in Medical ES Collect data to build hypothesesFor each hypothesis H:If H is in the facts database, it is proved.Otherwise, if H can be determined by asking a question, then enter the user’s answer in the facts database. Hence, it can be determined whether H is true or false.Otherwise, find a rule whose conclusion is H. Now apply this algorithm to try to prove this rule’s antecedents.If none of the above applies, we have failed to prove H.
21 Explanations Why a particular question is asked How a conclusion has been reachedWhy not some other conclusionWhat if a particular symptom is presentTerminology – explain the terms used by the system
22 User interface End-users Knowledge engineer Experts Requirements: Self-consistentConsistent with widely used interface systemsProvide navigation helpIncorporate user model
23 Expert System Shells The shell is a piece of software which contains the user interface,a format for declarative knowledge in the knowledge base, andan inference engine.The knowledge engineer uses the shell to build a system for a particular problem domain.
24 CLIPS CLIPS is C Language Integrated Production System – an expert system shell.CLIPS uses aLISP-like notationto enter rules.
25 CYC A frame based production system. Uses a database of over 1,000,000 facts and rules, encompassing all fields of human knowledge.CYC can answer questions about all kinds of knowledge in its database, and can even understand analogies, and other complex relations.