1 CS 2710, ISSP 2610 Chapter 8, Part 2 First Order Predicate Calculus FOPC.

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

Artificial Intelligence
First-Order Logic Chapter 8.
10 주 강의 First-order Logic. Limitation of propositional logic A very limited ontology  to need to the representation power  first-order logic.
Knowledge Representation Methods
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.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Artificial Intelligence Modal Logic
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
Introduction to Semantics To be able to reason about the meanings of utterances, we need to have ways of representing the meanings of utterances. A formal.
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 FOL or FOPC
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Predicate Calculus.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
110/19/2015CS360 AI & Robotics AI Application Areas  Neural Networks and Genetic Algorithms  These model the structure of neurons in the brain  Humans.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Pattern-directed inference systems
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.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
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 Logic Introduction Syntax and Semantics Using First-Order Logic Summary.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
1 Natural Language Processing Chapter Transition First we did words (morphology) Then we looked at syntax Now we’re moving on to meaning.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1 Logical Agents CS 171/271 (Chapter 7) 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.
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.
LOGIC. Logic in general  Logics are formal languages for representing information such that conclusions can be drawn  Syntax defines the sentences in.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
1 CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Propositional Logic (a.k.a. Sentential Logic)
Natural Language Processing
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 CS121 – Winter 2003.
Knowledge Representation using First-Order Logic
Knowledge and reasoning – second part
First-Order Logic Chapter 8.
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Logics for Data and Knowledge Representation
First-Order Logic Chapter 8.
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 22
Chapter 8, Part 1 First Order Predicate Calculus FOPC
Knowledge and reasoning – second part
Logics for Data and Knowledge Representation
Knowledge Representation I (Propositional Logic)
First-Order Logic Chapter 8.
Logical and Rule-Based Reasoning Part I
Chapter 8, Part 1 First Order Predicate Calculus FOPC
Representations & Reasoning Systems (RRS) (2.2)
Habib Ullah qamar Mscs(se)
Presentation transcript:

1 CS 2710, ISSP 2610 Chapter 8, Part 2 First Order Predicate Calculus FOPC

2 Sentence  AtomicSentence | (Sentence Connective Sentence) | Quantifier Variable,.. Sentence | ~Sentence AtomicSentence  Predicate(Term,…) | Term = Term Term  Function(Term,…) | Constant | Variable Connective   | ^ | v |  Quantifier  all, exists Constant  john, 1, … Variable  A, B, C, X Predicate  breezy, sunny, red Function  fatherOf, plus Knowledge engineering involves deciding what types of things Should be constants, predicates, and functions for your problem Review

3 Review Semantics of FOPC Interpretation: assignment of elements from the world and elements of the language The world consists of a domain of objects D, a set of predicates, and a set of functions

4 Review Semantics Each constant is assigned an element of the domain Each N-ary predicate is assigned a set of N-tuples Each N-ary function symbol is assigned a set of N+1 tuples that does not include any pair of tuples with the first N elements and different (n+1)st elements

5 Sample Domain Richard I, the Lionhearted ( ) King John II, John Lackland, Evil King John Their left legs A crown Picture in text (p. 291)

6 Predicate of brotherhood: –{, } Predicate of being on: { } Predicate of being a person: –{, } or just {J,R} Predicate of being the king: {J} Predicate of being a crown: {C} Function for left legs: {, } (book writes  JLL,  RLL) Predicate of being strong: {JLL} (Functions are total, so the crown and left legs have left legs too. Technical solution: it is the left leg of things that don’t have left legs. This is “invisible” and we will make no assertions about it, so we can ignore it)

7 Interpretation Specifies which objects, functions, and predicates are referred to by which constant symbols, function symbols, and predicate symbols. Under the intended interpretation: “richardI”, “richardLionhearted” refer to R; “johnII”,”johnLackland” refer to J; “crown” refers to the crown. “onHead”,”brother”,”person”,”king”, “isCrown”, “leftLeg”, “strong” [some changes 10/8; will be written on the board]

8 Lots of other possible interpretations 5 objects, so just for constants “richardI” and “johnII” there are 25 possibilities Note that the legs don’t have their own names! “johnII” and “johnLackland” may be assigned the same object, J

9 Why isn’t the “intended interpretation” enough? Vague notion. What is intended may be ambiguous (and often is, for non-toy domains) Logically possible: square(x) ^ round(x). Your KB has to include knowledge that rules this out.

10 Determining truth values of FOPC sentences Assign meanings to terms: –“johnII”  J; “leftLeg(johnII)”  JLL Assign truth values to atomic sentences –“brother(johnII,richardI)” –“brother(johnlackland,richardI)” – Both True, because is in the set assigned “brother” –“strong(leftleg(johnlackland))” –True, because JLL is in the set assigned “strong”

11 Determining Truth Values (continued) Connectives and negation are the same as in propositional logic All X G is True if G is true with X assigned d, for all d in the domain. Exists X G is True if G is true with X assigned d, for some d in the domain.

12 Examples given the Sample Interpretation All X,Y brother(X,Y) FALSE All X,Y ((person(X) ^ person(Y))  brother(X,Y)) FALSE All X,Y ((person(X) ^ person(Y) ^ ~(X=Y))  brother(X,Y)) TRUE Exists X crown(X) TRUE Exists X Exists Y sister(X,Y) FALSE

13 Representational Schemes What are the objects, predicates, and functions? you need to encode knowledge of specific problem instances and general knowledge. In practice, consider interpretations just to understand what the choices are. The world and interpretation are defined, or at least constrained, through the logical sentences we write.

14 Choices: Functions vs Predicates Rep-Scheme 1: tall(fatherOf(bob)). Rep-Scheme 2: Exists X (fatherOf(bob,X) ^ tall(X) ^ All Y (fatherOf(bob,Y)  X = Y)) “fatherOf” in both cases is assigned a set of 2-tuples: {,,…} But {,,,…} is possible if it is a predicate but not if it is a function

15 Choices: Predicates versus Constants Rep-Scheme 1: Let’s consider the world: D = {a,b,c,d,e}. red: {a,b,c}. pink: {d,e}. Some sentences that are satisfied by the intended interpretation: red(a). red(b). pink(d). ~(All X red(X)). All X (red(X) v pink(X)). But what if we want to say that red is a primary color and pink is not?

16 Choices: Predicates versus Constants Rep-Scheme 2: The world: D = {a,b,c,d,e,red,pink} colorof: {,,,, } primary: {red} color: {red,pink} Some sentences that are satisfied by the intended interpretation: colorOf(a,red). colorOf(b,red). colorOf(d,pink). ~(All X colorOf(X,red)). All X (colorOf(X,red) v colorOf(X,pink) v color(X)). ***~primary(pink). primary(red).*** We have reified predicates pink and red: made them into objects

Exercise [Design a representation scheme for these sentences:] 1.Emily is either a surgeon or a lawyer 2.Joe is an actor, but he also holds another job 3.All surgeons are doctors 4.Joe does not have a lawyer (i.e., he isn’t the customer of a lawyer) 5.There exists a lawyer all of whose customers are doctors 6.Every surgeon has a lawyer Note: imagine that implications are also added, so the system can reason about people and their jobs job, customer, doctor, surgeon, lawyer, actor, emily, joe 17

Wrap-up Read everything in Chapter 8 carefully, including the examples in