Rule-based systems
An expert system is a computer program designed to emulate the problem-solving behavior of an expert in a specific area of knowledge. To qualify as an expert system, a system must have the ability to explain or justify its conclusions. A system that can explain its reasoning process is said to demonstrate meta-knowledge (knowledge of its own knowledge).
The system performs at a level generally recognized as equivalent to that of a human expert or specialist in the field. Human experts exhibit certain characteristics and techniques that help them achieve a high level of problem solving in their field. A human expert solves the problem, explains the result, learns and determines relevance. So an expert system is highly domain specific. He can explain his reasoning. If the information it operates with is probabilistic or fuzzy, it can properly propagate uncertainties and provide a range of alternative solutions with associated likelihoods.
A typical expert system architecture is shown in Figure 2.1 The knowledge base contains the specific domain knowledge used by an expert to draw factual conclusions. In the case of a rule-based expert system, this domain knowledge is expressed in the form of a series of rules. The explanation system provides the user with information about how the inference engine arrived at its conclusions. This can often be essential, particularly if the advice given is critical in nature, such as with a medical diagnostic system. If the system used faulty reasoning to arrive at its conclusions, then the user can see this by examining the data provided by the explanation system.
The fact base contains the case-specific data to be used in a particular case to draw a conclusion. In the case of a medical expert system, it would contain information obtained about the patient's condition.
The user of the expert system interfaces with the latter via a user interface, which provides access to the inference engine, the explanation system and the knowledge base editor. The inference engine is the part of the system that uses rules and facts to draw conclusions. The inference engine will use forward chaining, backward chaining, or a combination of both to make inferences from the available data.
The Knowledge Base Editor allows the user to edit the information contained in the Knowledge Base. The knowledge base editor is generally not made available to the end user of the system, but is used by the knowledge engineer or expert to provide and update the knowledge contained in the system.

Figure 2.1 Architecture of an expert system
2.3 Expert system construction tools
Programming language
An expert system can be implemented using a general programming language. However, the LISP and PROLOG programming language are typically used in the implementation of expert systems, particularly artificial intelligence applications.
Shells
A shell mainly consists of an inference engine and an editor to help developers build their knowledge base. CLIPS is an expert system shell developed by NASA.
2.4 Case study: MYCINOne of the first expert systems (developed at Stanford from 1972). A rule-based expert system.
Objective : diagnosis and treatment of bacterial infection.
1. determine the extent of the infection;
2. determine the responsible body;
3. identify possible medications;
4. choose the best treatment.
All from incomplete data.
Evaluation of MYCIN in 1979: in competition against 8 doctors (plus the treatment applied) on 10 real cases, MYCIN came first.
MYCIN was a research program and was never really used in hospitals: Incomplete, difficult to evaluate, poor interface... But it showed that we can approach an area of expertise.
Knowledge in MYCINThe static knowledge base has rules:
If :
> the coloring of the organism is GRAM negative
> its morphology is a stick
> it is aerobic
Then:
it is likely (0.8) that the organism is an Enterobactariaceae
We therefore have a set of approximate rules (here, deductions).
Inference engine
deduces facts from initial facts and rules. Two basic approaches:
- start from what we want to find and go back to the facts (backward chaining);
- start from the facts and go towards what we want to find (forward chaining).
Limitations of MYCIN