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 34<br />

A Simple Model<br />

All production rule systems are based upon the same, very simple model.<br />

This is illustrated by the following flowchart.<br />

START<br />

Choose a<br />

rule ?<br />

No<br />

STOP<br />

Yes<br />

Yes<br />

Fire the<br />

rule ?<br />

No<br />

FAIL<br />

The basic cycle of all forward chaining engines involves the selection of a<br />

rule (checking the IF part), followed by the firing of that rule (executing the<br />

THEN part).<br />

When implemented as a Prolog program, the individual parts of the engine<br />

can either succeed or fail, as indicated by the alternative yes and no<br />

branches.<br />

The Implemented Model<br />

Forward chaining in <strong>flex</strong> is an elaboration of the simple model given above.<br />

The implemented model is closer to the following flowchart:<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!