| Publications Page
|
![[Previous Page]](/icons/button-back.gif)
![[Table of Contents]](/icons/button-contents.gif)
Section 4.4.1: CLIPS
4.4
Expert Systems
Newell and Simon in their book Human Problem Solving [22], explain that
much of human problem solving or cognition can be expressed by IF THEN
type production rules. Each rule corresponds to a modular collection of
knowledge called chunks. The chunks are organized in a loose
arrangement with links to related chunks of knowledge. Newel and Simon
say that the human memory is organized in chunks. They also sya that
reasoning could be done using rules.
The knowledge encoded in rules may be heuristic. The term heuristic
means a method that may aid in the solution of a problem. A heuristic
method is not guaranteed to find the solution, only an algorithm is
guaranteed to determine the solution. In a conventional sequential
program we usually have a good idea of the algorithm to be programmed.
However, in an expert system, we may not have a good algorithm because
our knowledge is incomplete or heuristic. Each rule is formed by a left
side that needs to be satisfied (Facts) and by a right side that
produces the appropriate response (Actions.)
IF Facts THEN Actions.
When an action is issued by a rule it may become a fact for other
rules, creating links to other rules. A system may use thousands of
rules to solve a problem, thus we need a special mechanism that will
select which rules will be fired according to the presented facts. That
mechanism is an Expert System "Engine." An expert system consists of
the following components according to Giarratano and Riley [24] (see Fig. 4.2):
- User Interface: The means by which the expert system and the users
communicate.
- Explanation Facility: The system explains to the user the way it
reasons.
- Working Memory: A global data base where all the facts used by the
rules are stored.
- Inference Engine: Makes inferences by deciding which rules are
satisfied by facts, prioritizing the satisfied rules, and executing the
rule with the highest priority.
- Agenda: A prioritized list of rules created by the inference
engine, whose patterns are satisfied by facts in working memory.
- Knowledge Acquisition Facility: An automatic way to introduce new
knowledge without the necessity of coding it.
The inference engine needs to find which rules are satisfied by the
facts and execute them, but if a system has thousands of rules this
process will require too much processing time. One solution to this
problem is the use of the Rete algorithm developed by Charles Forgy
[23]. The idea behind this algorithm, is that instead of looking for
the facts that satisfy the rules, the facts are the ones that look for
the rules (see Fig. 4.3).
The rules are encoded to form a network (Rete in Italian), in which the
nodes of the network are rules that share the same facts. It uses a
list of rules that are pre-activated by some of the present facts, and
because the number of new facts is small during an execution cycle, it
is just necessary to see if these new facts will satisfy the left side
of the pre-activated rules.