REASONINC IN RULE-BASED SYSTEMS
11.9 REASONINC IN RULE-BASED SYSTEMS
Once the knowledge representation in the knowledge base is completed, or is at least at a sufficiently high level of accuracy, it is ready to be used. A computer program is needed to access the knowledge for making inferences. This program is an algorithm that controls a reasoning process and is usually called the inference engine or the control program. In rule-based systems, it is also called the rule interpreter.
The inference engine directs the search through the knowledge base, a process that may involve the application of inference rules in what is called pattern matching. The control program decides which rule to investigate, which alternative to eliminate, and which attribute to match. The most popular control programs for rule-based systems, forward and backward chaining, are described in the next section.
Before we investigate the specific inferencing techniques used in expert systems, it is interesting to examine how people reason, which is what AI attempts to mimic. There are several ways people reason and solve problems. An interesting view of the problem-solving process is one in which they draw on "sources of power." Lenat (1982) identified nine such sources:
1. Formal reasoning methods (e.g., logical deduction)
2. Heuristic reasoning, or IF-THEN rules
3. Focus, or common sense applied to specific goals
4. Divide and conquer, or dividing complex problems into subproblems (sometimes called chunking)
5. Parallelism-neural processors (perhaps a million) operating in parallel
6. Representation, or ways of organizing pieces of information
7. Analogy, or the ability to associate and relate concepts
8. Synergy, in which the whole is greater than the sum of its parts .
9. Serendipity, or fortuitous accidents. These sources of power range from the purely deductive reasoning best handled by
computer systems to inductive reasoning, which is more difficult to computerize. Lenat
CHAPTER 11 KNOWLEDGE ACQUISITION, REPRESENTATION, AND REASONING
Method
Description
Deductive reasoning Move from a general principle to a specific inference. A general principle is composed of two or more premises.
Inductive reasoning Move from some established facts to draw general
conclusions.
Analogical reasoning Derive an answer to a question by known analogy. It is a verbalization of internalized learning process (Owen, 1990). Use of similar past experiences.
Formal reasoning Syntactic manipulation of a data structure to deduce new facts following prescribed rules of inferences (such as predicate calculus).
Procedural (numeric) reasoning Use of mathematical models or simulation (such as model-based reasoning, qualitative reasoning, and temporal reasoning, or the ability to reason about the time relationships between events).
Metalevel reasoning Knowledge about what is known (e.g., about the importance and relevance of certain facts and rules).
only begun to be exploited. These sources of power are translated to specific reasoning or inference methods as summarized in Table 11.11.
Inferencing with rules involves the implementation of modus ponens, which is reflected in the search mechanism. Consider the following example:
Rule 1: IF an international conflict begins, THEN the price of gold will go up.
Let us assume that the ES knows that an international conflict has just started. This information is stored as a fact in the database (or assertion base), which means that the premise (the IF part) of the rule is true. With modus ponens, the conclusion is then accepted as true -, We say that Rule 1 fires. Firing a rule occurs only when all the rule's hypotheses (conditions in the IF part) are satisfied (evaluated to be true). Then the conclusion drawn is stored in the assertion base. In our case, the conclusion (the price of gold will go up) is added to the assertion base and can be used to satisfy the premise of other rules. The true (or false) values for either portion of the rules can be obtained by querying the user or by checking other rules. Testing a rule premise or conclusion can be as simple as matching a symbolic pattern in the rule to a similar pattern in the assertion !base. This activity is called pattern matching.
Every rule in the knowledge base can be checked to see whether its premise or conclusion can be satisfied by previously made assertions. This process can be done in one of two directions, forward or backward, and continues until no more rules can fire or until
a goal is achieved. There are two methods for controlling inference in rule-based ES: forward chaining and backward chaining (each of which has several variations). First, we provide an intuitive description of the two methodsrthen we discuss them in detail.
EXAMPLE 1
Suppose you want to fly from Denver to Tokyo and there are no direct fights between
the two cities. Therefore, you try to find a chain of connecting flights starting from Denver and ending in Tokyo. There are two basic ways you can search for