Download presentation
Presentation is loading. Please wait.
Published byGabriella Sims Modified over 9 years ago
1
1 Basic Architecture of an Expert System
2
2 Knowledge base - contains the domain specific problem-solving knowledge. Facts - represent what we know at any time about the problem we are working at. Rules - represent relationships between the facts. Inference engine - is a general program that activates the knowledge in the knowledge base. Interface enables the user to communicate with the expert system.
3
3 Rule-Based Expert Systems Based on the production system concept. Rules IF the engine is getting gas AND the engine will turn over THEN the problem is spark plugs Facts The engine is getting gas Conclusion: –action –employ a particular model –execute a procedure –display a report
4
4 Inference Engine (1)Selection of rule candidates: pattern matching (2)Choice of one rule: conflict resolution (3)Execution: deduction
5
5 Backward chaining (goal driven): the inference engine works backward from a conclusion to be proven to determine if there are data in the workspace to prove the truth of the conclusion. Example. Rule baseWorkspace R1:IF A AND B THEN DA,B R2:IF B THEN C R3: IF C AND D THEN E
6
6 Example. Expert system for diagnosing car problems. Rule 1: IF the engine is getting gas AND the engine will turn over THEN the problem is spark plugs Rule 2: IF the engine does not turn over AND the lights do not come on THEN the problem is battery or cables. Rule 3: IF the engine does not turn over AND the lights do come on THEN the problem is the starter motor. Rule 4: IF there is gas in the fuel tank AND there is gas in the carburettor THEN the engine is getting gas
7
7 The problem is X Rule 1 Rule 2 Rule 3 Rule 4 the engine is getting gas the engine will turn over the problem is spark plugs Rule 1 Rule 2 Rule 3 Rule 4 Working space
8
8 gas in fuel tank gas in carburettor the engine is getting gas the engine will turn over the problem is spark plugs Rule 1 Rule 2 Rule 3 Rule 4 Working space
9
9 Explanation in Backward Chaining Why? gas in fuel tank? yes gas in carburettor? yes engine will turn over? why It has been established that: 1. the engine is getting gas, therefore if 2. the engine will turn over, then the problem is spark plugs
10
10 How? how the engine is getting gas This follows from rule 4: IF there is gas in the fuel tank AND there is gas in the carburettor THEN the engine is getting gas gas in fuel tank was given by the user gas in carburettor was given by the user
11
11 Exercise. Rule 1IF blood pressure is likely to be high THEN risk of heart failure is high Rule 2IF blood pressure is likely to be low THEN risk of heart failure is low Rule 3IF alcohol consumption is high AND patient salt intake is high THEN blood pressure is likely to be high Rule 4IF alcohol consumption is low AND patient salt intake is low THEN blood pressure is likely to be low Rule 5IF units of alcohol per week are > 30 THEN alcohol consumption is high Rule 6IF units of alcohol per week are < 20 THEN alcohol consumption is low Rule 7IF units of alcohol per week are >= 20 AND <+ 30 THEN alcohol consumption is average Goal: determine a patient's risk of heart failure Questions: units of alcohol >30, salt intake high
12
12 Forward chaining (data driven): the inference engine works from the initial content of the workspace towards the final conclusion. Example. Rule baseWorkspace R1:IF A AND B THEN DA,B R2:IF B THEN C R3: IF C AND D THEN E
13
13 Rule 1 Rule 2 Rule 3 Rule 4 the engine turns over Rule 1 Rule 2 Rule 3 Rule 4 Working space Example. Expert system for diagnosing car problems.
14
14 The engine is getting gas There is gas in the fuel tank There is gas in the carburettor The engine turns over Rule 1 Rule 2 Rule 3 Rule 4 Working space
15
15 Explanation in Forward Chaining Why? The current rule under consideration is presented. How? More difficult than in backward chaining.
16
16 Example R1:IF management competence is good AND External credit rating is fair AND Bank's credit rating is marginal THEN Loan is rejected R2:IF Loan type is seasonal AND Profitability rating is high AND Solvency rating is low THEN Bank's credit rating is marginal R3:IF Cash/current liabilities > 0.1 AND Tentative solvency rating is low THEN Solvency rating is low Bank's credit ratingUNKNOWN Cash/current liabilities0.18 External credit ratingFAIR LoanSEASONAL Loan typeUNKNOWN Management competenceUNKNOWN Profitability ratingHIGH Solvency ratingUNKNOWN Tentative solvency ratingLOW
17
17 – Choosing between backward and forward chaining.
18
18 Hybrid Expert System Architecture
19
19 Example 1. IF WEIGHT of MY-FORD > 3,000 pounds THEN set DETOUR AROUND RICKETY BRIDGE Example 2. IF ?VEHICLE is instance-of AUTOMOBILES AND ?VEHICLE has-a ?ENGINE AND ?ENGINE is instance-of DIESEL THEN set REFUEL of ?VEHICLE to TRUCKSTOP
20
20 SUMMARY The major components of an expert system are the knowledge base, inference engine, and user interface. Rule-based expert systems are introduced. There are two approaches for controlling inference in rule-based expert systems: forward chaining and backward chaining.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.