1 Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator to.

Slides:



Advertisements
Similar presentations
First-Order Logic Chapter 8.
Advertisements

March 2, 2006AI: Chapter 8: First-Order Logic1 Artificial Intelligence Chapter 8: First-Order Logic Michael Scherger Department of Computer Science Kent.
First-Order Logic.
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
10 주 강의 First-order Logic. Limitation of propositional logic A very limited ontology  to need to the representation power  first-order logic.
Logic.
SE Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator.
Chương 3 Tri thức và lập luận. Nội dung chính chương 3 I.Logic – ngôn ngữ của tư duy II.Logic mệnh đề (cú pháp, ngữ nghĩa, sức mạnh biểu diễn, các thuật.
1 DCP 1172 Introduction to Artificial Intelligence Lecture notes for Ch.8 [AIAM-2nd Ed.] First-order Logic (FOL) Chang-Sheng Chen.
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 in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
CS 561, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
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.
CS 460, Session Midterm format Date: 10/07/2004 from 5:00pm – 6:30pm Location: WPH B27 (our regular classroom) Credits: 30% of overall grade Approx.
CS 460, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
CS 561, Session Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
FIRST-ORDER LOGIC FOL or FOPC
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
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.
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 Levent Tolga EREN.
Knowledge Interchange Format Michael Gruninger National Institute of Standards and Technology
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
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.
11 Artificial Intelligence CS 165A Thursday, November 1, 2007  First-order logic (Ch 8)  Inference in FOL (Ch 9) 1.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Predicate 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 Logic Introduction Syntax and Semantics Using First-Order Logic Summary.
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.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
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.
1 Propositional logic (cont…) 命題論理 Syntax&Semantics of first-order logic 構文論と意味論 Deducing hidden properties Describing actions Propositional logic (cont…)
11 Artificial Intelligence CS 165A Tuesday, October 30, 2007  Knowledge and reasoning (Ch 7) Propositional logic  First-order logic (Ch 8) 1.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 11 Jim Martin.
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.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
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.
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.
1 CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
First-Order Logic Chapter 8.
Last time: Logic and Reasoning
Knowledge and reasoning – second part
First-Order Logic Chapter 8.
Artificial Intelligence First Order Logic
EA C461 – Artificial Intelligence Logical Agent
First-Order Logic Chapter 8.
Chapter 8, Part 1 First Order Predicate Calculus FOPC
Knowledge and reasoning – second part
First-order Logic Propositional logic (cont…)
First Order Logic.
First-Order Logic Chapter 8.
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

1 Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator to add a sentence to the KB ASK: to query the KB Logics are KRLs where conclusions can be drawn Syntax Semantics Entailment: KB |= a iff a is true in all worlds where KB is true Inference: KB |– i a = sentence a can be derived from KB using procedure i Sound: whenever KB |– i a then KB |= a is true Complete: whenever KB |= a then KB |– i a

2 Last Time: Syntax of propositional logic

3 Last Time: Semantics of Propositional logic

4 Last Time: Inference rules for propositional logic

5 This time First-order logic Syntax Semantics Wumpus world example

6 Why first-order logic? We saw that propositional logic is limited because it only makes the ontological commitment that the world consists of facts. Difficult to represent even simple worlds like the Wumpus world; e.g., “don’t go forward if the Wumpus is in front of you” takes 64 rules

7 First-order logic (FOL) Ontological commitments: Objects: wheel, door, body, engine, seat, car, passenger, driver Relations: Inside(car, passenger), Beside(driver, passenger) Functions: ColorOf(car) Properties: Color(car), IsOpen(door), IsOn(engine) Functions are relations with single value for each object

8 Examples: “One plus two equals three” Objects: Relations: Properties: Functions: “Squares neighboring the Wumpus are smelly” Objects: Relations: Properties: Functions:

9 Examples: “One plus two equals three” Objects:one, two, three, one plus two Relations:equals Properties:-- Functions:plus (“one plus two” is the name of the object obtained by applying function plus to one and two; three is another name for this object) “Squares neighboring the Wumpus are smelly” Objects:Wumpus, square Relations:neighboring Properties:smelly Functions:--

10 FOL: Syntax of basic elements Constant symbols: 1, 5, A, B, USC, JPL, Alex, Manos, … Predicate symbols: >, Friend, Student, Colleague, … Function symbols: +, sqrt, SchoolOf, TeacherOf, ClassOf, … Variables: x, y, z, next, first, last, … Connectives: , , ,  Quantifiers: ,  Equality: =

11 FOL: Atomic sentences AtomicSentence  Predicate(Term, …) | Term = Term Term  Function(Term, …) | Constant | Variable Examples: SchoolOf(Manos) Colleague(TeacherOf(Alex), TeacherOf(Manos)) >((+ x y), x)

12 FOL: Complex sentences Sentence  AtomicSentence | Sentence Connective Sentence | Quantifier Variable, … Sentence |  Sentence | (Sentence) Examples: S1  S2, S1  S2, (S1  S2)  S3, S1  S2, S1  S3 Colleague(Paolo, Maja)  Colleague(Maja, Paolo) Student(Alex, Paolo)  Teacher(Paolo, Alex)

13 Semantics of atomic sentences Sentences in FOL are interpreted with respect to a model Model contains objects and relations among them Terms: refer to objects (e.g., Door, Alex, StudentOf(Paolo)) Constant symbols: refer to objects Predicate symbols: refer to relations Function symbols: refer to functional Relations An atomic sentence predicate(term 1, …, term n ) is true iff the relation referred to by predicate holds between the objects referred to by term 1, …, term n

14 Example model Objects: John, James, Marry, Alex, Dan, Joe, Anne, Rich Relation: sets of tuples of objects {,,, …} {,,, …} E.g.: Parent relation -- {,, } then Parent(John, James) is true Parent(John, Marry) is false

15 Quantifiers Expressing sentences of collection of objects without enumeration E.g., All Trojans are clever Someone in the class is sleeping Universal quantification (for all):  Existential quantification (three exists): 

16 Universal quantification (for all):   “Every one in the 561a class is smart”:  x In(561a, x)  Smart(x)  P corresponds to the conjunction of instantiations of P In(561a, Manos)  Smart(Manos)  In(561a, Dan)  Smart(Dan)  … In(561a, Clinton)  Smart(Clinton)  is a natural connective to use with  Common mistake: to use  in conjunction with  e.g:  x In(561a, x)  Smart(x) means “every one is in 561a and everyone is smart”

17 Existential quantification (there exists):   “Someone in the 561a class is smart”:  x In(561a, x)  Smart(x)  P corresponds to the disjunction of instantiations of P In(561a, Manos)  Smart(Manos)  In(561a, Dan)  Smart(Dan)  … In(561a, Clinton)  Smart(Clinton)  is a natural connective to use with  Common mistake: to use  in conjunction with  e.g:  x In(561a, x)  Smart(x) is true if there is anyone that is not in 561a! (remember, false  true is valid).

18 Properties of quantifiers

19 Example sentences Brothers are siblings Sibling is transitive One’s mother is one’s sibling’s mother A first cousin is a child of a parent’s sibling

20 Example sentences Brothers are siblings  x, y Brother(x, y)  Sibling(x, y) Sibling is transitive  x, y, z Sibling(x, y)  Sibling(y, z)  Sibling(x, z) One’s mother is one’s sibling’s mother  m, c Mother(m, c)  Sibling(c, d)  Mother(m, d) A first cousin is a child of a parent’s sibling  c, d FirstCousin(c, d)   p, ps Parent(p, d)  Sibling(p, ps)  Parent(ps, c)

21 Equality

22 Higher-order logic? First-order logic allows us to quantify over objects (= the first-order entities that exist in the world). Higher-order logic also allows quantification over relations and functions. e.g., “two objects are equal iff all properties applied to them are equivalent”:  x,y (x=y)  (  p, p(x)  p(y)) Higher-order logics are more expressive than first-order; however, so far we have little understanding on how to effectively reason with sentences in higher-order logic.

23 Logical agents for the Wumpus world 1.TELL KB what was perceived Uses a KRL to insert new sentences, representations of facts, into KB 2.ASK KB what to do. Uses logical reasoning to examine actions and select best. Remember: generic knowledge-based agent:

24 Using the FOL Knowledge Base

25 Wumpus world, FOL Knowledge Base

26 Deducing hidden properties

27 Situation calculus

28 Describing actions

29 Describing actions (cont’d)

30 Planning

31 Generating action sequences

32 Summary