You are on page 1of 29

Designing ForwardChaining Rule-Based

Systems
Instructor:
Mr. Halavati
By:
Shahin Jabbari Arfaee
Pooya Esfandiar

03/18/15

Desingning FC Rule-

Introduction
General Design Methodologies for FC
Systems
Project objective definition
The major issues
How experts recommend using available information
Development tasks

Automobile Diagnostics Domain


Most diagnostic ES used BC because most problems
had a finite number of possible faults
Diagnostic problem with an automobile (many
possible faults)
03/18/15

Desingning FC Rule-

Tasks in Developing an FC
System
1.
2.
3.
4.
5.
6.
7.
8.

Define the problem


Define input data
Define data-driven structure
Write initial code
Test the system
Design the interface
Expand the system
Evaluate the system

03/18/15

Desingning FC Rule-

Task 1: Define the Problem


The initial design step like BC
In our problem: learn about automobile
diagnostics by locate a good car
mechanic as an expert
Alternative approach: use a
troubleshooting manual probably
written by an expert

03/18/15

Desingning FC Rule-

Manuals
Repair Manuals
For many diagnostic problems
Can aid problem troubleshooting
Step-by-step series of test to isolate the
problem

Shortcomings:
The manual must be readily available
The manual must be easy to follow
Some one must maintain the manual
03/18/15

Desingning FC Rule-

Manuals (Contd)
Auto Repair Manuals
Many excellent ones exist
Help to identify and repair various car
problems
Most have a troubleshooting section
The troubleshooting section is divided
according to the principal problems

03/18/15

Desingning FC Rule-

Manuals (Contd)

03/18/15

Desingning FC Rule-

Manuals (Contd)

03/18/15

Desingning FC Rule-

Manuals (Contd)

03/18/15

Desingning FC Rule-

Task1 (Contd)
Problem Specification
After developing the systems structure to
address this problem, we should have a good
idea of how to manage other possible car
problems
Our problem specification:
Address problem associated with engine wont start
Address only cranking system problems

03/18/15

Desingning FC Rule-

10

Task 2: Define Input Data


Every FC system need some initial data to
get started
Write rules whose only task is to ask for
some information about the question
Rule 1
IF
THEN

start diagnosis
Task IS begin
ASK Car problem

Car wont start


Car hesitates at high speeds
Car idles rough

03/18/15

Desingning FC Rule-

11

Task 3: Define Data-Driven


Structure
FC system works by firing rules (using
working memory)
IF
A
THEN Infer or do something

Adequate result in small applications


Manual => Decision Tree => Rules

03/18/15

Desingning FC Rule-

12

Task 3: Define Data-Driven


Structure (Contd)
In our problem
IF
Task is test battery connection
TEST
AND Lights do not brighten RESULTS
THEN Task is test battery

PROCEED TO

03/18/15

Desingning FC Rule-

13

Task 4: Write Initial Code


Determine if we have effectively captured
the problems knowledge
A good rule structure provides:
correct results
a template to follow rules
RULE
IF
THEN
03/18/15

test cranking system


Car problem IS car wont start
Task IS test cranking system
Desingning FC Rule-

14

Task 4: Write Initial Code


(Contd)

03/18/15

Desingning FC Rule-

15

Task 5: Test the System


Typical Tests
A snapshot:
System: Please turn on the ignition.
How does the engine turn?
1) Slowly or not at all
2) Normally
User: Normally
03/18/15

Desingning FC Rule-

16

Task 6: Design the Interface


Attention to Interface after most of
knowledge base has been complete
Begin early and develop it in parallel
with the development of knowledge
base

03/18/15

Desingning FC Rule-

17

Task 6: Design the Interface


(Contd)
Dynamic GUI
ESs were text based
Today shells offer
features to customize
the interface

03/18/15

Desingning FC Rule-

18

Task 6: Design the Interface


(Contd)
Dynamic Graphical Interface
Knowledge base contains:
(Contd)
Information that is displayed on the interface
FC rules that works with the information
IF
THEN
AND

Inc Speed
Speed = Speed + 5
Speed increase

IF
THEN
AND

Speed increase
Temperature = (Speed * 2) + 200
Oil pressure = (Speed * 0.5) + 40

03/18/15

Desingning FC Rule-

19

Task 6: Design the Interface


(contd)
Screen Contents
Display Screens
Introduction Screen
Intermediate Finding Screen
Conclusion Screen

Question Screen

03/18/15

Desingning FC Rule-

20

Task 6: Design the Interface


(Contd)

03/18/15

Desingning FC Rule-

21

Task 6: Design the Interface


(Contd)

03/18/15

Desingning FC Rule-

22

Task 7: Expand the System


Developing additional rules!
=> additional screens

03/18/15

Desingning FC Rule-

23

Task 8: Evaluate the System


The evaluation is concerned with
testing the prototype with some real
test case
Turn to our Expert for the test case!

03/18/15

Desingning FC Rule-

24

Task 8: Evaluate the System


(Contd)

03/18/15

Desingning FC Rule-

25

Task 8: Evaluate the System


(Contd)

03/18/15

Desingning FC Rule-

26

Summary on FC design
The design of FC expert systems is a
highly iterative process.
The systems should be tested
immediately after introduction of new
rules
FC inference is preferred over BC if
either the goals are not known a priori
or their number is very large.
Defining the initial data is the starting
point for a FC design process.
03/18/15

Desingning FC Rule-

27

Summary on FC design
(Contd)

Rules used in FC system keeps track of


the state of the problem solving
Design of the systems interface should
begin early in the project and develop
in parallel

03/18/15

Desingning FC Rule-

28

Thank you for your


patience!
Any Question?

Desingning FC Rule-

You might also like