Knowledge-Based System
Some AI techniques use reasoning and search on domain-specific knowledge, where the focus is more on the domain knowledge than on the (domain-independent) inference rules or search algorithms. Such systems are often called knowledge-based systems, and each usually consists of a knowledge-base and an inference engine.
A production rule has the format
C1, ..., Cm → A1, ..., Anwhich means that if conditions C1, ..., Cm are satisfied, then the action sequence A1, ..., An can be performed (though the system does not have to do so). In this form, declarative knowledge (condition) and procedural knowledge (action) are related to each other, similar to an "if-then" statement or a Prolog "rule" (e.g., Datalog).
A production system has a rule base (domain knowledge in long-term memory) and a database (a problem instance in working memory). In each step, a rule from the former is "fired" to modify the latter, like a STRIPS operator. If there are multiple rules whose conditions are satisfied, a control mechanism decides which one to fire, i.e., to perform its 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
Example: 8-puzzle revisited
Therefore, the contral mechanism can be seen as a form of state-space search.
The following are some representative "production system shells" which can be filled in domain knowledge:
Crucial issues in CBR include 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. A suitable domain for CBR typically has the following properties:
As a well-known example, 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 primary-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.Here the 0.7 is the "certainty factor" of the conclusion.
Another example: Insurance product recommendation. The system contains rules for
Various expert systems have been developed for a wide range of practical problems. Different from conventional systems (of procedural programs), expert systems typically represent domain knowledge declaratively, and relatively separate knowledge content (in the knowledge-base) and knowledge usage (by the inference engine). Such systems have the following advantages:
Here is an eBook on Building Expert Systems in Prolog.