IDDS: Rules-based Expert Systems

Slides:



Advertisements
Similar presentations
STRONG METHOD PROBLEM SOLVING
Advertisements

CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
Reasoning Forward and Backward Chaining Andrew Diniz da Costa
ICT IGCSE 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
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
Chapter 11 Artificial Intelligence and Expert Systems.
Introduction to Expert Systems
Artificial Intelligence
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.
CPSC 322 Introduction to Artificial Intelligence November 10, 2004.
Lecture 04 Rule Representation
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.
© 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.
Week 6 Expert System. Case Scenario During ABC Enterprise management meeting to discuss whether the company should consider a merger with other business.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
EXPERT SYSTEMS Part I.
Chapter 12: Intelligent Systems in Business
Building Knowledge-Driven DSS and Mining Data
Artificial Intelligence CSC 361
Sepandar Sepehr McMaster University November 2008
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.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
IDDS: Rules-based Expert Systems
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Knowledge Acquisition. Concepts of Knowledge Engineering Knowledge engineering The engineering discipline in which knowledge is integrated into computer.
Intelligent Decision Support Systems By Dr.S.Sridhar,Ph.D., RACI(Paris),RZFM(Germany),RMR(USA),RIEEEProc. web-site :
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Presented by Mohammad Saniee December 2, 2003
13: Inference Techniques
11 C H A P T E R Artificial Intelligence and Expert Systems.
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.
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 
Artificial Intelligence By Michelle Witcofsky And Evan Flanagan.
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
Chapter 13 Artificial Intelligence and Expert Systems.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Chapter 15: KNOWLEDGE-BASED INFORMATION SYSTEMS. What is Knowledge? Data: Raw facts, e.g., Annual Expenses = $2 million Information: Data given context,
COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre
1 Knowledge Based Systems (CM0377) Lecture 10 (Last modified 19th March 2001)
 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.
Artificial Intelligence
Forward and Backward Chaining
Expert System Seyed Hashem Davarpanah University of Science and Culture.
ITEC 1010 Information and Organizations Chapter V Expert Systems.
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
1 Chapter 13 Artificial Intelligence and Expert Systems.
Artificial Intelligence: Applications
EXPERT SYSTEMS BY MEHWISH MANZER (63) MEER SADAF NAEEM (58) DUR-E-MALIKA (55)
Decision Support and Business Intelligence Systems (9 th Ed., Prentice Hall) Chapter 12: Artificial Intelligence and Expert Systems.
Artificial Intelligence
Advanced AI Session 2 Rule Based Expert System
CHAPTER 1 Introduction BIC 3337 EXPERT SYSTEM.
Artificial Intelligence, P.I
Introduction to Expert Systems Bai Xiao
Architecture Components
전문가 시스템(Expert Systems)
Technology of Data Glove
Presentation transcript:

IDDS: Rules-based Expert Systems 02/21/05 References: Artificial Intelligence: A Modern Approach by Russell & Norvig, chapter 10 Knowledge-Based Systems in Business Workshop (2003), by Aronson http://www.aaai.org/AITopics/html/expert.html

AI Research Focuses Natural Language Processing Speech Understanding (Smart) Robotics and Sensory Systems Neural Computing Genetic Algorithms Intelligent Software Agents Machine Learning Expert Systems

What is an Expert System Web definition: A computer program that contains expert knowledge about a particular problem, often in the form of a set of if-then rules, that is able to solve problems Expert System is Most Popular Applied AI Technology!!!

There exists Expert Systems that … diagnose human illnesses … make financial forecasts … schedule routes for delivery vehicles … many more

Building Expert Systems Objective of an expert system To transfer expertise from human experts to a computer system and Then on to other humans (non-experts) Activities Knowledge acquisition Knowledge representation Knowledge inferencing Knowledge transfer to the user

Human Experts Behaviors Expert Systems are not necessarily used to replace human experts. They can be used to make their knowledge and experience more widely available (e.g., allowing non experts to work better) Recognize and formulating the problem Solve problems quickly and properly Explain the solution Determine relevance Learn from experience Restructure knowledge Break rules

Important Expert System Components User Interface A facility for the user to interact with the Expert System Inference Engine Reasoning (Thinking). Makes logical deductions based upon the knowledge in the KB. Knowledge Base Contains the domain knowledge

All Expert System Components To be classified as an ‘expert system’, the system must be able to explain the reasoning process. That’s the difference with knowledge based systems Knowledge Base Inference Engine User Interface Working Memory / Blackboard / Workplace A global database of facts used by the system Knowledge Acquisition Facility An (automatic) way to acquire knowledge Explanation Facility Explains reasoning of the system to the user

Knowledge Base The knowledge base contains the domain knowledge necessary for understanding, formulating, and solving problems Two Basic Knowledge Base Elements Facts: Factual knowledge is that knowledge of the task domain that is widely shared, typically found in textbooks or journals, and commonly agreed upon by those knowledgeable in the particular field. Heuristics: Heuristic knowledge is the less strictly defined, relies more on empirical data, more judgmental Fact: Amsterdam is the capital of the Netherlands. Not a fact: New England Patriots have the best team in the NFL Heuristic: If New England Patriots win Super Bowl for 3rd straight time, they are probably the best

Knowledge Acquisition Methods Manual (Interviews) Knowledge engineer interviews domain expert(s) Semiautomatic (Expert-driven) Automatic (Computer Aided) Question: what technique you think is most popular and why? Most Common Knowledge Acquisition: Face-to-face Interviews

Knowledge Representation Knowledge Representation deals with the formal modeling of expert knowledge in a computer program. Important knowledge representation schemas: Production Rules (Expert systems that represent domain knowledge using production rules are called rule-based expert systems) Frames Semantic objects Knowledge Representation Must Support: Acquiring (new) knowledge Retrieving knowledge Reasoning with knowledge After acquiring, the domain knowledge must be formalized and organized so it can be used for reasoning.

Production Rules Condition-Action Pairs: A RULE consists of an IF part and a THEN part (also called a condition and an action). if the IF part of the rule is satisfied; consequently, the THEN part can be concluded, or its problem-solving action taken. Rules represent a model of actual human behavior Rules represent an autonomous chunk of expertise When combined, these chunks can lead to new conclusions

Advantages & Limitations of Rules Easy to understand (natural form of knowledge) Easy to derive inference and explanations Easy to modify and maintain Limitations Complex knowledge requires many rules Search limitations in systems with many rules Dependencies between rules

Demonstration of Rule-Based Expert Systems Command & Conquer Generals

My own Expert System in Wargus

Rules in Wargus { id = 1, name = "build townhall", preconditions = {hasTownhall(),hasBarracks()}, actions = { function() return AiNeed(AiCityCenter()) end, function() return AiSet(AiWorker(), 1) end, function() return AiWait(AiCityCenter()) end, function() return AiSet(AiWorker(), 15) end, function() return AiNeed(AiBarracks()) end, } }, { id = 2, name = "build blacksmith", etc.

Question: how would you encode domain knowledge for Wargus? ‘Study’ strategy guides for Warcraft 2 (manual) Run machine learning experiments to discover new strong rules (automatic) Allow experts (i.e., hardcore gamers) to add rules (semi-automatic)

Inference Mechanisms Examine the knowledge base to answer questions, solve problems or make decisions within the domain Inference mechanism types: Theorem provers or logic programming language (e.g., Prolog) Production systems (rule-based) Frame Systems and semantic networks Description Logic systems

Inference Engine in Rule-Based Expert Systems Inferencing with Rules: Check every rule in the knowledge base in a forward (Forward Chaining) or backward (Backward Chaining ) direction Firing a rule: When all of the rule's hypotheses (the “IF parts”) are satisfied Continues until no more rules can fire, or until a goal is achieved

Forward Chaining Systems Forward-chaining systems (data-driven) simply fire rules whenever the rules’ IF parts are satisfied. A forward-chaining rule based system contains two basic components: A collection of rules. Rules represent possible actions to take when specified conditions hold on items in the working memory. A collection of facts or assumptions that the rules operate on (working memory). The rules actions continuously update (adding or deleting facts) the working memory

Forward Chaining Operations The execution cycle is Match phase: Examine the rules to find one whose IF part is satisfied by the current contents of Working memory (the current state) Conflict resolution phase: Out of all ‘matched’ rules, decide which rule to execute (Specificity, Recency, Fired Rules) Act phase: Fire applicable rule by adding to Working Memory the facts that are specified in the rule’s THEN part (changing the current state) Repeat until there are no rules which apply. Specificity - The rule applied is usually the most specific rule, or the rule that matches the most facts. Recency - The rule applied is the rule that matches the most recently derived facts. Fired Rules - Involves not applying rules that have already been used.

Forward Chaining Example Rules IF (ownTownhalls < 1) THEN ADD (ownTownhalls ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownLumbermill < 1) THEN ADD (ownLumberMills ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownBlacksmith < 1) THEN ADD (ownBlacksmiths ++) Working Memory (ownTownhalls = 0) (ownBarracks = 1) (ownLumbermill = 0) (ownBlacksmith = 0) Only Rule 1 applies

Forward Chaining Example Rules IF (ownTownhalls < 1) THEN ADD (ownTownhalls ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownLumbermill < 1) THEN ADD (ownLumberMills ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownBlacksmith < 1) THEN ADD (ownBlacksmiths ++) Working Memory (ownTownhalls = 1) (ownBarracks = 1) (ownLumbermill = 0) (ownBlacksmith = 0) Rule 2 & 3 apply, assume we select 2

Forward Chaining Example Rules IF (ownTownhalls < 1) THEN ADD (ownTownhalls ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownLumbermill < 1) THEN ADD (ownLumberMills ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownBlacksmith < 1) THEN ADD (ownBlacksmiths ++) Working Memory (ownTownhalls = 1) (ownBarracks = 1) (ownLumbermill = 1) (ownBlacksmith = 0) Only Rule 3 applies

Forward Chaining Example Rules IF (ownTownhalls < 1) THEN ADD (ownTownhalls ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownLumbermill < 1) THEN ADD (ownLumberMills ++) IF (ownTownhalls > 0) AND (ownBarracks > 0) AND (ownBlacksmith < 1) THEN ADD (ownBlacksmiths ++) Working Memory (ownTownhalls = 1) (ownBarracks = 1) (ownLumbermill = 1) (ownBlacksmith = 1) No Rules Apply. Done!

Backward Chaining Systems Backward-chaining (goal-driven) systems start from a potential conclusion (hypothesis), then seek evidence that supports (or contradicts) it A backward-chaining rule based system contains three basic components: A collection of rules. Rules represent possible actions to take when specified conditions hold on items in the working memory. A collection of facts or assumptions that the rules operate on (working memory). The rules actions continuously update (adding or deleting facts) the working memory A stack of goals

Backward Chaining Operations The execution cycle is Start with goal state Check the conclusions of the rules to find all rules that can satisfy the top goal on the stack Select one of these rules; the preconditions of the selected rule will be set as new goals on the goal stack System terminates if goal stack is empty

Backward Chaining Example Rules IF (ownTownhall > 0) THEN ADD (ownBarracks ++) 2. IF (ownTownhall > 0) AND (ownBarracks > 0) AND (ownLumbermill < 1) THEN ADD (ownLumbermills ++) Working Memory Goal Stack OwnBarracks > 0 Sub goal (ownTownhalls = 1) (ownBarracks = 0) (ownLumbermill = 0) (ownBlacksmith = 0) OwnLumbermills > 0 Top goal Top-goal (OwnLumbermills > 0) is found in actions side of Rule 2. However, precondition (ownBarracks > 0) for Rule 2 is not satisfied. Add this to goal stack

Backward Chaining Example Rules IF (ownTownhall > 0) THEN ADD (ownBarracks ++) 2. IF (ownTownhall > 0) AND (ownBarracks > 0) AND (ownLumbermill < 1) THEN ADD (ownLumbermills ++) Working Memory Goal Stack (ownTownhalls = 1) (ownBarracks = 1) (ownLumbermill = 0) (ownBlacksmith = 0) OwnBarracks > 0 OwnLumbermills > 0 (ownBarracks > 0) can be achieved by Rule 1. All preconditions for this rule apply, therefore the rule can be executed and the top goal can be removed from the goal stack

Backward Chaining Example Rules IF (ownTownhall > 0) THEN ADD (ownBarracks ++) 2. IF (ownTownhall > 0) AND (ownBarracks > 0) AND (ownLumbermill < 1) THEN ADD (ownLumbermills ++) Working Memory Goal Stack (ownTownhalls = 1) (ownBarracks = 1) (ownLumbermill = 1) (ownBlacksmith = 0) OwnBarracks > 0 OwnLumbermills > 0 All preconditions of Rule 2 are now satisfied; the final goal on the goal stack can be achieved. We’re done!

Question: Which inference mechanism is more appropriate in Wargus? Backward Chaining: Ultimate goal in Wargus is ‘winning the game’. Too complicated to address directly Forward Chaining: Simplistic but also intelligent? Use heuristic to incorporate intelligence

Explanation Facilities Explain the reasoning process: why it asked some question, and how it reached some conclusion System: Is there gas in the fuel tank? User: Yes. System: Is it true that the engine turns over? User: No. System Is it true that the lights come on? User: Why? System: I am trying to prove: problem with battery. It has been established that it is not the case that the engine turns over. Therefore if it is not the case that the lights come on then there is a problem with battery. Is it true that the lights come on? User: No. System: I conclude that there is a problem with the battery. User: How? System: This follows from Rule 2: IF NOT engine_turns_over AND ...

Why explain the reasoning process Provides the user with a means of understanding the system behavior People do not always accept the answers of an expert without some form of justification (especially if the expert is a machine!)

Expert Systems Benefits Helps preserve knowledge Helps if expertise is scarce, expensive, or unavailable Helps if under time and pressure constraints Improved Decision Quality Increased Output and Productivity Helps in training new employees Intelligent tutor (lecture non-experts) Knowledge Transfer to Remote Locations

Problems and Limitations of Expert Systems Knowledge is not always available Expertise can be hard to extract from humans Knowledge engineers are rare and expensive Expert Systems are expensive to design & maintain Expert Systems work well only in a narrow domain of knowledge Lack of trust by end-users (we are still dealing with a computer) Inability to learn