Rule-based representation

Slides:



Advertisements
Similar presentations
Some Prolog Prolog is a logic programming language
Advertisements

Russell and Norvig Chapter 7
1 Section 1.5 Rules of Inference. 2 Definitions Theorem: a statement that can be shown to be true Proof: demonstration of truth of theorem –consists of.
Inference Rules Universal Instantiation Existential Generalization
Rule-Based Deduction Systems
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.
Expert Systems Reasonable Reasoning An Ad Hoc approach.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Logic.
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:
Reasoning System.  Reasoning with rules  Forward chaining  Backward chaining  Rule examples  Fuzzy rule systems  Planning.
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
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
CSE (c) S. Tanimoto, 2008 Propositional Logic
Lecture 04 Rule Representation
Knowledge in intelligent systems So far, we’ve used relatively specialized, naïve agents. How can we build agents that incorporate knowledge and a memory?
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
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Knoweldge Representation & Reasoning
Week 6 Expert System. Case Scenario During ABC Enterprise management meeting to discuss whether the company should consider a merger with other business.
Artificial Intelligence
Inferencing using forward- and backward-chaining.
Modelling planning problems using PDDL
Artificial Intelligence CSC 361
Artificial Intelligence Reasoning. Reasoning is the process of deriving logical conclusions from given facts. Durkin defines reasoning as ‘the process.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
1 Backward-Chaining Rule-Based Systems Elnaz Nouri December 2007.
February 20, 2006AI: Chapter 7: Logical Agents1 Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent.
CSNB234 ARTIFICIAL INTELLIGENCE
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.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
S P Vimal, Department of CSIS, BITS, Pilani
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.
COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Types of logic. Propositional logic: syntax Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has.
Chapter 4: Inference Techniques
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Artificial Intelligence
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Forward and Backward Chaining
Production systems The Production System Cycle Conflict resolution Thermostat’s input-output behaviour Passenger input-output behaviour on the underground.
Explaining and Controlling Reasoning Dr Nicholas Gibbins 32/3077.
Artificial Intelligence: Applications
Lecture 14. Recap Problem Solving GA Simple GA Examples of Mutation and Crossover Application Areas.
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)
EA C461 Artificial Intelligence
Advanced AI Session 2 Rule Based Expert System
Chapter 9. Rules and Expert Systems
EA C461 – Artificial Intelligence Logical Agent
CS62S: Expert Systems Based on:
CS 416 Artificial Intelligence
Back to “Serious” Topics…
Chapter 9. Rules and Expert Systems
CSNB234 ARTIFICIAL INTELLIGENCE
Presentation transcript:

Rule-based representation Example IF GMAT score >= 600 THEN Admit student to MBA program ELSE do not admit student. Example (conjunctive condition clauses) IF sky is clear AND temperature is low THEN chance of frost is high Example (disjunctive condition clauses) IF age of car is new OR condition of car is good THEN cat should start AND trip should be safe OR in THEN-part? 1

Rules Example AND loan >= 10,000 AND (loan >= 10,000 IF interest_rate > 10 IF interest_rate > 10 AND loan >= 10,000 AND (loan >= 10,000 OR due_date = today OR due_date = today) THEN review_loan = True. THEN review_loan = True. OR has precedence / left-to-right evaluation A rule’s premise is true if it has been testes and premise is satisfied. If premise is true, the rule is said to be triggered. A rule fires implies that the action specified by the conclusion clauses is taken. 2

Multiple rules Rule 1: IF A = x Assume facts: OR B = y A = x THEN D = d1 B = not y Rule 2: IF A = x C = not Z AND C = z Which rule fires? AND B = NOT y THEN D = d2 Facts: A = x, C = z, B = not y. Which rule fires? Multiple values for a variable? Symptoms for a disease In presence of uncertainty 3

Inference Techniques Deductive Reasoning Combines facts (axioms) with general knowledge in the form of implications to conclude new facts. Example: Axiom: I am sleeping in class Implication: Sleeping in class => Rude shock in exams Conclusion: I will get a rude shock in the exam. Modus ponens IF A is true, and if A => B, then B is true. 4

Inference techniques Inductive reasoning Abductive Reasoning Generalizing from specific facts. case 1: Game on 21st Sept. (Friday), It rained, We lost. case 2: Game on 5th Nov. (Friday), It rained, We lost. ….. Induce general rule: If game is on a Friday AND it rains Then we lose. Abductive Reasoning Deduction with plausible implications IF B is true, and A=>B, then A is true. 5

Inference technqiues Monotonic Reasoning Non-monotonic reasoning facts remain static over period of problem-solving Non-monotonic reasoning facts need to remain static over period of problem-solving. Truth Maintenance Systems used for non-monotonic reasoning. 6

Inference: Forward Chaining Example R1: IF A and C THEN E Given facts: R2: IF D and C THEN F A is true R3: IF B and E THEN F B is true R4: IF B THEN C What can be concluded? R5: IF F THEN G Cycle through rules, looking for rules whose premise matches the working memory. Working memory A, B R4 fires: assert new fact C A, B, C R1 fires: assert new fact E A, B, C, E R3 fires: assert new fact F A, B, C, E, F R5 fires: assert new fact G A, B, C, E, F, G Concludes everything possible from available information 7

Inference Recognize-Resolve-Act cycle Recognize Resolve Act match rule premises to facts in working memory, identify rules that can fire Resolve if more than one rules can fire, choose one rule Act fire the chosen rule and add its conclusion to working memory 8

Forward Chaining: Example R1: IF the patient has a sore throat AND we suspect a bacterial infection Facts: THEN we believe the patient has strep throat Patients temperature=102 R2: IF the patient’s temperature is > 100 Has been sick for 2 months THEN the patient has fever Has a sore throat R3: IF the patient has been sick for over a month AND the patient has fever THEN we suspect a bacterial infection Cycle 1: Consider R1, R2, R3 R2 fires: assert patient has fever Cycle 2: consider R1, R3 R3 fires: assert bacterial infection Cycle 3: R1 fires: assert strep throat Data driven reasoning: will fire all rules possible, can continue reasoning about irrelevant details. 9

Inference: Backward chaining Attempts to prove a hypothesis (goal) by gathering supporting information Example R1: IF B and C THEN G R4: IF E or F THEN C R2: IF A and G THEN I R5: IF D and C THEN K R3: IF D and G THEN J Goal: I Goal I: need to trigger R2 Subgoal C: Need to trigger R4 Need both A and G Need E or F Subgoal A: need user input (ask user) Subgoal E: need user input (ask user) Subgoal G: Need to trigger R1 Need both B and C Subgoal B: need user input (ask user) 10

Combining Forward & Backward Chaining Separate systems separate expert-systems for different sub-tasks one sub-system solves part of problem, then passes control to another Demon Rules A rule that fires whenever its premises match contents of the working memory 1

Demon Rules demon rules amongst backward chaining rules, but they do not participate in the normal backward-chaining inference. A demon rule remains dormant until information in premises appears in working-memory; then the rule fires. The firing on one demon-rule can cause other demon rules to fire -- like a series of forward chaining rules in an otherwise backward chaining process. 2

Demon rules: Example Demon 1 Tank pressure Problem IF Power of off AND Tank Pressure > 1000 THEN Problem = Tank Pressure Problem Demon 2 Emergency Situation IF Problem = Tank Pressure Problem THEN Situation = Emergency Demon 3 Evacuate IF Situation = Emergency THEN Response = Evacuate Personnel 3

Specifying Rules (Variable, value) variable = value, variable <= value variable IS value variable IS NOT value Example IF car = red AND car = old AND cat = automatic What is car here? THEN car = sid Object, Attribute, Value Object: car Attributes: Values car_color: red, white, green car_age: old, new car_transmission automatic, stick car_owner sid, frog, ... 11

Object, Attribute, Value Example IF GPA equal or exceeds 3.5 THEN accept into honor society Attribute: GPA Attribute: accept into honor society Value: 3.5 (student_acceptance_status) Object: Student (implicit) Value: yes IF client is risk adverse THEN invest in bluechip stock Object: Client Attribute: client risk profile Attribute: client investment strategy 12