0203. Introduction to Artificial Intelligence
Knowledge-Based System
1. Production System
Production systems, also called rule-based systems, is another application of predicate logic.
A production rule has the format
C1, ..., Cm → A1, ..., An
which means that if conditions C1, ..., Cm are satisfied, then the action
sequence A1, ..., An can be performed. In this way, declarative knowledge
(condition) and procedural knowledge (action) are related to each other.
[Please notice its relation to implication propositions and inference rules in
propositional/predicate logic, as well as to the rules in Prolog and the operations
defined in STRIPS-like planning systems.]
At a given moment, if there are several rules whose conditions are satisfied, the
control mechanism decides which one to "fire", i.e., to perform the actions.
When a rule is fired, it will cause some internal and external changes, which may
trigger other rules. This process continues until certain ending condition is satisfied.
In summary, a typical production system consists of
- a rule base (storing the rules),
- a working memory (storing facts and intermediate results),
- a control mechanism (managing rules execution order).
Example: 8-puzzle revisited (pages 203-204)
Production systems solve problems by forward inference (starting from facts), while Prolog programs
by backward inference (starting from goals).
Well-known production systems:
- CLIPS (C Language Integrated
Production System): a productive development and delivery expert system
tool which provides a complete environment for the construction of rule
and/or object based expert systems. Free software. Also see
Jess, a variant in Java.
- ART: ART*Enterprise
is an artificial intelligence application development environment. This
rules-based technology integrates various data sources - from structured
databases to unstructured documents - with business policies. Commercial
product.
- Soar: a general cognitive
architecture for developing systems that exhibit intelligent behavior.
Research software.
These systems more or less came from OPS5,
and provide "Expert-System Shells", into which concrete systems can be built by providing
problem-specific rules.
2. Expert system
An expert system is a computer program that represents and reasons with
knowledge of some specialist subject with a view to solving problems and
giving advice. Expert system, also called knowledge-based system, often take the form
of a production system. The basic assumption of knowledge-based system is that the power of the system
is mainly in its domain-specific knowledge, not in the domain-independent
logic and algorithms.
MYCIN
is an interactive program that diagnoses certain infectious diseases, prescribes
antimicrobial therapy, and can explain its reasoning in detail. In a controlled
test, its performance equaled that of specialists. The system represented
its knowledge as a set of IF-THEN rules with certainty factors. The following
is an English version of one of MYCIN's rules:
IF the infection is pimary-bacteremia
AND the site of the culture is one of the sterile sites
AND the suspected portal of entry is the gastrointestinal tract
THEN there is suggestive evidence (0.7) that infection is bacteroid.
The 0.7 is roughly the certainty that the conclusion will be true given
the evidence.
Another example: Insurance product recommendation. The system contains
rules for
- client classification according to input information,
- risk estimation according to client class and additional information,
- product matching according to class and risk,
- additional information acquisition and cost calculation,
- result display and explanation.
Recent example:
NASA Engineering Shuttle Telemetry Agent
Advantages of rule-based systems:
- modularity of the rules,
- knowledge driven execution,
- flexibility in execution order,
- closeness to natural language.
Weakness: complexity, efficiency.
Knowledge engineering: to collect expert knowledge, and to turn it into
rules. Trouble: the domain experts usually have problem to accurately describe
the "rules" they follow.
The Expert
Systems page at PC AI.
3. Case-based reasoning
Case-based reasoning (CBR) also depends
on domain-specific knowledge to solve problems. However, instead of depending
on general rules, it mainly depends on concrete cases, which are records
of typical problems and their solutions collected in the past. When a new
problem shows up, it is compared with the solved problems. After the most
similar case is located, the corresponding solution is adapted to the new
problem. It is "learning by remembering".
Crucial issues: how to represent and index a case, how to measure the
similarity between cases, how to adapt a solution to a new situation, and
so on.
Compared to rule-based systems, case-based systems use experience with
more details, though at the price of losing generality.
Suitable domain:
- A large volume of historical data already exists.
- Experts talk about their domain by giving examples.
- Experience is as valuable as textbook knowledge.
- Problems are not fully understood (weak models, little domain knowledge available).
- There are a lot of exceptions to rules.
- There is a need to build a corporate memory and transfer expertise among personnel.
4. KBS in Prolog
Section 15.3 describes a production system in Prolog.
Section 15.7.2 gives a shell for a rule-based expert system in Prolog.