1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.

Slides:



Advertisements
Similar presentations
Knowledge Representation using First-Order Logic
Advertisements

First-Order Logic Chapter 8.
Knowledge Representation using First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
First-Order Logic.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Artificial Intelligence Lecture No. 10 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
First-Order Logic. Limitations of propositional logic Suppose you want to say “All humans are mortal” –In propositional logic, you would need ~6.7 billion.
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
CS 561, Session Midterm format Date: 10/10/2002 from 11:00am – 12:20 pm Location: THH 101 Credits: 35% of overall grade Approx. 4 problems, several.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
Let remember from the previous lesson what is Knowledge representation
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Knowledge Representation using First-Order Logic (Part III) This lecture: R&N Chapters 8, 9 Next lecture: Chapter 13; Chapter (Please read lecture.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Predicate Calculus.
CE An introduction to Artificial Intelligence CE Chapter 8: First Order Logic Ramin Halavati In which we notice that.
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site.
First-Order Logic Knowledge Representation Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read:
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
1 CS 2710, ISSP 2610 Chapter 8, Part 2 First Order Predicate Calculus FOPC.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator to.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
1 First-Order Logic Chapter 8. 2 Why FOL? –How do you say “All students are smart?” –Some students work hard –Hardworking students have good marks –If.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Predicate Logic.
Knowledge Representation using First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
Limitation of propositional logic  Propositional logic has very limited expressive power –(unlike natural language) –E.g., cannot say "pits cause breezes.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
First Order Predicate Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CS 666 AI P. T. Chung First-Order Logic First-Order Logic Chapter 8.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
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.
Artificial Intelligence First-Order Logic (FOL). Outline of this Chapter The need for FOL? What is a FOL? Syntax and semantics of FOL Using FOL.
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.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
First-Order Logic Chapter 8 (not 8.1). Outline Why FOL? Why FOL? Syntax and semantics of FOL Syntax and semantics of FOL Using FOL Using FOL Wumpus world.
First-Order Logic. Outline Why FOL? Syntax and semantics of FOL Using FOL Knowledge engineering in FOL.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
5/16/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 12, 5/16/2005 University of Washington, Department of Electrical Engineering Spring.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
1 CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 7 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Artificial Intelligence Logical Agents Chapter 7.
First-Order Logic Knowledge Representation
First-Order Logic Chapter 8.
First-Order Logic.
Knowledge Representation using First-Order Logic
First-Order Logic Chapter 8.
Artificial Intelligence First Order Logic
Notes 8: Predicate logic and inference
First-Order Logic Knowledge Representation
First-Order Logic Chapter 8.
Artificial Intelligence: Agents and First-Order Logic
First-Order Logic Chapter 8.
Knowledge Representation using First-Order Logic (Part III)
First-Order Logic Knowledge Representation
Chapter 1: Propositional and First-Order Logic
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
First-Order Logic Chapter 8.
First-Order Logic Chapter 8.
Presentation transcript:

1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material

2 Propositional Logic Limitations Stating similar facts is cumbersome Can’t make generalizations World contains facts, not objects Natural language deals with objects (nouns) and relations (verbs), hence is more expressive Ontological commitment of PL is limited

3 First Order Logic World consists of Objects Relations Functions Sentences are made up of Symbols: for constant objects, predicates, and functions Connectives: as in PL Quantifiers and variables:  x,  y

4 FOL Syntax Sentence Atomic Sentence ( Sentence Connective Sentence )  Sentence Quantifier Variable Sentence Atomic Sentence Predicate-Symbol( Term, … ) Term = Term

5 FOL Syntax Term (refers to an object) Function-Symbol( Term, … ) Constant-Symbol Variable Connective: , , , , Quantifier: ,  Variable: x, y, z, …

6 Example

7 Symbols Constants: John, Richard, C, L1, L2 Predicates: Person={John, Richard} King={Richard} Crown={C} Brother={(John,Richard),(Richard,John)} OnHead={(C,Richard)} Functions: LeftLeg={(Richard->L1),(John->L2)} (strictly speaking, the function should be total)

8 Models and Interpretations A model in FOL consists of the objects (domain elements) and relations (including functions) See example diagram “conceptual” view of world An interpretation associates the symbols to the objects, relations, and functions in the model Number of interpretations for a given set of symbols is combinatorially explosive

9 Semantics Truth of a sentence in FOL: Determined with respect to a model and an interpretation Analogous notions for entailment, validity, and satisfiability Model enumeration is impractical in FOL

10 Sample Sentences Person(John)  Person(Richard) OnHead(C, John) LeftLeg(John) = L1  LeftLeg(Richard) = L1 Richard, and LeftLeg(John) are examples of terms (a term is an expression that refers to an object) Atomic Sentences: constructed by equating terms (=) or by a predicate (with terms as arguments) Complex Sentences: sentences with connectives

11 Quantifiers Universal Quantification  x P is true in a model m iff P is true with x being each possible object in the model A conjunction of instantiations Existential Quantification  x P is true in a model m iff P is true with x being some object in the model A disjunction of instantiations

12 Sample Sentences Using Quantifiers  x King(x)  Person(x)  x Crown(x)  OnHead(x,John) “John has a crown on his head”  x  y Brother(x,y)  Brother(y,x)  x  y Brother(x,Richard)  Brother(y,Richard)   (x=y) “Richard has at least 2 brothers”

13 Properties of Quantifiers Nested Quantifiers  x  y P equivalent to  y  x P  y  x P equivalent to  y  x P Does not apply if quantifiers are different De Morgan’s law for quantifiers  x  P   x P  x P   x  P  x  P   x P  x P   x  P

14 More About Quantifiers Be careful when: Using quantifiers ( ,  ) in combination with ,  The domain consists of multiple kinds of objects In the quantified sentence (such as  x P or  x P), P would typically contain terms that are variables Not just ground terms (terms that have no variables)  x P as a query: binding list more important than truth of the sentence

15 Axioms and Theorems Axioms are sentences that represent first principles Plain facts Definitions Theorems are sentences entailed by axioms

16 Some Useful Domains Natural Numbers Built from 0, successor function S, and Peano axioms Sets , , , , and element insertion Lists Nil, Cons, Append, First, Rest, Find, …

17 FOL and the Wumpus World We can represent the Wumpus World in a more compact fashion Less sentences needed to represent rules We can include time and percept objects in the world A percept is represented as a list of constant symbols Predicates with time arguments capture the dynamic nature of the agent moving in this world

18 Knowledge Engineering Identify the task Assemble the relevant knowledge Decide on a vocabulary Encode general knowledge of the domain Encode the specific problem instance Pose queries to the inference procedure Debug the knowledge base