Expert systems (Coos 208) What Is an Expert System? Expert system Is an artificial Intelligence program that has expert-level knowledge about a particular domain and knows how to use its knowledge to respond properly. In this context, a domain refers to the area within which the task is being performed. Ideally the expert systems should substitute a human expert. Edward Figment of Stanford University has defined expert system as “an intelligent computer program that uses knowledge and inference procedures to solve problems that are difficult enough to require significant human expertise for their solutions.
The source of knowledge for expert systems may come from human experts, books. Magazines and/ or even the internet. Expert systems are also known as knowledge-based systems or knowledge-based expert systems. Components of Expert Systems Figure [ 1 ] Expert System The expert system consists of two major components: knowledge-base and Inference engine. As show in Figure 1 above, these roles of these components are: 1 . The knowledge-base contains the domain knowledge which is used by the inference engine to draw conclusions. 2.
The inference engine is the generic control Achaeans that applies the axiomatic knowledge to the task-specific data to arrive at some conclusion. When a user supplies facts or relevant information of query to the expert system, he receives advice or expertise In response. That Is, given the facts, It uses the Inference engine which In turn uses the knowledge-base to Infer the solution. Characteristics of Expert Systems 1. High performance: They should perform at the level off human expert. 2. Adequate response time: They should have the ability to respond In a reasonable amount of time.
Time Is crucial especially for real time systems. 3. Reliability: They just be reliable and should not crash. 4. Understandable: They should not be a black box instead it should be able explain the steps of the reasoning process. It should Justify its conclusions in the same way a human expert explains why he arrived at particular conclusion. Shell A shell Is a special-purpose tool designed based on the requirements of particular applications. It provides an interface/environment for user interaction with an expert system. User should supply the knowledge-base to the shell. A shell manages the input and output operations.
It processes the information given by the user, relates it o the concepts contained in the knowledge-base, and provides solution for a particular problem. 1 . Availability: Expert systems are available easily due to mass production software. 2. Cheaper: The cost of providing expertise is not expensive. 3. Reduced danger: They can be used in any risky environments where humans cannot work with. 4. Permanence: The knowledge will last long indefinitely. 5. Multiple expertise: It can be designed to have knowledge of many experts. 6. Explanation: They are capable of explaining in detail the reasoning that led to a conclusion. . Fast response: They an respond at great speed due to the inherent advantages of computers over humans. 8. Unemotional and response at all times: Unlike humans, they do not get tense, fatigue or panic and work steadily during emergency situations. Rule Based Expert Systems Rules are the popular paradigm for representing knowledge. A rule-based expert system is one whose knowledge-base contains the domain knowledge coded in the form of rules. A rule-based expert system is normally created from a set of assertions (which form the working memory), and a set of rules that specify how to act on the assertion set.
Rule-based systems are simplistic and mostly consist of a set of IF- THEN statements (also known as the rule set), but provide the basis for expert systems. Elements of a Rule Based Expert System There are 3 essential components of a rule-based expert system: the knowledge- base, the working memory, and the inference engine. The Knowledge-base This is where the knowledge of a particular domain is stored. The knowledge-base contains symbolic representation of experts’ knowledge, including definitions of domain terms, interconnections of component entities, and cause-effect relationships between these components.
The knowledge in the knowledge-base is expressed as a collection of fact and rules. Each fact expresses relationship between two or more objects in the problem domain and can be expressed in term of predicates. The Working Memory The working memory is a temporal store, like a database, used to store collection of facts which will later be used by the rules. It is used by the inference engine to get facts and match them against the rules. The facts may be added to the working memory by applying some rules. The Inference Engine There inference engine is the core of any expert system, and as the name implies it sakes inferences.
The inference engine is the component that manipulates the knowledge-base to produce new fact in order to solve a given problem. It decides which rules are satisfied by the facts, priorities them, and executes the rule with the highest priority. An inference engine consists of search and reasoning procedures to answers. In this process, it can use either forward or backward searching as a direction of search while applying some search technique such as Depth-First Search, Breadth-First Search, etc: There are two types of inference: forward chaining and backward chaining. Forward chaining is reasoning from facts to the conclusion. The rules are used to control how inferences are made from the facts. It is best suited for prognosis, monitoring and control. 2. Backward chaining is from hypothesis to the facts that support this hypothesis. It is generally used for diagnostic problems. Whether an inference engine performs forward chaining or backward chaining entirely depends on the design which in turn depends on the type of problem. Inference engine operates in cycles, executing a group of tasks until certain criteria causes that halt the execution.
The tasks to be done repeatedly are conflict resolution, act, match and check for halt. Multiple rules may be activated and put on the agenda during one cycle. The roles of an inference engine are: 1. It identifies the rule to be triggered/fired. 2. It resolves conflicts when more than one rule satisfies the matching – also called conflict resolution. 3. It recognizes the goal state. Other components of a rule-based expert system are: 1 . User Interface: This is a mechanism to support communication between the user and the system. The user interface may be a simple text-oriented display or a pesticides, high resolution display (GU’). . Explanation Facility: It explains the user about the reasoning process of the system. By keeping track of the rules that are fired, an explanation facility presents a chain of reasoning that led to a certain conclusion. So explanation facility is also called Justifier. Some expert system shells do trace-based explanation (I. E. Explaining the influencing on a specific input data set). Some systems explain the knowledge-base itself, and some explain the control strategy as well. 3. Agenda: Inference engine prepares a prioritize list of rules ladled agenda. The rules in the list must be satisfied by the facts in the working memory.
When the inference engine notices a fact that satisfies the pattern in the condition part of the rule then it adds the rule to the agenda. If a rule has multiple patterns then all of its patterns must be satisfied to get place in the agenda. In a condition a>b and b>c, for example, both a>b and b>c must be satisfied. A rule whose patterns are satisfied is said to be activated or instantiated. When there is more than one activated rule in the agenda then the inference engine has to select en rule, based on priority or on other factors, for firing.
Rule based expert systems are built using refraction to prevent trivial loops. That is a rule which is fired on a fact will not be fired again and again on the same fact. Then-part of the rule contains actions to be executed when the rule fires. Some of the actions are addition of facts to the working memory, removal of facts from the working memory and printing results. Agenda conflict occurs when different activations have the same priority. Agenda conflict is tackled by strategies such as first come first execute, assigning default priority, and so on. Knowledge Acquisition Facility: This allows the user to enter knowledge in the system thereby avoiding the need of knowledge engineer explicitly code the knowledge. It is an optional feature on many expert systems. Knowledge-base is also called production memory as rules in the form of if-then are called productions. How Rule-Based Systems Work The rule-based system normally uses the following simple technique for reasoning: 1 . It start with a knowledge-base which contains all of the appropriate knowledge encoded into IF-THEN rules, and a working memory which may not contain any initial ATA or assertions 2.
The system examines all the rule conditions (IF) and determines a subset of the rules whose conditions are satisfied based on the working memory. This subset of rules is called the conflict set. 3. Based on a conflict resolution strategy, one or more rules from the conflict set is triggered (fired). 4. When a rule is fired, any actions specified in its THEN clause are carried out. These actions can modify the working memory or the rule-base itself. 5. The above steps are repeated until one of the following 2 conditions are met: a. There are no more rules whose conditions are satisfied, or .
A rule is fired whose action specifies the program should terminate. Conflict Resolution Strategies The following are some conflict resolution strategies used in inference engines: 1. First applicable: involves firing the first applicable rule in a set of ordered rules. 2. Random: mostly used in games due to its unpredictable behavior, this strategy simply chooses a single random rule to fire from the conflict set. 3. Most specific: with the strategy, from the conflict set, the rule with the most conditions is chosen. It is based on the assumption that the most relevant rule should have the highest umber of conditions. . Least recently used: here all rules in the conflict set are tagged with a time stamp; the strategy chooses the rule that was least recently used based on the time stamp attached to it. 5. Best rule: each rule in the conflict set is given a weight, which specifies how much it should be considered over the alternatives. The rule with the most preferable outcome is chosen based on this weight. Advantages of Rule Based Expert Systems 1 . Modular nature: This allows encapsulating knowledge and expansion of the expert system done in an easy way. 2. Explanation facilities: Rules make it easy to lid explanation facilities.