1 Intelligent Systems and Control Rule-based expert systems n Introduction, or what is knowledge? n Rules as a knowledge representation technique n The.

Slides:



Advertisements
Similar presentations
Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Advertisements

BEE4333 Intelligent Control
1 Rule Based Systems Introduction to Production System Architecture.
Rulebase Expert System and Uncertainty. Rule-based ES Rules as a knowledge representation technique Type of rules :- relation, recommendation, directive,
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:
Supporting Business Decisions Expert Systems. Expert system definition Possible working definition of an expert system: –“A computer system with a knowledge.
Inferences The Reasoning Power of Expert Systems.
Intelligent systems Lecture 6 Rules, Semantic nets.
Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,
Rule Based Systems Michael J. Watts
Artificial Intelligence Lecture No. 16
Chapter 12: Expert Systems Design Examples
Rule Based Systems Alford Academy Business Education and Computing
Intelligent Systems and Soft Computing
FT228/4 Knowledge Based Decision Support Systems Rule-Based Systems Ref: Artificial Intelligence A Guide to Intelligent Systems Michael Negnevitsky – Aungier.
Rule-based expert systems
Introduction to Expert Systems
 Negnevitsky, Pearson Education, Lecture 2 Rule-based expert systems n Introduction, or what is knowledge? n Rules as a knowledge representation.
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
Designing A KBS Rulebase Expert System Uncertainty Management
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.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
Intelligent Systems AME 498G/598I. Expert Systems Expert systems uses expert knowledge. Expert knowledge is not limited to books. It can also be privileged.
EXPERT SYSTEMS Part I.
Building Knowledge-Driven DSS and Mining Data
Artificial Intelligence CSC 361
Sepandar Sepehr McMaster University November 2008
© Negnevitsky, Pearson Education, Lecture 2 Introduction, or what is knowledge? Introduction, or what is knowledge? Rules as a knowledge representation.
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Rule-Based Expert Systems
Rule-based Knowledge (Expert) Systems
IDDS: Rules-based Expert Systems
School of Computer Science and Technology, Tianjin University
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 
Knowledge and Expert Systems
Artificial Intelligence Lecture No. 13 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Rule-Based Expert System Aziz Kustiyo Departemen Ilmu Komputer FMIPA IPB 2011.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
ES component and structure Dr. Ahmed Elfaig The production system or rule-based system has three main component and subcomponents shown in Figure 1. 1.Knowledge.
COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre
Rule Based Expert System دكترمحسن كاهاني
 Negnevitsky, Pearson Education, Introduction, or what is knowledge? Knowledge is a theoretical or practical understanding of a subject or a domain.
Of An Expert System.  Introduction  What is AI?  Intelligent in Human & Machine? What is Expert System? How are Expert System used? Elements of ES.
Lecture 2 Introduction, or what is knowledge? Introduction, or what is knowledge? Rules as a knowledge representation technique Rules as a knowledge representation.
Artificial Intelligence
Forward and Backward Chaining
Expert System Seyed Hashem Davarpanah University of Science and Culture.
Knowledge Engineering. Review- Expert System 3 Knowledge Engineering The process of building an expert system: 1.The knowledge engineer establishes a.
Artificial Intelligence Lecture No. 14 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
EXPERT SYSTEMS BY MEHWISH MANZER (63) MEER SADAF NAEEM (58) DUR-E-MALIKA (55)
Lecture 20. Recap The main components of an ES are –Knowledge Base (LTM) –Working Memory (STM) –Inference Engine (Reasoning)
Knowledge and Expert Systems
Advanced AI Session 2 Rule Based Expert System
Intelligent Systems and Soft Computing
Lecture #1 Introduction
CHAPTER 1 Introduction BIC 3337 EXPERT SYSTEM.
Chapter 9. Rules and Expert Systems
Rule-based Expert Systems
Rule-based expert systems
Introduction to Expert Systems Bai Xiao
Architecture Components
CS62S: Expert Systems Based on:
Chapter 9. Rules and Expert Systems
08th September 2005 Dr Bogdan L. Vrusias
Presentation transcript:

1 Intelligent Systems and Control Rule-based expert systems n Introduction, or what is knowledge? n Rules as a knowledge representation technique n The main players in the development team n Structure of a rule-based expert system n Characteristics of an expert system n Forward chaining and backward chaining n Conflict resolution n Summary

Introduction, or what is knowledge? n Knowledge : theoretical or practical understanding of a subject or a domain. n sum of what is currently known, and apparently knowledge is power. n Domain expert: a person with deep knowledge (of both facts and rules) and strong practical experience in a particular domain. n In general, an expert is a skilful person who can do things other people cannot. n The area of the domain may be limited.

n The human mental process is internal, and it is too complex to be represented as an algorithm. n However, most experts express knowledge in form of rules: IFthe ‘traffic light’ is green THENthe action is go IFthe ‘traffic light’ is red THENthe action is stop

n How do you represent knowledge in AI? n Commonly type of knowledge representation: IF-THEN structure relates given information (facts) in IF part to some action in THEN part. n A rule provides some description of how to solve a problem. n Rules are relatively easy to create and understand. n IF part: antecedent (premise or condition) THEN part: consequent (conclusion or action). Rules as a knowledge representation technique

IF  antecedent  THEN  consequent  n A rule can have multiple antecedents joined by the keywords AND (conjunction), OR (disjunction) or both. IF  antecedent 1  AND  antecedent 2  OR  antecedent 2 ... AND  antecedent n  OR  antecedent n  THEN  consequent 

n The antecedent incorporates : an object (linguistic object) and its value linked by an operator. n The operator identifies the object and assigns value. n Operators, e.g. is, are, is not, are not assign a symbolic value to a linguistic object. n Expert systems can also use mathematical operators to define an object as numerical and assign it to the numerical value. IF‘age of the customer’ < 18 AND‘cash withdrawal’ > 1000 THEN‘signature of the parent’ is required

Rules can represent relations, recommendations, directives, strategies and heuristics: n Relation IFthe ‘fuel tank’ is empty THENthe car is dead n Recommendation IFthe season is autumn ANDthe sky is cloudy ANDthe forecast is drizzle THENthe advice is ‘take an umbrella’ n Directive (control) IFthe car is dead ANDthe ‘fuel tank’ is empty THENthe action is ‘refuel the car’

n Strategy IFthe car is dead THENthe action is ‘check the fuel tank’; step1 is complete IFstep1 is complete ANDthe ‘fuel tank’ is full THENthe action is ‘check the battery’; step2 is complete n Heuristic IFthe spill is liquid ANDthe ‘spill pH’ < 6 ANDthe ‘spill smell’ is vinegar THENthe ‘spill material’ is ‘acetic acid’

The main players in the development team n Members of the expert system development team: n domain expert n knowledge engineer n programmer n project manager n end-user n The success of expert system entirely depends on how well members work together.

The main players in the development team

Domain expert :knowledgeable/skilled person capable of solving problems in a domain (specific area). has greatest expertise in a given domain. This expertise is to be captured in the expert system. Expert communicates knowledge, participates in expert system development. Domain expert is the most important player in expert system development team.

n The knowledge engineer: designs, builds and tests testing an expert system: n interviews domain expert to find out how a particular problem is solved. n establishes what reasoning methods expert uses to handle facts and rules and decides how to represent them in the expert system. n chooses some development software or an expert system shell, or looks at programming languages for encoding the knowledge. n tests, revising and integrates the expert system into the workplace.

n Programmer: n Writes the actual programming, describing domain knowledge in terms that a computer can understand. n Has skills in conventional programming n symbolic programming in such AI languages as LISP, Prolog n some experience in the application of different types of expert system shells are useful.

n Project manager: leader of the expert system development team, responsible for keeping the project on track. n makes sure that all deliverables and milestones are met, interacts with expert, knowledge engineer, programmer and end-user. n end-user: a person who uses expert system when it is developed. n user interface of the expert system is also vital for the project’s success; end-user’s contribution here can be crucial.

n Production system model: foundation of the modern rule-based expert systems. n The production model is based on the idea that humans solve problems by applying their knowledge (expressed as production rules) to a given problem. n The production rules are stored in the long-term memory n Problem-specific information or facts in the short- term memory. Structure of a rule-based expert system

Production system model

Basic structure of a rule-based expert system

n knowledge base: contains domain knowledge useful for problem solving. In a rule-based expert system, the knowledge is represented as a set of rules. n Each if-then rule specifies a relation, recommendation, directive, strategy or heuristic n When condition (if) part of a rule is satisfied, rule is said to fire and the action part is executed n Database includes a set of facts used to match against the IF (condition) parts of rules stored in the knowledge base (e.g. customer information)

n Inference engine: carries out reasoning to reach a solution. It links rules in knowledge base with facts in database. n Explanation facilities: how a particular conclusion is reached and why a specific fact is needed. n User interface: means of communication between a user seeking a solution to problem and an expert system.

Complete structure of a rule-based expert system

n Expert system (ES) is built to perform at a human expert level in a narrow, specialised domain. n The most important characteristic of ES is high- quality performance. n The speed of reaching a solution is very important. Even the most accurate decision or diagnosis may not be useful if it is too late to apply, e.g. in an emergency. Characteristics of an expert system

n ES apply heuristics to guide the reasoning and reduce search area for a solution. n A unique feature of an expert system is its explanation capability. n Expert systems employ symbolic reasoning when solving a problem. Symbols are used to represent different types of knowledge such as facts, concepts and rules.

Can expert systems make mistakes? n Even a brilliant human expert can make mistakes. Therefore ES built to perform at a human expert level also should be allowed to make mistakes. n But we still trust experts, even we recognise that their judgements are sometimes wrong. Likewise, at least in most cases, we can rely on solutions provided by expert systems, but mistakes are possible and we should be aware of this.

n In ES, knowledge is separated from its processing ( knowledge base and the inference engine are split up). n A conventional program is a mixture of knowledge and the control structure to process this knowledge. This leads to difficulties in understanding and reviewing the program code, as any change to the code affects both the knowledge and its processing. n When an ES shell is used, a knowledge engineer simply enters rules in the knowledge base. Each new rule adds some new knowledge and makes the expert system smarter.

Comparison of expert systems with conventional systems and human experts

Comparison of expert systems with conventional systems and human experts (Continued)

Forward chaining and backward chaining n The matching of rule IF parts to the facts (rule firing) produces inference chains. n The inference chain indicates how an expert system applies the rules to reach a conclusion.

Inference engine cycles via a match-fire procedure

An example of an inference chain

Forward chaining n Forward chaining is data-driven reasoning. n The reasoning starts from the known data and proceeds forward with that data. n Each time only topmost rule is executed. When fired, the rule adds a new fact in the database. n Any rule can be executed only once.. n The match-fire cycle stops when no further rules can be fired.

Example A = temperature > 35 oC B = Window is closed C = humidity is high E = Oxygen is low X = AC is OFF L = It is raining Y = Condition is bad

Forward chaining

n Forward chaining is a technique for gathering information and then inferring from it whatever can be inferred. n However, in forward chaining, many rules may be executed that have nothing to do with the established goal. n Therefore, if our goal is to infer only one particular fact, the forward chaining inference technique would not be efficient.

Backward chaining n Backward chaining is the goal-driven reasoning. n In backward chaining, ES has the goal (a hypothetical solution) and inference engine attempts to find evidence to prove it. n First, knowledge base is searched to find rules that might have the desired solution. n Such rules must have the goal in their THEN (action) parts. If such a rule is found and its IF (condition) part matches data in the database, then the rule is fired and the goal is proved. However, this is rarely the case.

Backward chaining n Thus inference engine puts aside rule it is working with (the rule is said to stack) and sets up a new goal, a subgoal, to prove the IF part of this rule. Then the knowledge base is searched again for rules that can prove the subgoal. n The inference engine repeats the process of stacking the rules until no rules are found in the knowledge base to prove the current subgoal.

Example B = Window is closed E = Fan is OFF X = AC is ON Y = Temp is medium Z = Condition is good

Backward chaining

n If an expert first needs to gather some information and then tries to infer from it whatever can be inferred, choose the forward chaining inference engine. n However, if your expert begins with a hypothetical solution and then attempts to find facts to prove it, choose the backward chaining inference engine. Choosing between forward and backward chaining

n Rule 1: IFthe ‘traffic light’ is green THENthe action is go n Rule 2: IFthe ‘traffic light’ is red THENthe action is stop n Rule 3: IFthe ‘traffic light’ is red THENthe action is go Conflict resolution

n Rule 2 and Rule 3, have same IF part. Thus both of them can fire when the condition part is satisfied. These rules represent a conflict set. n The inference engine must determine which rule to fire from such a set - this is called conflict resolution.

n In forward chaining, BOTH rules would be fired. Rule 2 is fired first as the topmost one, and as a result, its THEN part is executed and linguistic object action obtains value stop. n However, Rule 3 is also fired because the condition part of this rule matches the fact ‘traffic light’ is red, which is still in the database. As a consequence, object action takes new value go.

Methods used for conflict resolution n Fire rule with highest priority. In simple applications, place the rules in a priority order in the KB - works well for ES with around 100 rules. Rule 1: Priority 100 if Infection is Meningitis AND Patient is Child THEN Prescription Number_1 Rule 2: Priority 90 if Infection is Meningitis AND Patient is Adult Then Prescription Number_2

Fire most specific rule - also known as longest matching strategy. assumes a specific rule processes more information than a general one. Rule 1: IF season is Fall AND sky is cloudy AND forecast is rain THEN advice is Stay home Rule 2: IF season is Fall THEN advice is take umbrella

n Fire rule that uses data most recently entered in database - needs time tags attached to each fact in database. n In the conflict set, ES first fires rule whose antecedent uses data most recently added to database. Rule 1: IF forecast is rain (entered 2:00 pm today) THEN advice is take umbrella Rule 2: IF weather is wet (entered 3:12 pm today) THEN advice is stay home

Metaknowledge n Metaknowledge: knowledge about knowledge. Metaknowledge is knowledge about the use and control of domain knowledge in an ES. n In rule-based ES, metaknowledge is represented by metarules. A metarule determines a strategy for use of task-specific rules in the expert system.

n Metarule 1: Rules supplied by experts have higher priorities than rules supplied by novices. n Metarule 2: Rules governing rescue of human lives have higher priorities than rules concerned with dealing with traffic jam. Metarules

n Natural knowledge representation. An expert usually explains his rules as: “In such-and-such situation, I do so-and-so”. These expressions can be represented quite naturally as IF-THEN production rules. n Uniform structure. Production rules have the uniform IF-THEN structure. Each rule is an independent piece of knowledge. Advantages of rule-based expert systems

n Separation of knowledge from its processing: effective separation of the KB from inference engine - possible to develop different applications using same ES shell. n Dealing with incomplete and uncertain knowledge. Most rule-based ES are capable of representing and reasoning with incomplete and uncertain knowledge. Advantages of rule-based ES

n Opaque relations between rulesindividual production rules are relatively simple and self- documented, their logical interactions within the large set of rules may be opaque. Rule-based systems make it difficult to observe how individual rules serve the overall strategy. n Ineffective search strategy: an exhaustive search through all the production rules during each cycle. Expert systems with a large set of rules (over 100 rules) can be slow, and thus large rule-based systems can be unsuitable for real-time applications. Disadvantages of rule-based expert systems

n Inability to learn - rule-based ES do not have an ability to learn from the experience. n Unlike a human expert, who knows when to “break the rules”, an expert system cannot automatically modify its knowledge base, or adjust existing rules or add new ones. The knowledge engineer is still responsible for revising and maintaining the system. Disadvantages of rule-based expert systems