Desingning FC Rule-Based Systems Designing Forward-Chaining Rule-Based Systems Instructor: Mr. Halavati By: Shahin Jabbari Arfaee Pooya Esfandiar 7/2/20151
Desingning FC Rule-Based Systems 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) 7/2/20152
Desingning FC Rule-Based Systems Tasks in Developing an FC System 1.Define the problem 2.Define input data 3.Define data-driven structure 4.Write initial code 5.Test the system 6.Design the interface 7.Expand the system 8.Evaluate the system 7/2/20153
Desingning FC Rule-Based Systems 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 7/2/20154
Desingning FC Rule-Based Systems 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 7/2/20155
Desingning FC Rule-Based Systems Manuals (Cont’d) 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 7/2/20156
Desingning FC Rule-Based Systems Manuals (Cont’d) 7/2/20157
Desingning FC Rule-Based Systems Manuals (Cont’d) 7/2/20158
Desingning FC Rule-Based Systems Manuals (Cont’d) 7/2/20159
Desingning FC Rule-Based Systems Task1 (Cont’d) Problem Specification After developing the system’s 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 won’t start” Address only “cranking system” problems 7/2/201510
Desingning FC Rule-Based Systems 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 start diagnosis IF Task IS begin THEN ASK Car problem Car won’t start Car hesitates at high speeds Car idles rough … 7/2/201511
Desingning FC Rule-Based Systems 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 7/2/201512
Desingning FC Rule-Based Systems Task 3: Define Data-Driven Structure (Cont’d) In our problem IF Task is test battery connection → TEST AND Lights do not brighten → RESULTS THEN Task is test battery → PROCEED TO 7/2/201513
Desingning FC Rule-Based Systems Task 4: Write Initial Code Determine if we have effectively captured the problem’s knowledge A good rule structure provides: – correct results – a template to follow rules RULE test cranking system IFCar problem IS car won’t start THEN Task IS test cranking system 7/2/201514
Desingning FC Rule-Based Systems Task 4: Write Initial Code (Cont’d) 7/2/201515
Desingning FC Rule-Based Systems Task 5: Test the System 7/2/ 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
Desingning FC Rule-Based Systems 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 7/2/201517
Desingning FC Rule-Based Systems Task 6: Design the Interface (Cont’d) Dynamic GUI ES’s were text based Today shells offer features to customize the interface 7/2/201518
Desingning FC Rule-Based Systems Task 6: Design the Interface (Cont’d) Dynamic Graphical Interface (Cont’d) Knowledge base contains: Information that is displayed on the interface FC rules that works with the information IF Inc Speed THEN Speed = Speed + 5 AND Speed increase IF Speed increase THEN Temperature = (Speed * 2) AND Oil pressure = (Speed * 0.5) /2/201519
Desingning FC Rule-Based Systems Task 6: Design the Interface (cont’d) Screen Contents Display Screens Introduction Screen Intermediate Finding Screen Conclusion Screen Question Screen 7/2/201520
Desingning FC Rule-Based Systems Task 6: Design the Interface (Cont’d) 7/2/201521
Desingning FC Rule-Based Systems Task 6: Design the Interface (Cont’d) 7/2/201522
Desingning FC Rule-Based Systems Task 7: Expand the System 7/2/ Developing additional rules! => additional screens
Desingning FC Rule-Based Systems 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! 7/2/201524
Desingning FC Rule-Based Systems Task 8: Evaluate the System (Cont’d) 7/2/201525
Desingning FC Rule-Based Systems Task 8: Evaluate the System (Cont’d) 7/2/201526
Desingning FC Rule-Based Systems 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. 7/2/201527
Desingning FC Rule-Based Systems Summary on FC design (Cont’d) Rules used in FC system keeps track of the state of the problem solving Design of the system’s interface should begin early in the project and develop in parallel 7/2/201528
Desingning FC Rule-Based Systems Thank you for your patience! Any Question?