24.11.2014 Views

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3. Forward Chaining 37<br />

The Rule Agenda<br />

The rule agenda determines the rules currently available to the inference<br />

engine during forward chaining (initially specified by a ruleset). It might<br />

include all of the rules in the system, or only a subset.<br />

The rule agenda may contain duplicates, and there are no restrictions<br />

whatsoever on which names can go into the list.<br />

After a rule has been selected and fired, the rule agenda may be updated,<br />

and it is this revised agenda that the inference engine uses as the basis for<br />

the next cycle.<br />

Setting The Initial Rule Agenda<br />

The initial rule agenda is the set of rules from which the forward chaining<br />

engine makes its first selection. The initial rule agenda may be specified as<br />

containing all rules, a list of rules or a rule group.<br />

The only mandatory part of a given ruleset is the definition of the initial<br />

rule agenda.<br />

ruleset everything<br />

contains all rules .<br />

This KSL sentence sets the initial rule agenda to contain all the rules<br />

currently defined.<br />

Selecting Rules<br />

A vital part of any engine, whether forward or backward chaining, is the<br />

method by which rules are selected. <strong>flex</strong> provides three built-in methods for<br />

selecting rules:<br />

First come first served<br />

Conflict resolution<br />

Conflict resolution with a threshold.<br />

In addition, there is a facility for hooking in user-defined selection<br />

algorithms.<br />

<strong>flex</strong> toolkit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!