PostHeaderIcon 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.

Elements of a rule based expert system

A rule based expert system consists of the following components:

User Interface

This is a mechanism to support communication between and the system. The user interface may be a simple text-oriented display or a sophisticated, high resolution display. It is determined at the time of designing the system. Nowadays graphical user interfaces are very common for their user-friendliness.

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. This feature makes a huge difference between expert systems and other conventional systems. almost all the commercial expert system shells do trace based explanation, that is, explaining the inferencing on a specific input data set. Some systems explain the knowledge base itself, and some explain the control strategy as well.

Working memory

This is a database used to store collection of facts which will later be used by the rules. More effort may go into the design and implementation of the user interface than in the expert system knowledge base. Working memory 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.

Inference Engine

As the name implies the inference engine makes inferences. It decides which rules are satisfied by the facts, prioritizes them, and executes the rule with the highest priority. There are two types of inference: forward chaining and backward chaining. Forward chaining is reasoning from facts to the conclusion while backward chaining is from hypothesis to the facts that support this hypothesis. Whether an inference engine performs forward chining or backward chaining entirely depends on the design which in turn depends on the type of problem. Some of the systems that do forward chaining are OPS5 and CLIPS. EMYCIN one of the most popular systems performs backward chining. Some systems, ART and KEE, for example, offer both the techniques. Forward chaining is best suited for prognosis, monitoring and control. Backward chaining is generally used for diagnostic problems. Inference engine operates in cycles, executing a group of tasks until certain criteria causes that halt the execution. The taks 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.


Inference engine prepares a priotorized list of rules called 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 mulitple patterns then all of its patterns must be satisfied to get place in the agend. 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 one 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. To implement this feature OPS5 uses a unique identifier called timetag. 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. Simple rules can be created using rule induction. In rule based expert systems, knowledge base is also called production memory as rules in the form of if-then are called productions.

Advantages of Rule based Expert Systems

Modular nature: This allows encapsulating knowledge and expansion of the expert system done in a a easy way.

Explanation facilities: Rules make it easy to build explanation facilities. By keeping track of the rules that are fired, an explanation facility can present a chain of reasoning that led to a certain conclusion.

Similarity to the human cognitive process: Newel and Simon have showed that rules are the natural way of modeling how humans solve problems. Rules make it easy to explain the structure of knowledge to the experts.

Related Articles

Expert Systems

Artifical Intelligence