Backward-Chaining Rule-Based Systems

Slides:



Advertisements
Similar presentations
Rule-based representation
Advertisements

STRONG METHOD PROBLEM SOLVING
Expert Systems Reasonable Reasoning An Ad Hoc approach.
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
1 Rule Based Systems Introduction to Production System Architecture.
Truth Maintenance Systems. Outline What is a TMS? Basic TMS model Justification-based TMS.
Expert Systems Reasonable Reasoning An Ad Hoc approach.
Reasoning Forward and Backward Chaining Andrew Diniz da Costa
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
Forward Chaining and Backward Chaining. Inference Engine cycles via a match-fire procedure Knowledge Base Database Fact:A isx MatchFire Fact:B isy Rule:
Inferences The Reasoning Power of Expert Systems.
ICT IGCSE Expert Systems.
Reasoning System.  Reasoning with rules  Forward chaining  Backward chaining  Rule examples  Fuzzy rule systems  Planning.
Intelligent systems Lecture 6 Rules, Semantic nets.
Rule Based Systems Michael J. Watts
Chapter 12: Expert Systems Design Examples
Rule Based Systems Alford Academy Business Education and Computing
System Architecture Intelligently controlling image processing systems.
PD1: Getting started.
Dealing with Uncertainty  The need to deal with uncertainty arose in “expert systems”  Code expertise into a computer system Example:  Medical diagnosis:
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
1 5.0 Expert Systems Outline 5.1 Introduction 5.2 Rules for Knowledge Representation 5.3 Types of rules 5.4 Rule-based systems 5.5 Reasoning approaches.
Lecture 04 Rule Representation
CIS 430 ( Expert System ) Supervised By : Mr. Ashraf Yaseen Student name : Ziad N. Al-A’abed Student # : EXPERT SYSTEM.
Artificial Intelligence CAP492
1 Chapter 9 Rules and Expert Systems. 2 Chapter 9 Contents (1) l Rules for Knowledge Representation l Rule Based Production Systems l Forward Chaining.
Rules and Expert Systems
© C. Kemke1Reasoning - Introduction COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
EXPERT SYSTEMS Part I.
Desingning FC Rule-Based Systems Designing Forward-Chaining Rule-Based Systems Instructor: Mr. Halavati By: Shahin Jabbari Arfaee Pooya Esfandiar 7/2/20151.
Inferencing using forward- and backward-chaining.
Bahar Qarabaqi Azar 19 th, FC Inferencing Initial information about the problem being asserted into working memory. Database Sensors User.
Building Knowledge-Driven DSS and Mining Data
Artificial Intelligence CSC 361
Strong Method Problem Solving.
Expert Systems Infsy 540 Dr. Ocker. Expert Systems n computer systems which try to mimic human expertise n produce a decision that does not require judgment.
1 Backward-Chaining Rule-Based Systems Elnaz Nouri December 2007.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
CS62S: Expert Systems Based on: The Engineering of Knowledge-based Systems: Theory and Practice A. J. Gonzalez and D. D. Dankel.
13: Inference Techniques
Explanation Facility دكترمحسن كاهاني
Course Instructor: K ashif I hsan 1. Chapter # 2 Kashif Ihsan, Lecturer CS, MIHE2.
School of Computer Science and Technology, Tianjin University
Knowledge based Humans use heuristics a great deal in their problem solving. Of course, if the heuristic does fail, it is necessary for the problem solver.
MYCIN Provided by: Sharif university Students Modified: Vali Derhami.
Chapter 9: Rules and Expert Systems Lora Streeter.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
1 CHAPTER 13 Decision Support Systems and Intelligent Systems, Efraim Turban and Jay E. Aronson 6th ed, Copyright 2001, Prentice Hall, Upper Saddle River,
CSE (c) S. Tanimoto, 2002 Expert Systems 1 Expert Systems Outline: Various Objectives in Creating Expert Systems Integration of AI Techniques into.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
CS62S: Expert Systems Based on: The Engineering of Knowledge-based Systems: Theory and Practice, A. J. Gonzalez and D. D. Dankel.
Inferencing in rule-based systems: forward and backward chaining.
Chapter 4: Inference Techniques
Artificial Intelligence
Expert System Seyed Hashem Davarpanah University of Science and Culture.
1 Chapter 13 Artificial Intelligence and Expert Systems.
Artificial Intelligence: Applications
Expert Systems. Knowledge base Inference engine ReasoningControl User interface user Components of an rule based Expert System.
Summary for final exam Agent System..
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Lecture 20. Recap The main components of an ES are –Knowledge Base (LTM) –Working Memory (STM) –Inference Engine (Reasoning)
Advanced AI Session 2 Rule Based Expert System
Artificial Intelligence, P.I
Chapter 9. Rules and Expert Systems
CS62S: Expert Systems Based on:
MYCIN  MYCIN was an early backward chaining expert system that used artificial intelligence to identify bacteria causing severe infections, such as bacteremia.
Introduction to Artificial Intelligence Lecture 15: Expert Systems
Expert Systems General Characteristics
Chapter 9. Rules and Expert Systems
Presentation transcript:

Backward-Chaining Rule-Based Systems Provided: Sharif Students Modified: Vali Derhami

Chapter 7 overview: Introduction Medical consultation systems Example 1:Meningitis Diagnosis Expert System Example 2:Meningitis Prescription Expert System Example 3:Alternative Prescription Expert System Automobile Diagnostic System Example 4:Automobile Diagnostic via a Blackboard Summary

Introduction The principle objective of backward chaining is to prove some goal or hypothesis The process begins by collecting GOAL RULES Goal Rules contain the goal proven in their THEN part The premise of the goal rules may be supported by other rules, so they are set as Sub-Goals The inference engine searches through the system’s rules in a recursive fashion.

Backward Chaining inference engine will reach some premise that is not supported by any of the system’s rules (a Primitive)  Ask User The answer is placed in the current memory The process continue until all goals and sub-goals are searched  memory contains all information provided by user and inferred by rules.

Medical Consultation Systems Like MYCIN , performs diagnosis for infectious blood diseases Unlike MYCIN , doesn’t identify organ but rather the nature of the infection 3 different expert systems: Diagnosis(تشخیص), Prescription (تجویز), Prescription Changes

Design Suggestion Divide Complex problems into smaller tasks and design system for each task.

Example 1: Megningitis Diagnosis Expert System The system has only one goal : Prove or disprove “Infection (عفونت یا مرض)is meningitis” One Goal rule : RULE 1 This can be proven if the user already knows that the patient has meningitis or the system can infer it. RULE 2,3,4 : search the test results RULE 5 : searches the area of patient symptoms

Meningitis diagnosis rules Culture :کشت

Medical Diagnosis Example Session Begins with empty working memory STEP 1: Find rules with hypothesis in “THEN” part RULE 1 STEP 2: see if first premise in RULE 1 is listed in working memory NO STEP 3: see if this premise exists in “THEN” part of any rule

STEP 4: This premise is a primitive Question : “Do you know if patient has Meningitis ?” Answer : NO Working Memory: Patient known to have Meningitis - FALSE STEP 5: look at second premise in RULE 1 and see if it’s in working memory NO STEP 6: see if this premise exists in “THEN” part of any rule RULE 2 نحوه تولید سوال: خود سیستم سوال را تولید کند هر مقدمی که میخواهد سوال شود قبلا سوالش اضافه شده باشد

STEP 7: see if first premise in RULE 2 is listed in working memory NO STEP 8: see if this premise exists in “THEN” part of any rule RULE 3 STEP 9: Q: Were test run? USER: YES STEP 10: Q: Were cultures seen? USER:YES STEP 11: Q: The appearance of the culture is coccus? USER: WHY System: This will aid in determining if cultures look like Meningitis نحوه تولید سوال: خود سیستم سوال را تولید کند هر مقدمی که میخواهد سوال شود قبلا سوالش اضافه شده باشد

STEP 11: Q: The appearance of the culture is coccus (نوعی باکتری )? USER: WHY System: This will aid in determining if cultures look like meningitis RULE 4 STEP 12: USER : WHY 4.0 System: This will determining if “we suspect meningitis from test results” RULE 3 STEP 13: System: The appearance of the culture is coccus? USER: NO

Working Memory Tests Run-TRUE Cultures Seen-TRUE Patient known to have meningitis-FALSE Tests Run-TRUE Cultures Seen-TRUE Appearance of cultures is coccus-FALSE The system was unsuccessful in establishing meningitis from test results

STEP 15: see if this premise exists in “THEN” part of any rule STEP 14: look at second premise in RULE 2 and see if it’s in working memory NO STEP 15: see if this premise exists in “THEN” part of any rule RULE 5 STEP 16: All premises of RULE 5 are unknown and primitives Questions SYSTEM: Has the patient been suffering persistent headaches (سردرد)? USER: YES

STEP 17: RULE 5 fires RULE 2 fires RULE 1(Goal Rule) fires SYSTEM: Has the patient been suffering dizziness(سرگیجه)? USER: YES SYSTEM: Has the patient been lethargic(بی حس و حال)? STEP 17: RULE 5 fires RULE 2 fires RULE 1(Goal Rule) fires SYSTEM: “After considering your info, I believe the infection is Menningitis.”

Example Review Simple Goal Simple Questions Depth First Search Intelligent User Safety Net: Using “Display” command نمایش نتایج میانی Ease of Expansion Documenting of Rules Inference Network

Inference network Graphical representation of the systems’ rules with the premises and conclusions of the rules drawn as nodes and their supporting relationships drawn as links

Example 2: Meningitis Prescription Expert System Prescription task: formulate action needed to correct the fault Problem Solving Approach : - The rules are shown in next slide. - We have one goal to prove : “Prescription is ? Prescription” 2 goal rules : RULES 1 ( higher priority ) and 2 RULE 3 : patient’s age

Meningitis prescription rules

Medical Prescription Example Session The fact that patient has meningitis is known GOAL : )Prescription is ? )Determine proper series of drugs STEP 1: Find rules with hypothesis in “THEN” part RULE 1 and RULE 2 STEP 2: chose RULE 1 because of higher priority and see if first premise in RULE 1 is listed in working memory YES STEP 3: see if the second premise of RULE 1 exists in working memory NO

STEP 4: see if this premise exists in “THEN” part of any rule STEP 5: see if this premise of RULE 3 is listed in working memory NO STEP 6: see if this premise exists in “THEN” part of any rule

STEP 7: This premise is a primitive Question : “What is the patient’s age?” Answer : 8 STEP 8: Rule 3 fires (patient is a child)  Rule 1 also fires SYSTEM : “My first recommendation is this : Ampicillin --- Dose : 3.8 g Gentamicin --- Dose : 131 mg ”

STEP 9: USER: HOW SYSTEM : To drive goal ”Prescription is ? Prescription” I considered: -RULE1(1.1 is known to be true) -To drive 1.2 I considered RULE3 -To drive 3.1 I asked you. your answer was 8. -RULE 3 was concluded. -RULE 1 was concluded.

Example Review Variable goal Rule priorities Accommodating user Numeric Relationships

Example 3: Alternative Prescription Expert System Non-Monotonic Reasoning : facts that are logically dependent on other facts that have been retracted can be retracted. Retract () Logical () Database Access: - Using existing knowledge - Using general knowledge

Prescription change rules

Prescription change rules

Prescription change functions Display current drugs Determine deleted drugs Determine substituted drugs Determine if drug is effective Determine if drug is safe Compare ages Try another drug: Using “CYCLE” command Remember facts Recycle

Alternative Prescription Example Session Drug recommendation AMPICILIN-TRUE Drug recommendation GENTAMICIN-TRUE GOAL: allow user choose alternative drug SYSTEM: do you want to consider another prescription? USER: YES SYSTEM: which one do you want to delete? USER: ampicilin SYSTEM: what drug do you want to add? USER: stremptomycin

SYSTEM: The requested drug comes from class AMINOGLYCOSIDES and would not be effective. you could try another drug. USER: PENICILIN SYSTEM: The requested drug comes from class PENNICILLINS and would be an effective replacement for AMPICILLIN which also comes from PENNICILLINS.

Example Review Ease of modification General knowledge Monotonic Reasoning Non-Monotonic Reasoning

Automobile Diagnosis System Design Suggestion: For problems that require expertise from more than one individual, develop separate expert systems that capture the expertise of each individual. Blackboard: The mean for information exchange when the ES is designed to incorporate separate expert modules.

Example 4: Automobile Diagnostics Expert System Blackboard:

Example 4: Automobile Diagnostics Expert System Object Attribute Value: allows you to display to user a menu of possible values.

Automobile Diagnostics Example Session SYSTEM: please tell me whether the engine WILL START,WON’T START? USER: won’t start SYSTEM: please tell me whether the starter DOES TURN,DOESN’T TURN? USER: does turn SYSTEM: the engine turns VERY SLOWLY, NORMALLY BUT WON’T START? USER: normally but won’t start

SYSTEM: I believe the problem might be with the FUEL SYSTEM SYSTEM: I believe the problem might be with the FUEL SYSTEM. I will check with my expert in this area. SYSTEM: The fuel gage DOESN’T MOVE,DOES MOVE? USER: does move SYSTEM: The car will START OCCASIONALLY, NEVER STARTS? USER: star occasionally

SYSTEM: After working on your problem it is my belief that your car has problem with the FUEL SYSTEM. The specific problem is DIRTY CARBURETOR. My recommendation is REBUILD THE CARBURETOR. The cost for such repair is 100 dollars.

Example Review Separate Systems Meta Rules Display of intermediate findings Blackboard O-A-V facts Initializing knowledge: INIT , REINIT Intelligent Safety Net Reinit , init در بعضی از پوسته های یکسان هستند ولی بعضا reinit وقتی عمل میکند که سیستم د رابتدا با دستور chain فراخوانی میشود

Summary on Backward Chaining Expert Systems BC attempts to prove a goal by recursively moving back through the rules in search of supporting evidence To ease the development and maintenance of these systems, design them in modular form Care should be given to provide clear final displays and keeping user informed

The user should allow user to provide known information and avoid unnecessary search by the system Some intelligent findings should be provided even if the system is not totally successful Database information should be used Cooperating expert systems modules communicate over a structure known as Blackboard

تمرين: 3 نمونه از كاربردهاي سيستم هاي خبره كه در مقالات يا گزارشات علمي آمده است را با توضيح در حدود 10 خط براي هر مورد بيان كنيد.