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.

1. Introduction 10<br />

Forward Chaining<br />

Forward chaining production rules in <strong>flex</strong> follow the classical if-then rule<br />

format. Forward chaining is data-driven and is very suitable for problems<br />

which involve too many possible outcomes to check by backward chaining,<br />

or where the final outcome is not known.<br />

The forward chaining inference engine cycles through the current rule<br />

agenda looking for rules whose if conditions can be satisfied, and selects a<br />

rule to use or fire by executing its then part. This typically side affects data<br />

values, which means that a different set of rules now have their conditions<br />

satisfiable.<br />

Flex extends the classical production rule with an optional explanation<br />

facility and dynamic scoring mechanism for resolving conflicts during rule<br />

selection. Rules can have multiple conclusions or actions (either positive or<br />

negative) in their then part .<br />

The rule selection and agenda update algorithms of the forward chaining<br />

engine are <strong>flex</strong>ible, with many built-in algorithms and the option of applying<br />

user-defined algorithms.<br />

Backward Chaining<br />

Search<br />

Backward chaining rules, which correspond closely to Prolog predicates, are<br />

called relations in <strong>flex</strong>. They have a single conclusion that is true, if all the<br />

conditions can be proven. Backward chaining is often referred to as goaldriven,<br />

and is closely linked to the notion of provability.<br />

Search is one of the key characteristics of expert systems. There are<br />

normally many ways of combining or chaining rules together with data to<br />

infer new conclusions. How to examine only the relevant part of this search<br />

space is a serious consideration with regard to efficiency. The ordering of<br />

rules, the provision of meta-rules (rules about which rules to use) and<br />

conflict-resolution schemes are all ways of helping us produce a sensible<br />

search tree which we can investigate. Prolog-based systems tend to use a<br />

depth-first strategy, whereby a certain path is fully explored by checking<br />

related paths, combined with backtracking to go back and explore other<br />

possibilities when a dead-end is reached.<br />

Frames and Inheritance<br />

Frame hierarchies are similar to object-oriented hierarchies. They allow data<br />

to be stored in an abstract manner within a nested hierarchy with common<br />

properties automatically inherited through the hierarchy. This avoids the<br />

unnecessary duplication of information, simplifies code and provides a more<br />

readable and maintainable system.<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!