propositional logic agenda: other forms of inference in propositional logic basics of first order...

29
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

Post on 22-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

Propositional Logic

Agenda:

Other forms of inference in propositional logicBasics of First Order Logic (FOL)Vision

Final Homework now posted on web site

Page 2: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

2

Announcements

Final Exam Date Dec. 19th

1:10-4pm 833 Mudd

Getting homeworks back Game playing will be returned 12/10 in class Machine learning will be returned in final exam Class participation grade will be posted by 12/10

Midterm curve will be given in class 12/10 Final class will wrap up vision and do what’s

next and review

Page 3: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

3

Types of Inference

Resolution Theorem proving

Model Checking

Forward chaining with modus ponens

Backward chaining with modus ponens

Page 4: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

4

One Problem done all ways

Page 5: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

5

Model Checking

Enumerate all possible worlds

Restrict to possible worlds in which the KB is true

Check whether the goal is true in those worlds or not

Page 6: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

6

Inference as Search

State: current set of sentences Operator: sound inference rules to derive

new entailed sentences from a set of sentences

Can be goal directed if there is a particular goal sentence we have in mind

Can also try to enumerate every entailed sentence

Page 7: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

7

Page 8: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

8

Page 9: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

9

Page 10: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

10

Page 11: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

11

Example

Page 12: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

12

Characteristics of FOL

Declarative

Expressive Partial information Negation

Compositionality

Page 13: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

13

Ontological Commitment

Propositional logic: There are facts that either hold or do not hold

in the world Logic constrains facts

First-order logic: The world consists of objects and relations

between objects Logic constrains allowable objects, properties

of objects, relations between objects

Page 14: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

14

Ontological commitments of higher order logics

Temporal logic Facts hold at particular times and those times

are ordered Epistemological

Agents hold beliefs about facts Three possible states of knowledge

The agent believes a fact The agent does not believe it The agent has no opinion

Probabilistic Facts are true to different degrees (Truth

value from 0 to 1)

Page 15: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

15

Problems with propositional logic

Page 16: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

16

Page 17: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

17

Propositional Logic is lacking in expressiveness

Cannot represent knowledge of complex environments in a concise way

E.g., Squares adjacent to pits are breezy

Need objects Squares, pits, Kathy

Need relations Adjacent, breezy, smelly, know

Need functions Father-of, mother-of

Page 18: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

18

Syntax of FOL: basic elements

Constants: Charles, Ken, Victor Predicates: knows, adjacent, > Functions: Sqrt, father-of Variables: x,y,a,b Connectives: Λ,V,⌐,→,↔ Equality: = Quantifiers: ,

Page 19: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

19

Atomic Sentences

Atomic sentence = predicate (term1…termm) or term1=term2

Term = function (term1, …, termm) or constant or variable

E.g. know(Charles,Ken), Adjacent (x,y), father-of(Kathy) = Michael, Victor, x

Page 20: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

20

Complex Sentences

Complex sentences are made from atomic sentences using connectives

⌐S, S1ΛS2, S1VS2, S1S2, S1S2

E.g., adjacent(x,y) adjacent (y,x), ⌐knows(Charles, Michael),

Page 21: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

21

Truth in First-order Logic

Sentences are true with respect to a model and an interpretation

Model contains 1 objects (domain elements) and relations among them

Interpretation specifies referents for Constant symbols -> objects Predicate symbols -> relations Function symbols -> functional relations

An atomic sentence predicate (term1,…,termn) is true iff the objects referred to by term1,…, termn are in the relation referred to by predicate.

Page 22: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

22

Universal quantification

<variables> <sentence>

Everyone at Columbia is smart:x At(x,Columbia) Smart(x)

x P is true in a model m iff P with x being each possible object in the model

At (Leia, Columbia) Smart(Leia)At (Ryan, Columbia) Smart (Ryan)At (Archana, Columbia) Smart (Archana)At (Stanley, Columbia) Smart (Stanley)…..

Page 23: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

23

A common mistake

Typically, is the main connective used with

Common mistake: using as the main connective Λ x At(x,Columbia) Λ Smart(x)

Page 24: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

24

Existential Quantification

<variables> <sentence>

Someone at Columbia is smartx At(x,Columbia) Smart(x)

x P is true in a model m iff P with x being each possible object in the model

Equivalent to the disjunction of instantiations of PAt (Leia, Columbia) Λ Smart(Leia)V At (Ryan, Columbia) Λ Smart (Ryan)V At (Archana, Columbia) Λ Smart (Archana)V At (Stanley, Columbia) Λ Smart (Stanley)

Page 25: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

25

Another Common Mistake

Typically, Λ is the main connective with

Common mistake: using as the main connective x At(x,Columbia) Smart(x)

Page 26: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

26

Properties of Quantifiers

x y is the same y x x y is the same as y x x y is not the same as y x

x y Loves(x,y)

y x Loves(x,y) Everyone is loved by someone.

Quantifier duality: each can be expressed using the other x Likes (x,Icecream) ⌐ x ⌐ Likes(x,IceCream) x Likes(x, Broccoli) ⌐ x ⌐ Likes(x,Broccoli)

Page 27: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

27

Properties of Quantifiers

x y is the same y x x y is the same as y x x y is not the same as y x

x y Loves(x,y) There is a person who loves everyone in the world y x Loves(x,y)

Quantifier duality: each can be expressed using the other x Likes (x,Icecream) ⌐ x ⌐ Likes(x,IceCream) x Likes(x, Broccoli) ⌐ x ⌐ Likes(x,Broccoli)

Page 28: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

28

Properties of Quantifiers

x y is the same y x x y is the same as y x x y is not the same as y x

x y Loves(x,y) There is a person who loves everyone in the world y x Loves(x,y) Everyone is loved by someone.

Quantifier duality: each can be expressed using the other x Likes (x,Icecream) ⌐ x ⌐ Likes(x,IceCream) x Likes(x, Broccoli) ⌐ x ⌐ Likes(x,Broccoli)

Page 29: Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site

29

Translation from English to FOL

A mother is a female parent

Andrew likes one of the homework problems

?