Título

Páginas: 2 (387 palabras) Publicado: 13 de diciembre de 2012
2.3.1 The inference engine
If you wanted to write your own rule engine, where would you start? You might
begin with the most important component. The primary business of a rule
engine is to applyrules to data. That makes the inference engine the central part
of a rule engine.
The inference engine controls the whole process of applying the rules to the
working memory to obtain the outputsof the system. Usually an inference
engine works in discrete cycles that go something like this:
1 All the rules are compared to working memory (using the pattern matcher)
to decide which onesshould be activated during this cycle. This unordered
list of activated rules, together with any other rules activated in previous
cycles, is called the conflict set.
2 The conflict set is ordered toform the agenda—the list of rules whose
right-hand sides will be executed, or fired. The process of ordering the
agenda is called conflict resolution. The conflict resolution strategy for a
givenrule engine will depend on many factors, only some of which will
be under the programmer’s control.
3 To complete the cycle, the first rule on the agenda is fired (possibly
changing the workingmemory) and the entire process is repeated. This
Figure 2.1
The architecture of a typical
rule-based system. The patternmatcher
applies the rules in the
rule-base to the facts in working
memory toconstruct the
agenda. The execution engine
fires the rules from the agenda,
which changes the contents of
working memory and restarts
the cycle.
Architecture of a rule-based system 21
repetitionimplies a large amount of redundant work, but many rule
engines use sophisticated techniques to avoid most or all of the redundancy.
In particular, results from the pattern matcher and from theagenda’s conflict resolver can be preserved across cycles, so that only the
essential, new work needs to be done.
Many beginning rule programmers have difficulty with the idea that the rule
engine...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • titulo del titulo
  • Titulo
  • Titulos
  • El titulo
  • Titulo
  • Soy un titulo
  • Sin titulo
  • Titulos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS