Knowledge is practical or theoretical understanding of a subject or domain. Thus who possess knowledge are called experts. The human mental process is internal, it is too complex to be represented as an algorithm. However, most experts are capable of expressing their knowledge in the form of rules for problem solving. 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.
Overview of Rule Based Systems
Instead of representing knowledge in a relatively declarative, static way (as a bunch of things that are true), rule based system represent knowledge in terms of a bunch of rules that tell you what you should do or what you could conclude in different situations. A rule-based system consists of a bunch of IF-THEN rules, a bunch of facts, and some interpreter controlling the application of the rules, given the facts
Rule-based systems (also known as production systems or expert systems) are the simplest form of artificial intelligence. A rule based system uses rules as the knowledge representation for knowledge coded into the system. The definitions of rule-based system depend almost entirely on expert systems, which are system that mimic the reasoning of human expert in solving a knowledge intensive problem. Instead of representing knowledge in a declarative, static way as a set of things which are true, rule-based system represent knowledge in terms of a set of rules that tells what to do or what to conclude in different situations.
Significance of Rule Based System
The rule-based system itself uses a simple technique: It starts with a rule-base, which contains all of the appropriate knowledge encoded into If-Then rules, and a working memory, which may or may not initially contain any data, assertions or initially known information. The system examines all the rule conditions (IF) and determines a subset, the conflict set, of the rules whose conditions are satisfied based on the working memory. Of this conflict set, one of those rules is triggered (fired).
Rules are expressed as a set of if-then statements (called IF-THEN rules or production rules):
IF P THEN Q, which is also equivalent to:
\( P=>Q \)
A rule-based system consists of a set of IF-THEN rules, a set of facts and some interpreter controlling the application of the rules, given the facts. The idea of an expert system is to use the knowledge from an expert system and to encode it into a set of rules. When exposed to the same data, the expert system will perform (or is expected to perform) in a similar manner to the expert. Rule-based systems are very simple models and can be adapted and applied for a large kind of problems. The requirement is that the knowledge on the problem area can be expressed in the form of if-then rules. The area should also not be that large because a high number of rules can make the problem solver (the expert system) inefficient.
Elements of a Rule-Based System
Any rule-based system consists of a few basic and simple elements as follows:
- A set of facts: These facts are actually the assertions and should be anything relevant to the beginning state of the system.
- A set of rules: This contains all actions that should be taken within the scope of a problem specify how to act on the assertion set. A rule relates the facts in the IF part to some action in the THEN The system should contain only relevant rules and avoid the irrelevant ones because the number of rules in the system will affect its performance.
- A termination criterion: This is a condition that determines that a solution has been found or that none exists. This is necessary to terminate some rule-based systems that find themselves in infinite loops otherwise.
Facts can be seen as a collection of data and conditions. Data associates the value of characteristics with a thing and conditions perform tests of the values of characteristics to determine if something is of interest, perhaps the correct classification of something or whether an event has taken place.
For instance, if we have the fact: temperature
Then temperature is the data and the condition is<0
Rules do not interact directly with data, but only with conditions either singly or multiple (joined by logical operators as shown below). Figure 1 contains an example showing the parts of a rule based systems and the interactions between them.
Table 1: An example showing the parts of a rule based systems and the interactions between them.
Slippery, not slippery
Cold, warm, hot
IF wind blushing is strongly
IF the road is slippery
THEN the weather is cold
Basic Structure of a Rule –based System
A rule-based system is a way of encoding a human expert’s knowledge in a fairly narrow area into an automated system. A rule-based system can be simply created by using a set of assertions and a set of rules that specify how to act on the assertion set. Here we depict the basic structure of the rule based system:
The Knowledge base contains the domain knowledge useful for problem solving. In a rule based expert system, the knowledge is represented as a set of rules. Each rule specifies a relation, recommendation, directive, strategies or heuristic and has the IF (condition) THEN (action) structure. When the condition part of rule is satisfied, the rule is said to fire and the action part is executed.
The database includes set of facts and used to match against the IF (condition) parts of rules stored in the knowledge base.
The inference engine carries out the reasoning where by the expert system reaches a solution. It links the rules given in the knowledge base with the facts provided in the database.
The explanation facilities enable the user to ask the expert system how a particular conclusion is reached and why a specific fact is needed. An expert system must be able to explain its reasoning and justify its advice, analysis of conclusion.
The user interface is the means of communication between a user seeking a solution to the problem and an expert system.
 Ajith Abraham, “Rule‐Based expert systems”, Handbook of measuring system design (2005).
 Alison Cawsey, “Rule-Based Systems”, available online at: http://www.zemris.fer.hr/predmeti/krep/Rules.pdf
 “Lecture 2: Rule based system”, available online at: ftp://ftp.dca.fee.unicamp.br/pub/docs/vonzuben/ea072_2s06/notas_de_aula/Lecture02.pdf