Inference in FOL Compared to predicate logic, more abstract reasoning and specific conclusions.

Slides:



Advertisements
Similar presentations
Inference in First-Order Logic
Advertisements

Artificial Intelligence 8. The Resolution Method
Some Prolog Prolog is a logic programming language
Inference in first-order logic
First-Order Logic.
Inference Rules Universal Instantiation Existential Generalization
Standard Logical Equivalences
First-Order Logic (FOL) aka. predicate calculus. First-Order Logic (FOL) Syntax User defines these primitives: – Constant symbols (i.e., the "individuals"
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
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.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
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.
Logical Inference 1 introduction Chapter 9 Some material adopted from notes by Andreas Geyer-Schulz,, Chuck Dyer, and Mary Getoor.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Resolution in Propositional and First-Order Logic.
Predicate Calculus Russell and Norvig: Chapter 8,9.
First-Order Logic ECE457 Applied Artificial Intelligence Spring 2007 Lecture #7.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference and Resolution for Problem Solving
Knoweldge Representation & Reasoning
Inference in First-Order Logic
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Fall 2004.
Logic. Knowledge-based agents Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):
First order logic (FOL) first order predicate calculus.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2005.
Start with atomic sentences in the KB and apply Modus Ponens, adding new atomic sentences, until “done”.
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Propositional Calculus Composed of symbols –P – some true statement P might represent something like “It is Monday” or “the car is red” And sentences –a.
Logical Inference 2 rule based reasoning
Knowledge Representation IV Inference for First-Order Logic CSE 473.
Logical Agents Logic Propositional Logic Summary
First Order Predicate Logic
1.  Provides the ability to access individual assertions. e.g. in Predicate calculus we may say: P denotes “It rained on Tuesday” but in predicate calculus.
First Order Predicate Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
1 Inference in First Order Logic CS 171/271 (Chapter 9) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 First Order Logic CS 171/271 (Chapters 8 and 9) Some text and images in these slides were drawn from Russel & Norvig’s published material.
First-Order Logic ECE457 Applied Artificial Intelligence Fall 2007 Lecture #7.
Reasoning using First-Order Logic
Propositional Logic Predicate Logic
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 11 Jim Martin.
ECE457 Applied Artificial Intelligence R. Khoury (2007)Page 1 Implication Truth Table If α is true, then β must be true for the implication to be true.
Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
For Friday Finish chapter 9 Program 1 due. Program 1 Any questions?
Propositional Calculus
Inference in first-order logic
Logical Inference 1 introduction
Topics Covered since 1st midterm…
Inference in first-order logic part 1
Artificial Intelligence
First Order Logic: Logical Inference
Artificial Intelligence
Inference in first-order logic part 1
Inference in First Order Logic (1)
CS 188: Artificial Intelligence
Predicates and Quantifiers
The Foundations: Logic and Proofs
Presentation transcript:

Inference in FOL Compared to predicate logic, more abstract reasoning and specific conclusions

D. Goforth, COSC 4117, fall 2006 FOL knowledge bases  Facts about environment involve statements about specific objects E.g., Dentist(Bill), Likes(Mary, Candy)  General knowledge is mainly statements about sets of objects involving quantifiers E.g.,  x Dentist(x) ⇒ Likes(x, Candy)

D. Goforth, COSC 4117, fall 2006 Deductive reasoning from general to specific  how do quantified sentences get applied to facts? universal quantifier existential quantifier instantiation: substituting a reference to an object for a variable inference: conclusions entailed in KB

D. Goforth, COSC 4117, fall 2006 Instantiating Universal quantifier (UI)  x p(x)  statement is always true  any substitution makes a legitimate statement  format:  x p(x) subst( {x/k}, p(x) ) (K is any constant or function from KB) p(K)

D. Goforth, COSC 4117, fall 2006 Instantiating Existential quantifier (UI)  x p(x)  statement is true for some object  name the object for which it is true  format:  x p(x) subst( {x/k}, p(x) ) (k is a new constant, never used before Skolem constant) p(k)

D. Goforth, COSC 4117, fall 2006 Brute force reasoning  use instantiation to create a ‘propositional’ logic KB  complete BUT...  presence of functions causes infinitely large set of sentences (Father(Al), Father(Father(Al))  semi-decidable (disproofs never end)

D. Goforth, COSC 4117, fall 2006 Direct reasoning  x man(x)  mortal(x)  man(Socrates) 1.Substitute for instantiation: subst( {x/Socrates}, man(x)  mortal(x)) man(Socrates)  mortal(Socrates) 2.modus ponens mortal(Socrates)

D. Goforth, COSC 4117, fall 2006 Substitutions for reasoning  generalized modus ponens p 1, p 2, p 3, (p 1 ^ p 2 ^ p 3 )=> q subst( {x 1 /k 1, x 2 /k 2..}, q) Unification: substitutions so that the sentences are consistently instantiated

D. Goforth, COSC 4117, fall 2006 Substitutions for reasoning  generalized modus ponens example Parent(Art,Barb), Parent(Barb,Carl), (Parent(x,y) ^ Parent(y,z ) ⇒ Grandparent(x,z) subst( {x/Art, y/Barb,z/Carl}, q) (Parent(Art,Barb) ^ Parent(Barb,Carl ) ⇒ Grandparent(Art,Carl) Grandparent(Art,Carl)

D. Goforth, COSC 4117, fall 2006 Consistent substitutions  unification algorithm – p.278 or variant here example  x likes(Bill, x)(Bill likes everyone)  y likes(y, Mary) (everyone likes Mary) subst( {Bill/y, Mary/x}, likes(Bill, Mary)) makes two predicates identical

D. Goforth, COSC 4117, fall 2006 Application example  x likes(Bill, x)  y likes(y, Mary) => ~trusts(y,Father(Mary)) subst( {Bill/y, Mary/x}, likes(Bill, Mary)) makes two predicates identical likes(Bill, Mary), likes(Bill, Mary) => ~trusts(Bill,Father(Mary))  ~trusts(Bill,Father(Mary))

D. Goforth, COSC 4117, fall 2006 Examples  unify: Likes(x,Art), Likes(Father(y), y)  {Art/y} Likes(x,Art), Likes(Father(Art), Art)  {Art/y, Father(Art)/x}  unify: Likes(x,Art), Likes(Bart, x)  fails, can’t subst x for Art and Bart

D. Goforth, COSC 4117, fall 2006 Examples  unify: Likes(x,Art), Likes(Bart, x)  fails, can’t subst x for Art and Bart BUT where did ‘x’ come from?  Art likes everybody:  x Likes(x, Art)  Everybody likes Bart:  x Likes(Bart, x) standardize apart:  z 0 Likes(Bart, z 0 ) then Likes(Bart, Art) is OK with subst ( {Bart/x, Art/z 0 } )

Unify(L 1, L 2 ) // L 1, L 2 are both predicates or both objects 1.If (L 1 or L 2 is variable or constant) i.if (L 1 ==L 2 ) return {} (no subst required) ii.if (L 1 is variable) – if L 1 in L 2 return fail else return {L 2 /L 1 } iii.if (L 2 is variable) – if L 2 in L 1 return fail else return {L 1 /L 2 } iv.return fail // both constants or functions // L 1,L 2 are predicates if we get to here 2.If predicate symbols of L 1,L 2 not identical, return fail 3.If L 1,L 2 have different number of arguments, return fail 4.Subst = {} 5.For (i = 1 to number of arguments in L 1,L 2 ) i.S = Unify(L 1.argument[i],L 2.argument[i]) ii.if (S==fail) return fail iii.if (S!={}) apply S to remainder of L 1,L 2 Subst = Subst U S 6.Return Subst Unification algorithm

Unify(L 1, L 2 ) // L 1, L 2 are predicates or objects 1.If (L1 or L2 is variable or constant) i.if (L 1 ==L 2 ) Art, Art x,x ii.if (L 1 is variable) – if L 1 in L 2 return fail else return {L 2 /L 1 } x, Father(x) x, Mother(y) i.if (L 2 is variable) – if L 2 in L 1 return fail else return {L 1 /L 2 } ii.return fail Art, Bart // L 1,L 2 are predicates if we get to here 2.If predicates of L 1,L 2 not identical Likes(x,y) Brother(z,w) 3.If L 1,L 2 have different # of arguments Band(x,y,z), Band(t,v) 4.Subst = {} 5.For (i = 1 to # of args in L 1,L 2 ) i.S = Unify(L 1.arg[i],L 2.arg[i]) Likes(Bill,x) Likes(y,Father(y)) ii.if (S==fail) return fail iii.if (S!={}) apply S to remainder of L 1,L 2 Likes(Bill,x) Likes(Bill,Father(Bill)) Subst = Subst U S 6.Return Subst Unification algorithm - examples

D. Goforth, COSC 4117, fall 2006 Inference: Reasoning methods  Forward chaining  Backward chaining  Resolution

D. Goforth, COSC 4117, fall 2006 Resolution 1.convert sentences to equivalent conjunctive normal form (CNF) 2.apply resolution refutation