Types of logic. Propositional logic: syntax Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has.

Slides:



Advertisements
Similar presentations
1 Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms Inference in propositional.
Advertisements

Some Prolog Prolog is a logic programming language
Russell and Norvig Chapter 7
Inference Rules Universal Instantiation Existential Generalization
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
The Foundations: Logic and Proofs
CPSC 121: Models of Computation Unit 6 Rewriting Predicate Logic Statements Based on slides by Patrice Belleville and Steve Wolfman.
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 Use mathematical deduction to derive new knowledge.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
CSE115/ENGR160 Discrete Mathematics 01/26/12 Ming-Hsuan Yang UC Merced 1.
Knowledge and reasoning – second part
Knowledge Representation I Suppose I tell you the following... The Duck-Bill Platypus and the Echidna are the only two mammals that lay eggs. Only birds.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
CS 561, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
1 DCP 1172 Introduction to Artificial Intelligence Lecture notes for Chap. 7 & 10 [AIMA] Chang-Sheng Chen.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
CS 460, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
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?
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 8 Jim Martin.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Agents that Reason Logically Logical agents have knowledge base, from which they draw conclusions TELL: provide new facts to agent ASK: decide on appropriate.
1.5 Rules of Inference.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Discrete Mathematics and Its Applications
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Logical Inference 2 rule based reasoning
1 CMSC 471 Fall 2002 Class #10/12–Wednesday, October 2 / Wednesday, October 9.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Natural Deduction Proving Validity. The Basics of Deduction  Argument forms are instances of deduction (true premises guarantee the truth of the conclusion).
CSE LOGIC1 Propositional Logic An “adventure game” example Thinking?
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Ch 1.4: Basic Proof Methods I A theorem is a proposition, often of special interest. A proof is a logically valid deduction of a theorem, using axioms,
REVIEW : Quantifiers A key to predicate logic we have been ignoring is the inclusion of quantifiers You should recall from discrete that you can also write.
Chapter 4: Inference Techniques
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 11 Jim Martin.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
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.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1 UNIT-3 KNOWLEDGE REPRESENTATION. 2 Agents that reason logically(Logical agents) A Knowledge based Agent The Wumpus world environment Representation,
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.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
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.
Chapter 1 Logic and proofs
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Types of logic. Forward Chaining Forward Chaining or data-driven inference works by repeatedly: starting from the current state, matching the premises.
Knowledge and reasoning – second part
The Foundations: Logic and Proofs
Forward Chaining DFS can supply compatible bindings for forward chaining.
Knowledge and reasoning – second part
Foundations of Discrete Mathematics
Presentation transcript:

Types of logic

Propositional logic: syntax

Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has to be represented for each situation: e.g., “don’t go forward if the wumpus is in front of you” takes 64 rules 2. It cannot keep track of changes: If one needs to track changes, e.g., where the agent has been before then we need a timed-version of each rule. To track 100 steps we’ll then need 6400 rules for the previous example. Its hard to write and maintain such a huge rule- base Inference becomes intractable

Predicate logic Predicate Logic is more expressive, because it allows us to represent : Objects Predicates (facts) Variables

Thus, we can write Comet is a horse Prancer is a horse Comet is parent of Dasher Comet is a parent of Prancer Prancer is fast Dasher is a parent of Thunder Thunder is fast Thunder is a horse Dasher is a horse horse(Comet) horse(Prancer) parent-of(Comet,Dasher) parent-of(Comet,Prancer) fast(Prancer) parent-of(Dasher,Thunder) fast(Thunder) horse(Thunder) horse(Dasher)

Suppose we have the following rule (relation) R1: if x is-a horse x is-parent-of y y is-fast then x is valuable

Bindings In general, there will be variables in the rules which stand for arbitrary objects. We need to find bindings for them so that the rule is applicable.

Bindings

From these we can deduce that there are two possible bindings applicable to the rule: x = Comet and y = Prancer x = Dasher and y = Thunder Since x is valuable, Comet is valuable and Dasher is valuable

Forward Chaining Forward Chaining or data-driven inference works by repeatedly: starting from the current state, matching the premises of the rules (the IF parts), and performing the corresponding actions (the then parts) that usually update the knowledge base or working memory. The process continues until no more rules can be applied, or some cycle limit is met.

Forward Chaining

Backward Chaining Backward chaining or goal-driven inference works towards a final state by looking at the working memory to see if the sub-goal states already exist there. If not, the actions (the THEN parts) of the rules that will establish the sub-goals are identified and new sub-goals are set up for achieving the premises of those rules (the IF parts).

Backward Chaining The previous example now becomes:

Quantifiers A key to predicate logic we have been ignoring is the inclusion of quantifiers You should recall from discrete that you can also write statements such as –  x fast(x) -> horse(x) –  y fast(y) -> valuable(y)

Represent the following sentences in predicate logic with quantifiers 1.Schafer is a Hoosier 2.Hoosiers like basketball. 3.Children of basketball fans are basketball fans. 4.Basketball fans like the month of March. 5.Margaret is Schafer's daughter

One possible solution

Rules of Inference Modus Ponens p ^ (p -> q) -> q In other words, if you have an implication rule in the knowledge base AND the left hand side of the implication rule (the antecedent) then you can infer the right hand side of the rule (the consequent)

Rules of Inference Modus Ponens p ^ (p -> q) -> q p = Today is my birthday q = I get presents p -> q (“if today is my birthday than I will get presents”) Suppose that a knowledge base contains that statement PLUS the knowledge that today is my birthday. We can infer that I will get presents.

Rules of Inference Modus Tolens q’ ^ (p -> q) -> p’ In other words, if you have an implication rule in the knowledge base AND the negation of the consequent than you can imply the negation of the antecedent

Rules of Inference Modus Tolens q’ ^ (p -> q) -> p’ p = Today is my birthday q = I get presents p -> q (“if today is my birthday than I will get presents”) Suppose that a knowledge base contains that statement PLUS the knowledge that I will not get presents today. We can infer that today must not be my birthday.

CAUTION Do not try to use either p’ ^ (p -> q) -> q’ (If today is not my birthday than I can infer that I won’t get presents??? Not true!) q ^ (p -> q) -> p (If I get presents today it must be my birthday)

Consider the following Using rules of inference, what can you add to this knowledge base?