Knowledge Representation & Reasoning

Slides:



Advertisements
Similar presentations
First-Order Logic.
Advertisements

ITCS 3153 Artificial Intelligence Lecture 15 First-Order Logic Chapter 9 Lecture 15 First-Order Logic Chapter 9.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Some Thoughts to Consider 7 What is the difference between Knowledge Engineering and Programming? What is the difference between Knowledge Engineering.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
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.
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
1 FOL CS 331/531 Dr M M Awais Unification “It is an algorithm for determining the substitutions needed to make two predicate calculus expressions match”
1 FOL Resolution based Inferencing Resolution based rules studied earlier can lead to inferences, rules such as modus ponen, unit resolution etc… Other.
CSCE 580 Artificial Intelligence Ch.9: Inference in First-Order Logic
1 FOL CS 331 Dr M M Awais Inferencing Finding solution to queries Propositionalization –(For reference only, may leave slides 2 to 7) Unification –Forward.
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 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.
1 FOL CS 331/531 Dr M M Awais Composition Find Overall Substitutions Given two or more sets of substitutions.
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”.
Inference in First-Order Logic Inference Rules with Quantifiers The three new inference rules are as follows: Universal Elimination: For any sentence ,
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 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.
CS 416 Artificial Intelligence Lecture 12 First-Order Logic Chapter 9 Lecture 12 First-Order Logic Chapter 9.
CSE S. Tanimoto Horn Clauses and Unification 1 Horn Clauses and Unification Propositional Logic Clauses Resolution Predicate Logic Horn Clauses.
Inference in first- order logic. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
Computing & Information Sciences Kansas State University Friday, 29 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 16 of 42 Friday, 29 September.
Inference in First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
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.
An Introduction to Artificial Intelligence – CE Chapter 9 - Inference in first-order logic Ramin Halavati In which we define.
1/19 Inference in first-order logic Chapter 9- Part2 Modified by Vali Derhami.
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
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.
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.
Knowledge Representation using First-Order Logic
Inference in first-order logic
Logical Agents Chapter 7.
Inference in First-Order Logic
Chapter 9 Inference in First-Order Logic
Horn Clauses and Unification
Inference in First-Order Logic
Inference in first-order logic part 1
Example of Knowledge Base
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
Inference in first-order logic
Inference in first-order logic part 1
Horn Clauses and Unification
Horn Clauses and Unification
Horn Clauses and Unification
Horn Clauses and Unification
RESOLUTION.
First-Order Logic Inference
CS 8520: Artificial Intelligence
First-Order Logic Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

Knowledge Representation & Reasoning Lecture 6: Logic Programming in First Order Logic (FOL) By : SHEREENA ARIF Room : T2//8, BLOK 4 Email : shereen@ftsm.ukm.my OR shereen.ma@gmail.com

Conversion to CNF Conjunctive Normal Form : a conjunction of clauses Where each clause is a disjunction of literals Example : x. American(x) ∧ Weapon(y) ∧ Sells(x,y,z) ∧ Hostile(z)  Criminal(x) In CNF (implication elimination rule): ¬American(x) ∨ ¬Weapon(y) ∨ ¬Sells(x,y,z) ∨ ¬Hostile(z) ∨ Criminal(x) 20/5/2011 TP2623 by Shereena Arif

Conversion to CNF 1. Convert to negated normal form a) Eliminate biconditional & implications b) Move  inwards using negation rules 2. Standardize variables e.g (x  y) to (x ∨ y) (x  y) to ((x  y) ∧ (y  x)) ∃x. p becomes ∀x. p OR  ∀x. p becomes ∃x. p ( x) to x == double elimination (x ∧ y) to (x) ∨ ( y) == De Morgan 1 (x ∨ y) to (x) ∧ ( y) == De Morgan 2 (∀x P(x)) ∨ (∃x Q(x))  == change the name of one of the variables to avoid confusion (i.e x) 20/5/2011 TP2623 by Shereena Arif

3. Skolemize : remove existential quantifiers by elimination. Translate [x P(x)] into P(A), A is the new constant. Each existential variable is replaced by a Skolem function of the enclosing universally quantified variables 4. Drop universal quantifiers: 5. Distribute  over  (or vice versa) using rules given: x [y Animal(y) ∧  Loves(x, y)] ∨ [z Loves(z,x)] becomes x [Animal(F(x)) ∧  Loves(x, F(x))] ∨ [Loves(G(x),x)] [Animal(F(x)) ∧  Loves(x, F(x))] ∨ [Loves(G(x),x)] [Animal(F(x)) ∨ Loves(G(x),x)] ∧ [Loves(x, F(x))∨ Loves(G(x),x)] 20/5/2011 TP2623 by Shereena Arif

What we have in the KB ... it is a crime for an American to sell weapons to hostile nations: American(x) ∧ Weapon(y) ∧ Sells(x,y,z) ∧ Hostile(z)  Criminal(x) CNF : ¬American(x) ∨ ¬Weapon(y) ∨ ¬Sells(x,y,z) ∨ ¬Hostile(z) ∨ Criminal(x) Owns(Nono,M1) and Missile(M1) … already in CNF … all of its missiles were sold to it by Colonel West Missile(x) ∧ Owns(Nono,x)  Sells(West,x,Nono) CNF : ¬Missile(x) ∨ ¬Owns(Nono,x) ∨ Sells(West,x,Nono) Missile(x)  Weapon(x) CNF : ¬Missile(x) ∨ Weapon(x) An enemy of America counts as "hostile“: Enemy(x,America)  Hostile(x) CNF : ¬Enemy(x,America) ∨ Hostile(x) American(West) … already in CNF Enemy(Nono,America) … already in CNF

Resolution proof: backward chaining 20/5/2011 TP2623 by Shereena Arif

Example All ducks are bird All birds can fly If it quacks, it is a duck Daffy quacks Question : Use resolution to prove that Daffy can fly… 20/5/2011 TP2623 by Shereena Arif

Latihan Diberi predicate & constants berikut dalam FOL : G(x) : x ialah seorang guru di sekolah S(x) : x ialah seorang murid di sekolah M(x) : x menghadiri mesyuarat kecemerlangan murid A(x, y) : x disertai oleh y P(x,y) : y ialah bapa kepada x Mariam ialah seorang murid Suria ialah seorang murid 20/5/2011 TP2623 by Shereena Arif

Tuliskan pernyataan berikut dalam FOL : A) Semua murid dan guru menghadiri mesyuarat kecemerlangan B) Tidak seorang pun murid yang menghadiri mesyuarat kecemerlangan disertai oleh bapa mereka C)Beberapa orang bapa daripada murid tidak menghadiri mesyuarat kecemerlangan. D) Jika semua guru menghadiri mesyuarat kecemerlangan, maka sebahagian murid sahaja yang disertai oleh bapa mereka. Mariam dan Suria menghadiri mesyuarat kecemerlangan, tetapi tidak seorangpun di antara mereka yang disertai oleh bapa masing-masing. 20/5/2011 TP2623 by Shereena Arif

Terjemahkan ayat FOL berikut ke dalam bentuk CNF : ∃x.∀y. p(x) ⇒ r(x,y) ∀x. ∃y. p(x) ∧ r(x,y) ¬∀x. ∃y. p(x) ∧ r(x,y) 20/5/2011 TP2623 by Shereena Arif

End of Topic FOL