Rules, page 1 CSI 4106, Winter 2005 Representing knowledge with rules Points Definitions Production systems Conflict resolution strategies Examples A financial.

Slides:



Advertisements
Similar presentations
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
Advertisements

© C. Kemke Constructive Problem Solving 1 COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
© 2002 Franz J. Kurfess Expert System Examples 1 CPE/CSC 481: Knowledge-Based Systems Dr. Franz J. Kurfess Computer Science Department Cal Poly.
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,
Production Systems CIS 479/579 Bruce R. Maxim UM-Dearborn.
1 Antecedent-Consequent Rules Rn:IF condition 1 condition 2... THEN consequent 1 consequent 2...
Inferences The Reasoning Power of Expert Systems.
B. Ross Cosc 4f79 1 Forward chaining backward chaining systems: take high-level goal, and prove it by reducing it to a null goal - to reduce it to null,
1 01/12/2011Knowledge-Based Systems, Paula Matuszek Intro to CLIPS Paula Matuszek CSC 9010, Spring, 2011.
Rule Based Systems Michael J. Watts
Chapter 12: Expert Systems Design Examples
Rule Based Systems Alford Academy Business Education and Computing
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
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.
1 Pertemuan 6 RULE-BASED SYSTEMS Matakuliah: H0383/Sistem Berbasis Pengetahuan Tahun: 2005 Versi: 1/0.
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. Kemke Control 1 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.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
EXPERT SYSTEMS Part I.
Building Knowledge-Driven DSS and Mining Data
Artificial Intelligence CSC 361
Sepandar Sepehr McMaster University November 2008
Strong Method Problem Solving.
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Chapter 14: Artificial Intelligence Invitation to Computer Science, C++ Version, Third Edition.
Chapter 10 Artificial Intelligence. © 2005 Pearson Addison-Wesley. All rights reserved 10-2 Chapter 10: Artificial Intelligence 10.1 Intelligence and.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Presented by Mohammad Saniee December 2, 2003
INTELLIGENT SYSTEMS Rule based systems 1. Aims of session To understand  Basic principles  Forward chaining  Problems with rule-based systems  Backward.
CMPE 421 Parallel Computer Architecture
Chapter 7. BEAT: the Behavior Expression Animation Toolkit
Production Systems A production system is –a set of rules (if-then or condition-action statements) –working memory the current state of the problem solving,
Introduction to Expert Systems. Other Resources Handout at ECE Office.
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.
Chapter 9: Rules and Expert Systems Lora Streeter.
Knowledge and search, page 1 CSI 4106, Winter 2005 Knowledge and search Points Properties of knowledge  Completeness  Objectivity  Certainty  Formalizability.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
Case study of Several Case Based Reasoners Sandesh.
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
3-May-2006cse cache © DW Johnson and University of Washington1 Cache Memory CSE 410, Spring 2006 Computer Systems
Formal Methods in Software Engineering
Rule Based Systems  If then  Rules to solve problems  What is forward chaining?  What is backward chaining?  Expert systems.
Information in the Digital Environment Information Seeking Models Dr. Dania Bilal IS 530 Spring 2005.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
CS62S: Expert Systems Based on: The Engineering of Knowledge-based Systems: Theory and Practice, A. J. Gonzalez and D. D. Dankel.
CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 8: Organizational Structures and Retrieval Algorithms This chapter deals with how to find.
UNIT 5.  The related activities of sorting, searching and merging are central to many computer applications.  Sorting and merging provide us with a.
Chapter 4: Inference Techniques
LSP 120: Quantitative Reasoning and Technological Literacy Topic 1: Introduction to Quantitative Reasoning and Linear Models Lecture Notes 1.2 Prepared.
Artificial Intelligence
Forward and Backward Chaining
1 Chapter 13 Artificial Intelligence and Expert Systems.
Artificial Intelligence Knowledge Representation.
Presented by The Solutions Group Decision Making Tools.
Artificial Intelligence: Applications
Intelligent Systems Rule based systems 1. Aims of session To understand Basic principles Forward chaining Problems with rule-based systems Backward chaining.
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
Introduction Characteristics Advantages Limitations
Unit# 9: Computer Program Development
Intro to Expert Systems Paula Matuszek CSC 8750, Fall, 2004
Software System Integration
Lesson 1.1 How do you evaluate algebraic expressions and powers?
An Application in Prolog
Presentation transcript:

Rules, page 1 CSI 4106, Winter 2005 Representing knowledge with rules Points Definitions Production systems Conflict resolution strategies Examples A financial advisor Bagger XCON Animal classification in Prolog A forward-chaining engine Animal classification revisited

Rules, page 2 CSI 4106, Winter 2005 Rules... A rule, in its simplest form, is a pair conditions  actions An action can be real (maybe software-simulated), or it can only add -- assert -- new conditions. A rule is not the same as an implication premises  conclusions where false premises are allowed, but there are significant similarities. In rule-based systems, the basic rule form is enhanced with control information and, especially, with probabilities or confidence measures.

Rules, page 3 CSI 4106, Winter and applications One class of applications are rule-based expert systems. Despite their apparent simplicity, rules are quite expressive. There are two types of uses. Synthesis (to construct or configure): XCON is an example of a deployed system; our simple case study is Bagger. Analysis (to recognize or diagnose): MYCIN is the best-known (almost) success story; our simple case study is animal classification.

Rules, page 4 CSI 4106, Winter 2005 Forward-chaining production systems Rule memory (rules are called productions). Working memory (literals that represent the current state of the problem); actions change working memory. Rule selection and application mechanisms (rules are indexed by situations). Rule selection relies on pattern matching. A conflict arises if more than one rule has been selected to match the current situation. Conflict resolution procedures select one rule. This rule is fired if its conditions hold. Actions are performed, working memory updated.

Rules, page 5 CSI 4106, Winter 2005 Some conflict resolution strategies Order rules (partially) by specificity -- the more conditions, the more specific the rule; prefer more specific rules. Rank all rules; prefer rules with a higher rank. Rank all facts; prefer rules with more highly ranking facts. Record the time of changes to working memory; prefer rules that depend of recent additions.

Rules, page 6 CSI 4106, Winter 2005 Implementing forward chaining An agenda is a handy data structure for implementing forward chaining. It is "a list of things to do”, here -- candidate rules. Conditions are considered in some order; any rule that has the currently examined condition in its left-hand side becomes partially activated. Its copy, with the matched condition removed, goes on the agenda. A rule is selected for firing when it has become fully activated, that is, when all its left-hand side conditions have been matched. Otherwise the rule is kept for future use, just in case the remaining conditions become asserted later.

Rules, page 7 CSI 4106, Winter 2005 A financial “expert system” 1.saved(low)  investIn(savings) 2.saved(high) ∧ income(adequate)  investIn(stocks) 3.saved(high) ∧ income(inadequate)  investIn(mixed) 4. ∀ x amountSaved(x)  ∃ y (nbrDependents(y)  x > y*5000)  saved(high) 5. ∀ x amountSaved(x)  ∃ y (nbrDependents(y)  x ≤ y*5000)  saved(low) 6. ∀ x earnings(x, steady)  ∃ y (nbrDependents(y)  x > y*4000)  income(adequate) 7. ∀ x earnings(x, steady)  ∃ y (nbrDependents(y)  x ≤ y*4000)  income(inadequate) 8. ∀ x earnings(x, unsteady)  income(inadequate)

Rules, page 8 CSI 4106, Winter 2005 A financial “expert system” (2) 9.amountSaved(22000) 10.nbrDependents(3) 11.earnings(25000, steady) [12] and [13] match the conditions of [3]. Add a new fact: Given facts 9-11 and rules 1-8, we perform forward chaining. [9] and [10] match the conditions of [4] and [5], but only [4] passes the test. Add a new fact: 12.saved(high) 13.income(inadequate) 14.investIn(mixed) [10] and [11] match the conditions of [6] and [7], but only [7] passes the test. Add a new fact: Done.

Rules, page 9 CSI 4106, Winter 2005 Bagger: a robot that bags groceries The main idea is simple. (1)Bag the large items: put large heavy items one per bag; start a new bag when a large item does not fit in any partially filled bag. (2)Bag the mid-sized items: meat and frozen goods go in freezer bags; start a new bag when a mid-sized item does not fit in any partially filled bag. (3)Bag the small items: try to avoid bagging them with heavy items; start a new bag when a small item does not fit in any partially filled bag. What could be a good conflict resolution strategy for the following rules?

Rules, page 10 CSI 4106, Winter 2005 Bagger (2) (1)the step is bag-large & there is a large unbagged item & there is a large unbagged heavy item & there is a bag with < 6 large items  bag the large heavy item (2)the step is bag-large & there is a large unbagged item & there is a bag with < 6 large items  bag the large item (3)the step is bag-large & there is a large unbagged item  start a new bag & bag the large item (4)the step is bag-large  end the step bag-large & begin the step bag-medium

Rules, page 11 CSI 4106, Winter 2005 Bagger (3) (5)the step is bag-medium & there is a medium unbagged item & the medium item is a freezer-bag item & there is an unfilled bag  put the medium item in a freezer bag & bag the medium item (6)the step is bag-medium & there is a medium unbagged item & there is an unfilled bag  bag the medium item (7)the step is bag-medium & there is a medium unbagged item  start a new bag & bag the medium item (8)the step is bag-medium  end the step bag-medium & begin the step bag-small

Rules, page 12 CSI 4106, Winter 2005 Bagger (4) (9)the step is bag-small & there is a small unbagged item & there is an unfilled bag without large heavy items  bag the small item (10)the step is bag-small & there is a small unbagged item & there is an unfilled bag  bag the small item (11)the step is bag-small & there is a small unbagged item  start a new bag & bag the small item (12)the step is bag-small  end the step bag-medium & stop

Rules, page 13 CSI 4106, Winter 2005 XCON XCON configures DEC computing equipment. It is one of rather few (but well known!) examples of commercially successful expert systems. XCON is, in a sense, Bagger's big brother. Its general plan of action is quite simple: a sequence of steps. (There are, however, dozens of rules for each step...) The configuring operation includes selecting components to match the order, laying out the spatial arrangement of cabinets, filling the cabinets, and so on.

Rules, page 14 CSI 4106, Winter 2005 XCON (2) Major steps Check the order, look for missing or incompatible items. Lay out the processor in cabinets. Put boxes in the input/output cabinets, put components in those boxes. Put panels in the input/output cabinets. Lay out the floor plan. Plan the cabling.

Rules, page 15 CSI 4106, Winter 2005 A classification system in Prolog

Rules, page 16 CSI 4106, Winter 2005 Animal classification in a rule-based system The general rules

Rules, page 17 CSI 4106, Winter 2005 Animal classification (2) A session with the forward chainer

Rules, page 18 CSI 4106, Winter 2005 Animal classification (3) The forward chainer in Prolog

Rules, page 19 CSI 4106, Winter 2005 A glimpse at expert systems Your reading for independent study : sections Architecture of a typical expert system

Rules, page 20 CSI 4106, Winter 2005 A glimpse at expert systems (2) Guidelines to determine whether a problem is appropriate for expert system solution: 1.The need for the solution justifies the cost and effort of building an expert system. 2.Human expertise is not available in all situations where it is needed. 3.The problem may be solved using symbolic reasoning. 4.The problem domain is well structured and does not require commonsense reasoning. 5.The problem may not be solved using traditional computing methods. 6.Cooperative and articulate experts exist. 7.The problem is of proper size and scope.

Rules, page 21 CSI 4106, Winter 2005 A glimpse at expert systems (3) Exploratory development cycle

Rules, page 22 CSI 4106, Winter 2005 Later or much later More topics appear in the very useful chapter 8: planning (section 8.4) will be discussed later; case-based reasoning is left for another course .