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.

Slides:



Advertisements
Similar presentations
Inference in first-order logic
Advertisements

Inference in First-Order Logic
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
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
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.
Predicate Calculus Russell and Norvig: Chapter 8,9.
1 Resolution in First Order Logic CS 171/271 (Chapter 9, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 First Order Logic. 2 Knowledge Representation & Reasoning  Introduction Propositional logic is declarative Propositional logic is compositional: meaning.
Inference in FOL All rules of inference for propositional logic apply to first-order logic We just need to reduce FOL sentences to PL sentences by instantiating.
First-Order Logic Inference
CSCE 580 Artificial Intelligence Ch.9: Inference in First-Order Logic
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Cooperating Intelligent Systems Inference in first-order logic Chapter 9, AIMA.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Inference in First-Order Logic
Cooperating Intelligent Systems Inference in first-order logic Chapter 9, AIMA.
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):
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2005.
1 Inference in First-Order Logic. 2 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
Cooperating Intelligent Systems Inference in first-order logic Chapter 9, AIMA.
CHAPTER 9 Oliver Schulte Inference in First-Order Logic.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Inference in First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
Inference in first-order logic I CIS 391 – Introduction to Artificial Intelligence AIMA Chapter (through p. 278) Chapter 9.5 (through p. 300)
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
1 Inference in first-order logic Chapter 9. 2 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
March 14, 2006AI: Chapter 9: Inference in First- Order Logic 1 Artificial Intelligence Chapter 9: Inference in First- Order Logic Michael Scherger Department.
Inference in first- order logic. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
Inference in FOL Compared to predicate logic, more abstract reasoning and specific conclusions.
Computing & Information Sciences Kansas State University Friday, 29 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 16 of 42 Friday, 29 September.
First Order Predicate Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
Inference in First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
Logic (Chapters 7-9).
1 Knowledge Representation & Reasoning First Order Logic chapter 6 Dr Souham Meshoul CAP492.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
1 Inference in First-Order Logic CS 271: Fall 2009.
5/18/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 13, 5/18/2005 University of Washington, Department of Electrical Engineering Spring.
1 First Order Logic (Syntax, Semantics and Inference)
An Introduction to Artificial Intelligence – CE Chapter 9 - Inference in first-order logic Ramin Halavati In which we define.
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.
Inference in first-order logic
Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
For Friday Finish chapter 9 Program 1 due. Program 1 Any questions?
Inference in First-Order Logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
1 Chaining in First Order Logic CS 171/271 (Chapter 9, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Inference in first-order logic
Inference in First-Order Logic
Inference in First-Order Logic
Inference in first-order logic part 1
Artificial intelli-gence 1:Inference in first-order logic
Artificial Intelligence
Artificial intelligence: Inference in first-order logic
Artificial Intelligence Inference in First Order Logic
First Order Logic: Logical Inference
Inference in first-order logic
Inference in first-order logic part 1
Inference in First Order Logic (1)
CS 188: Artificial Intelligence
First-Order Logic Inference
First-Order Logic Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

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

2 Inference Algorithms Reduction to Propositional Inference Lifting and Unification Chaining Resolution

3 Propositionalization Strategy: convert KB to propositional logic and then use PL inference Ground atomic sentences become propositional symbols What about the quantifiers?

4 Example KB in FOL:  x King(x)  Greedy(x)  Evil(x) King(John) Greedy(John) Brother(Richard,John) The last 3 sentences can be symbols in PL Apply Universal Instantiation to the first sentence

5 Universal Instantiation UI says that from a universally quantified sentence, we can infer any sentence obtained by substituting a ground term for the variable Back to Example From:  x King(x)  Greedy(x)  Evil(x) To: King(John)  Greedy(John)  Evil(John) King(Richard)  Greedy(Richard)  Evil(Richard) …

6 Issue with UI Ground terms: all symbols that refer to objects as well as function applications (recall that function applications return objects) For example, suppose Father is a function: Father(John) and Father(Richard) are also objects/ground terms But so are Father(Father(John)) and Father(Father(Father(John))) Infinitely many ground terms/instantiations

7 Existential Instantiation Whenever there is a sentence,  x P, introduce a new object symbol called the skolem constant and then add the unquantified sentence P, substituting the variable with that constant Example: From:  x Crown(x)  OnHead(x, John) To: Crown(C new )  OnHead(C new, John)

8 Substitution UI and EI apply substitutions A substitution is represented by a variable v and a ground term g; {v/g} Can have sets of these pairs if there are more variables involved Let  be a sentence (possibly containing v) SUBST( {v/g},  ) stands for the sentence that applies the substitution to 

9 UI and EI Defined UI:  v α ___ for any ground term g SUBST({v/g}, α) EI:  v α ___ for some constant symbol k not SUBST({v/k}, α) yet in the knowledge base

10 Back to Propositionalization Given a KB in FOL, convert KB to PL by 1. applying UI and EI to quantified sentences 2. converting atomic sentences to symbols If there are no functions (Datalog KB), UI application does not result in infinitely many sentences Regular PL Inference can now be carried out without problems What if there are functions?

11 Dealing with Infinitely Many Ground Terms Can set a depth-limit for ground terms Depth specifies levels of function nesting allowed Carry out reduction and inference process for depth 1, then 2, then 3, … Stop when entailment can be concluded This works if there is such a proof, but goes into an endless loop if there is not The strategy is complete The entailment problem in this sense is semidecidable

12 Inefficiencies in Propositionalization An inordinate number of irrelevant sentences may be generated, resulting from UI This motivates generating only those sentences that are important in entailment

13 Example Suppose KB contains:  x King(x)  Greedy(x)  Evil(x)  y Greedy(y) King(John) Suppose we want to conclude Evil(John) Because of the existence of objects other than John (such as Richard) and the existence of functions, UI will generate many sentences

14 Example, continued It is sufficient to generate: King(John)  Greedy(John)  Evil(John) Greedy(John) Which is just: SUBST( {x/John}, King(x)  Greedy(x)  Evil(x) ) SUBST( {y/John}, Greedy(y) ) Applying the substitution matches the Premises: King(x)  Greedy(x) With other sentences in the KB: Greedy(y), King(John)

15 Lifted Modus Ponens Lifting: Raising propositional inference rules to first order logic Example: Generalized Modus Ponens If there is a substitution θ, such that SUBST(θ, p i ) = SUBST(θ, p i ’) for all i, then p 1 ', p 2 ', …, p n ’, ( p 1  p 2  …  p n  q) _______________________________________________________________________________ SUBST(θ,q) In our example,  = {x/John, y/John}

16 Unification Process that makes logical expressions identical Goal: match the premises of implications so that conclusions can be derived UNIFY algorithm takes two sentences and returns a unifier (substitution) if it exists

17 Unification Algorithm

18 Unification Algorithm

19 About UNIFY UNIFY returns a Most General Unifier (MGU) There are efficiency issues with OCCUR-CHECK function May need to standardize apart: rename variables to avoid name clashes Unification is a key component of all first-order algorithms

20 What’s Next? Forward and backward chaining algorithms for FOL that use unification Resolution-based theorem proving systems