Expert System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

An expert system is a program which contains the specialist knowledge of one or more human experts in a specific domain.

The expert system provides a user with advice and can explain why it asks the questions it does, and how it draws the given conclusions. An expert system should be able to handle uncertain information. The RETE Algorithm A great burden can be placed on the inference engine in resolving conflicts resolution in expert systems. To alleviate this burden, the RETE algoritm can be used. The RETE algorithm is a method which maintains a list of rules whose conditions match the facts in the working memory, alleviating the strain on the inference engine. The RETE algorithm in memory-intensive, but can improve the efficiency of an expert system Conflict Resolution in Forward Chaining Expert Systems In a forward chaining expert system, during a consultation information collected is added to the working memory. Information added to the working memory can result in rules in the knowledge base becoming ready to fire ( a rule that can fire is one where all the conditions attached to the rule are known to be true. If all the conditions are true, then the advice from the rule can be generated). In an expert system (especially a large one with a large amount of rules), at any one moment in time there may be a series of rules that are ready to fire. Which one should be fired first? The rules which could fire at any moment in time are known as the conflict set. A Conflict Resolution Strategy is required to make the decision as to which rule should be fired first. A list of these strategies is shown: Rule Ordering (First Come, First Served) - Simple. The rule fired is the first rule in the conflict set. If the set contains rules 2, 5, 7 and 9, then fire rule 2. Recency - The rule is fired which uses the data added most recently to the working memory (a common mistake is to use the rule added most recently to the knowledge base - wrong). E.g. Rule 1: IF A AND B THEN C Rule 2: IF D AND E THEN F Rule 4: IF G AND H THEN I If the contents of working memory are B, A, H, G, E, D (added in that order with D most recent addition) then rule 2 will fire, as D and E are the most recent additions. (If you will, the 'freshest' evidence in the trail). Specificity - Fire the rule with the most conditions attached. E.g. Rule 1: IF A AND B THEN C Rule 2: IF D AND E AND F THEN G Rule 2 is fired because it has 3 conditions attached as opposed to the 2 conditions in rule 1. Refractoriness - This prevents any rule that has already fired from firing again, which can cause an infinite loop in the system. Once fired, a rule should be permanently removed from the conflict set. Handling Uncertainty Expert systems have to be able to handle uncertainty. Domain experts may not be 100% certain of their knowledge. ("Global warming is likely to be the cause of rising sea levels"). Information about the problem to be solved may be incomplete or unreliable ("It is a kind of dull, aching pain").

Uncertainty in Output (Advice) Certainty factors are one simple method of indicating the degree of beief in advice being provided, e.g. IF clouds are cumulus THEN advice is it will rain today CF 40. If the input is known to be cumulus clouds then the advice it will rain today will be provided, but the user will be instructed that this is only 40% likely to occur. This allows the develop of the expert system to allow the user to see there is a degree of risk in taking the advice. To this extent, it is a means of the develop protecting themselves from someone trying to blame them for the advice that was generated, acted upon and ultimately proved to be wrong. Uncertainty in Input Expert systems should also allow the user to input their degree of uncertainty when asked a particular question. E,g, IF surface is free draining AND retains moisture is true THEN soil is loamy (0.9). Assume the user is 60% certain the surface is free draining and 50% certain it retains moisture, then how can these certainty factors for the conditions be applied to the advice from the rule which would be generated with a 90% certainty only if both the conditions are 100% true. The method applied for your exam is to play cautious. Take the condition of which we are less certain (the 50% for retains moisture rather than 60% for free draining) and multiply this by the certainty factor for the rule to provide the certainty factor for the outcome, i.e. 50% x 90% = 45%. 45% is the minimum degree of confidence that can be generated here. (again, we play cautious. Using the 60% from free draining would produce a certainty factor of 54%. If the advice proves unsound, is it not better to say you were only 45% sure as opposed to 54%)? In short, the following formula is applied for certainty factors: CFoutcome = Min(CFcondition1 , CFcondition2, CFconditionn) x CFrule Representing Domain Knowledge Ultimately, the domain knowledge in an expert system will reside in a Knowledge Representation Language (KRL), such as an expert system shell like Intermodeller. How best to take the expert knowledge gathered from an expert and put it into a format that will best allow a programmer to write the code for the system. Three of the most common (and examinable) methods are shown below: y Decision Trees y Factor Tables y Attribute-Value pairs y Expert Systems (Shells) vs. Relational Database y "An expert system is a program that contains the specialist knowledge of one or more human experts. This expert knowledge is in a form that others may use to solve problems in a specific

y y

domain. The expert system provides the user with advice and can explain the advice it gives and why it is asking particular questions. Expert systems must be able to handle uncertain and incomplete information". In this unit, Intermodellar (an Expert System shell - a program containing an empty knowledge base, a pre-defined user interface and an inference engine) has been used to create expert systems that, hopefully, hit the definition above. But what about a RDBMS, could it do the job? Comparison of Data Representation and Information Retrieval An Expert system stores data in its knowledge base as production rules. To query the system involves a consultation being run, wheerby the user is asked questions via the user interface until eventually advice is provided. A RDBMS stores data in related tables, as records and fields (attributes). Querying the system is a matter of running a search and entering the appropriate criteria in the required field(s). The system will then return the relevant data. This may prove a quicker process than using a shell, where many questions may have to be posed, but could involve a greater degree of competence on the part of the user to extract the required information from the system. Creating Why and How justification can be a very complex operation to undertake in a RDBMS, whilst these features are in-built automatically in a shell. Benefits of Expert Systems

Expert systems allow expert knowledge to be extracted when there is no ready access to a human expert, and at any time night and day. They preserve expert knowledge when a human expert dies. Can combine expertise of many human experts. Can increase productivity through quick diagnoses. Limitations/Disadvantages of Expert Systems Can only provide knowledge on one restricted domain. Can only provide advice on knowledge entered into the system, which may be limited. Do not routinely update knowledge, as a human expert does.Lack of common sense. Have very high development costs (retaining services of an expert, purchasing powerful hardware, continual programming to keep system up-to-date, training and maintenace costs). Situations to Encourage Expert System Development y Nature of domain is such that facts and rules can be coded easily, perhaps due to a lack of uncertainty in the domain area. y Ready access to experts to provide domain knowledge. y Domain is sufficiently restricted, allowing all domain knowledge to be coded effectively. y System would reach out to a great deal of users who would otherwise have no access to domain knowledge.

Backward Chaining - Goal driven inferencing system that assumes a hypothesis of what the likely outcome will be, and then works backwards to collect the evidence to support this conclusion. Expert systems used for planning often use backward chaining. Conflict Resolution - In a forward chaining system, many rules can fire at the same time (a rule can fire when all its attached conditions match the facts in the working memory). Conflict resolution provides methods of choosign which of the rules to fire. Consultation - The running of an expert system to produce advice by the user answering questions. Domain - Area of knowledge of an expert system. Expert System Shell - Software with a built-in inference engine, ready-made user interface and an empty knowledge base. Forward Chaining - Inferencing method which gathers facts (like a detective at the scene of a crime) until enough evidence is collected that points to an outcome. Often used in expert systems for diagnosis, advise and classification, although size and complexity of the system can play a part in deciding which method of inferencing to use. How Justification - Where the system justifies its reasoning for providing a piece of advice. Inference Engine - Applies the facts to the rules and determines the questions to be asked of the user in t he user interface and in which order to ask them. This is the 'invisible' part of the expert system, which is active during a consultaion of the system (when the user choses to run the program). Knowledge Acquisition - The process of getting the knowledge from expert sources that will entered into the expert system, e.g. interviewing an expert, researching a topic. Knowledge Base - Where information is stored in the expert system in the form of facts and rules (basical ly a series of IF statements). Where the programmer writes the code for the expert system. Knowledge Representation - Once expeet knowledge is acquired, it should be presented in a form that makes it easy to construct facts and rules to be coded in the sy stem. Common examples are factor tables and rule trees. Knowledge Validation - Testing the completed expert system to see that the advice is generates matches the advice that would be produced by a human expert. Knowledge Representation Language (KRL) - Solution used to code the facts and rules into the expert system, such as an expert system shell, a high level language or a specific artificial intelligence language. Rule Ordering (First Come First Served) - Conflict resolution strategy where the first rule in the conflict set is fired. E.g. Rule1, Rule2 and Rule3 - fire Rule1. Recency - Conflict reolution strategy where the rule is fired which matches the facts added most recently to the working memory. Refractoriness - Conflict resolution strategy where the rule just fired is removed form the conlict set to ensure the system does not go into a continuous loop. Rete Algorithm - Limits the effort required to recompute the conflict set after a rule is fired. The increased system efficiency comes with a cost regarding meory useage. Specificity - Conflict resolution strategy where the rule with the most conditions attached to it is fired first. User Interface - Where the user interacts with the expert system. I.e. where questions are asked, and advice is produced. As well as the advice that is output, the user interface can output the justification featutes of an expert system. Why Justification - where the system justifies why a particular question is being asked. Working Memory - Contains the facts received from the user via questions asked during a consulation session with the expert system.

You might also like