Chapter 4: Inference Techniques

Slides:



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

Rule-based representation
Russell and Norvig Chapter 7
Inference Rules Universal Instantiation Existential Generalization
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
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.
Rulebase Expert System and Uncertainty. Rule-based ES Rules as a knowledge representation technique Type of rules :- relation, recommendation, directive,
Logic.
© 2002 Franz J. Kurfess Logic and Reasoning 1 CPE/CSC 481: Knowledge-Based Systems Dr. Franz J. Kurfess Computer Science Department Cal Poly.
Expert Systems Dr. Samy Abu Nasser.
Inferences The Reasoning Power of Expert Systems.
Conflict Resolution  what to do if there is more than 1 matching rule in each inference cycle? match WM with LHS of rules select one rule (conflict resolution)
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,
Reasoning System.  Reasoning with rules  Forward chaining  Backward chaining  Rule examples  Fuzzy rule systems  Planning.
Intelligent systems Lecture 6 Rules, Semantic nets.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,
Artificial Intelligence Lecture No. 16
CSE (c) S. Tanimoto, 2008 Propositional Logic
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.
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.
Knoweldge Representation & Reasoning
EXPERT SYSTEMS Part I.
Artificial Intelligence
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
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.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
© C. Kemke Reasoning and Inference 1 COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Chapter 3: Methods of Inference
13: Inference Techniques
INTELLIGENT SYSTEMS Rule based systems 1. Aims of session To understand  Basic principles  Forward chaining  Problems with rule-based systems  Backward.
CSNB234 ARTIFICIAL INTELLIGENCE
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Knowledge Representation Use of logic. Artificial agents need Knowledge and reasoning power Can combine GK with current percepts Build up KB incrementally.
1 CHAPTER 13 Decision Support Systems and Intelligent Systems, Efraim Turban and Jay E. Aronson 6th ed, Copyright 2001, Prentice Hall, Upper Saddle River,
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.
Rule Based Systems  If then  Rules to solve problems  What is forward chaining?  What is backward chaining?  Expert systems.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 13 of 41 Monday, 20 September.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
The AI War LISP and Prolog Basic Concepts of Logic Programming
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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 14 of 41 Wednesday, 22.
Types of logic. Propositional logic: syntax Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
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
Forward and Backward Chaining
Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Logic and Reasoning 1 Sentences and the Real World  syntax  describes the principles for constructing and combining sentences  e.g. BNF grammar for.
Explaining and Controlling Reasoning Dr Nicholas Gibbins 32/3077.
By Muhammad Safdar MCS [E-Section].  There are times in life when you are faced with challenging decisions to make. You have rules to follow and general.
Intelligent Systems Rule based systems 1. Aims of session To understand Basic principles Forward chaining Problems with rule-based systems Backward chaining.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic.
EA C461 Artificial Intelligence
Chapter 9. Rules and Expert Systems
Forward Chaining DFS can supply compatible bindings for forward chaining.
Back to “Serious” Topics…
Chapter 9. Rules and Expert Systems
CSNB234 ARTIFICIAL INTELLIGENCE
Presentation transcript:

Chapter 4: Inference Techniques Reasoning Inference Forward Chaining Backward Chaining

How does the inference engine work? Introduction How does the inference engine work?

Modus Ponens => (implies) (X => Y) ______X____ :. Y Review: If it rains, then the streets will be wet. It is raining. Infer the conclusion: The streets will be wet.

The Conditional and Its Variants Review: The Conditional and Its Variants مخالف معكوس قلب معكوس

Modus tollens Review: (X => Y) ____ ~Y _____ :. ~ X If it rains, then the streets will be wet. The streets are not wet. Infer the conclusion: It is not raining. NOTE: Avoid mistakes cannot conclude that it is raining.

Syllogism chain implications to deduce a conclusion (X => Y) Review: chain implications to deduce a conclusion (X => Y) __ (Y => Z)__ :. (X => Z) 6

Resolution (X v Y) (~Y v Z) :. (X v Z) Review: (X v Y) (~Y v Z) :. (X v Z) basis for the inference mechanism in the Prolog language and some theorem provers

Reasoning(استدلال) The process of working with knowledge, facts, and problem solving strategies to draw conclusions Deduction – reasoning where conclusions must follow from premises (general to specific) Induction – inference is from the specific case to the general Intuition – no proven theory-Recognizing a pattern(unconsciously) ANN Heuristics – rules of thumb based on experience Generate and test – trial and error – often used to reach efficiency. Abduction – reasoning back from a true condition to the premises that may have caused the condition Default – absence of specific knowledge Autoepistemic – self-knowledge…The color of the sky as it appears to you. Nonmonotonic – New evidence may invalidate previous knowledge Analogy – inferring conclusions based on similarities with other situations  ANN Commonsense knowledge – A combination of all based on our experience

Reasoning Methods Deductive Reasoning (استدلال استنباطي) Inductive Reasoning (استدلال استقرايي) Abductive Reasoning (استدلال انتزاعي) Analogical Reasoning (استدلال قياسي) Common-Sense Reasoning (استدلال عقل سليم) Non-monotonic Reasoning (استدلال غيريكنواخت)

Deductive Reasoning (استدلال استنباطي) Reasoning where conclusions must follow from premises General to specific Application: Generating conclusions Implication: if every body standing in the rain, then he will get wet. Axiom: I am standing in the rain Conclusion: I will get wet

Inductive Reasoning (استدلال استقرايي) inference is from the specific case to the general Application: Generating rules Premise: Monkeys in the pittsburgh zoo eat bananas Premise: Monkeys in the cleveland zoo eat bananas Conclusion: In general , all monkeys eat banana

Abductive Reasoning (استدلال انتزاعي) Reasoning back from a true conclusion to the premises that may have caused the condition Implication: Ground is wet if it is raining Axiom: Ground is wet Conclusion: It is raining (?) A plausible reasoning might be “it’s raining”

Analogical Reasoning (استدلال قياسي) inferring conclusions based on similarities with other situations  ANN Tiger Frame : Specialization of : Animals Number of legs : 4 Eats : meat Lives : India and Southeast Asia Color : tawny with stripes If we state that a lion is like a tiger, we would naturally assume that they share many of the features

Common-Sense Reasoning (استدلال عقل سليم) A combination of all based on our experience it’s complicated Also named Heuristic reasoning It’s valuable in applications that required quick solution A loose fan belt usually causes a strong noise A mechanic might have found this common-sense knowledge from his experience

Non-monotonic Reasoning (استدلال غير يكنواخت) New evidence may invalidate previous knowledge Truth maintenance System Keep a record of what cause a fact to be asserted If the wind blows, then the cradle will rock If it’s windy, then the cradle is rock; but, after the wind is gone, we would expect the cradle to stop rocking.

Reasoning Methods (summary) deduction sound conclusions must follow from their premises induction unsound inference from specific cases (examples) to the general abduction unsound reasoning from a true conclusion to premises that may have caused the conclusion analogy unsound a conclusion is drawn based on similarities to another situation common-sense (heuristics) unsound rules of thumb, based on experience non-monotonic unsound new evidence may invalidate previous knowledge

Inference(استنتاج) The process used in an expert system of deriving new information from known information. Reasoning has a general meaning, even it is used for the human case; but inference is used for machine, i.e. AI & ES.

Some Rules of Inference (Modus Ponens)

Some Rules of Inference (continued)

Features of Propositional Logic Review: Features of Propositional Logic Artificial Intelligence: A modern approach, Norving & russel

Quiz با استفاده از قوانين منطق گزاره ای نشان دهيد، روابط زير صحيح هستند: (A^B=>C)معادل با ((A=>C)V(B=>C)) ((𝒂⇒𝒃)∧𝒂)⇒𝒂

Inference with Rules Firing a rule: When all of the rule's hypotheses (the “if parts”) are satisfied Can check every rule in the knowledge base in a forward or backward direction Continues until no more rules can fire, or until a goal is achieved

Forward and Backward Chaining Chain: a group of multiple inferences that connect a problem with its solution Search process: Forward chaining: if the premise matches the situation, then the process attempts to assert the conclusion Backward chaining: if the current goal is to determine the correct conclusion, then the process attempts to determine whether the premise clauses (facts) match the situation

Froward Chaining Inference process

Forward Chaining modus ponens: Unification (pattern matching): given a set of basic facts, we try to derive a conclusion from these facts example: What can we conclude about Clyde? IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant (Clyde) modus ponens: IF p THEN q p q Unification (pattern matching): find compatible values for variables

Forward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q IF elephant( x ) THEN mammal( x ) elephant (Clyde)

Forward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q IF elephant(Clyde) THEN mammal(Clyde) elephant (Clyde)

Forward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q IF mammal( x ) THEN animal( x ) IF elephant(Clyde) THEN mammal(Clyde) elephant (Clyde)

Forward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q IF mammal(Clyde) THEN animal(Clyde) IF elephant(Clyde) THEN mammal(Clyde) elephant (Clyde)

Forward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q animal(Clyde) IF mammal(Clyde) THEN animal(Clyde) IF elephant(Clyde) THEN mammal(Clyde) elephant (Clyde)

Forward Chaining

Conflict Resolution Strategy used for choosing a rule-firing sequence when more than one rule can fire Steps of the conflict resolution strategies: Recognize. Find the rules that can fire (making the conflict set) Resolve, If more than one rule can fire, choose one rule to fire according to some strategy. Act. Fire the rule and add its conclusion to the working memory.

Conflict Resolution Strategies First rule that matches contents of working memory. Highest priority rule. Most specific rule, (more # of premises) Rule that refers to the element most recently added to the working memory. Don't fire a rule that has already fired (preventing loop, used in the most strategies). Fire all rules with separate line of reasoning (parallel).

Backward Chaining modus ponens: Unification (pattern matching): try to find supportive evidence (i.e. facts) for a hypothesis example: Is there evidence that Clyde is an animal? IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant (Clyde) modus ponens: IF p THEN q p q Unification (pattern matching): find compatible values for variables

Backward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q ? animal(Clyde) IF mammal( x ) THEN animal( x )

Backward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q ? animal(Clyde) IF mammal(Clyde) THEN animal(Clyde)

Backward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q ? animal(Clyde) IF mammal(Clyde) THEN animal(Clyde) ? IF elephant( x ) THEN mammal( x )

Backward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q ? animal(Clyde) IF mammal(Clyde) THEN animal(Clyde) ? IF elephant(Clyde) THEN mammal(Clyde)

Backward Chaining Example IF elephant(x) THEN mammal(x) IF mammal(x) THEN animal(x) elephant(Clyde) unification: find compatible values for variables modus ponens: IF p THEN q p q animal(Clyde) IF mammal(Clyde) THEN animal(Clyde) IF elephant(Clyde) THEN mammal(Clyde) elephant (Clyde)

Backward Chaining

Forward-Chaining

Backward-Chaining

Forward Chaining v.s. Backward Chaining planning, monitoring, control diagnosis data-driven goal-driven (hypothesis) bottom-up processing top-down processing find possible conclusions supported by given facts find facts that support a given hypothesis similar to breadth-first search similar to depth-first search CLIPS PROLOG

Advantages and Disadvantages of Forward Chaining

Advantages and Disadvantages of Backward Chaining Many Expert Systems use a combination of backward and forward chaining

Family Example: Facts

Family Example: Rules

PROLOG Sample Inference

PROLOG Sample Inference

Mini Projects 1 Chapter 4 (Inference Engine) Due date: 94/1/20