Documente Academic
Documente Profesional
Documente Cultură
FUNDAMENTALS OF ARTIFICIAL
INTELLIGENCE
Lecture 9
PRODUCTION SYSTEMS
2. Working memory
2/16
Definition (2)
A production or a rule is condition-action pair presented in the
following form:
3. If several rules match the pattern, the conflict set appears. The
production rules in the conflict set are said to be enabled .
Selection of one rule from the conflict set is called conflict
resolution .
4/16
Pattern-directed search (2)
Operation of the recognize-act cycle are based on the pattern-
directed search (continued):
4. One of the enabled rules is fired and it changes the content of
the working memory
5/16
Control of search in production
systems
For real world problems a knowledge base typically includes a huge
number of IF...THEN... rules. In order to make search more effective,
developers of intelligent systems must use heuristic control of search.
6/16
Control through choice of search
strategy (1)
It is possible to choose a direction of search in production systems:
1. Data-driven search (forward chaining)
3. Firing a rule, its THEN part is added to the working memory and the
process continues
Knowledge base:
1. IF A THEN B Start - A
2. IF B THEN C AND D Goal - I
3. IF C THEN E
4. IF E THEN F
5. IF C AND D THEN G
6. IF G AND F THEN H AND I
Goal-driven search:
3. Firing a rule, its IF part is added to the working memory and the
process continues
10/16
Control through choice of search
strategy (5)
Example:
Goal-driven search
Knowledge base:
1. IF p AND q THEN goal
2. IF r AND s THEN p
3. IF w AND r THEN q
4. IF t AND u THEN q
5. IF v THEN s
6. IF start THEN v AND r AND q
12/16
Control through rule structure (2)
RULE STRUCTURE
+
RULE ORDER IN THE KNOWLEDGE BASE
13/16
Control through rule structure (3)
RULE STRUCTURE
14/16
Control through rule structure (4)
RULE ORDER
1. RULE A 1. RULE E
2. RULE B 2. RULE B
3. RULE C 3. RULE D
4. RULE D 4. RULE A
5. RULE E 5. RULE C
15/16
Control through conflict resolution
The simplest strategy is to choose the first rule that matches the content of the
working memory and do not use recently fired rules.
Common strategy:
1. Once a rule has fired, it may not fire again until the working memory
elements that match its conditions have been modified, this discourages
looping.
2. Rules whose conditions match with the patterns most recently added to
the working memory are more preferred. This focuses the search on a
single line of reasoning.
3. A more specific problem-solving rule is preferred to a general rule. A
rule is more specific than another if it has more conditions.
IF a THEN c
IF a AND b THEN c more specific rule
16/16