Docsity

08firstorderlogic, Lecture notes of Computational Methods

Partial preview of the text

Download 08firstorderlogic and more Lecture notes Computational Methods in PDF only on Docsity!

Introduction to Artificial Intelligence

First-order Logic

(Logic, Deduction, Knowledge Representation) Bernhard Beckert U NIVERSITÄT K OBLENZ -L ANDAU Winter Term 2004/ B. Beckert: KI für IM

Outline

Why first-order logic? Syntax and semantics of first-order logic Fun with sentences Wumpus world in first-order logic B. Beckert: KI für IM

Pros and Cons of Propositional Logic

Propositional logic is declarative : pieces of syntax correspond to facts Propositional logic allows partial / disjunctive / negated information(unlike most data structures and databases) B. Beckert: KI für IM

Pros and Cons of Propositional Logic

Propositional logic is declarative : pieces of syntax correspond to facts Propositional logic allows partial / disjunctive / negated information(unlike most data structures and databases) Propositional logic is compositional : meaning of

B

1 ,^1

P

1 ,^2 is derived from meaning of

B

1 ,^1 and of

P

1 ,^2 B. Beckert: KI für IM

Pros and Cons of Propositional Logic

Propositional logic is declarative : pieces of syntax correspond to facts Propositional logic allows partial / disjunctive / negated information(unlike most data structures and databases) Propositional logic is compositional : meaning of

B

1 ,^1

P

1 ,^2 is derived from meaning of

B

1 ,^1 and of

P

1 ,^2 Meaning in propositional logic is context-independent (unlike natural language, where meaning depends on context) Propositional logic has very limited expressive power(unlike natural language) Example: Cannot say “pits cause breezes in adjacent squares”except by writing one sentence for each square B. Beckert: KI für IM

First-order Logic^ Propositional logic^ Assumes that the world contains

facts B. Beckert: KI für IM

First-order Logic^ Propositional logic^ Assumes that the world contains

facts First-order logic Assumes that the world contains Objects people, houses, numbers, theories, Donald Duck, colors, centuries,

Relations red, round, prime, multistoried,

brother of, bigger than, part of, has color, occurred after, owns,

B. Beckert: KI für IM

First-order Logic^ Propositional logic^ Assumes that the world contains

facts First-order logic Assumes that the world contains Objects people, houses, numbers, theories, Donald Duck, colors, centuries,

Relations red, round, prime, multistoried,

brother of, bigger than, part of, has color, occurred after, owns,

Functions + , middle of, father of, one more than, beginning of,

B. Beckert: KI für IM

Syntax of First-order Logic:

Basic Elements

Symbols Constants KingJohn

Koblenz

C

Predicates Brother

Functions Sqrt

LeftLegOf

Variables x

y

,^

a

b

Connectives

Quantifiers

Note The equality predicate is always in the vocabulary It is written in infix notation B. Beckert: KI für IM

Syntax of First-order Logic:

Atomic Sentences

Atomic sentence predicate

term 1

term n

or term 1

term 2 B. Beckert: KI für IM

Syntax of First-order Logic:

Atomic Sentences

Example Brother

KingJohn

RichardTheLionheart

B. Beckert: KI für IM

Syntax of First-order Logic:

Atomic Sentences

Example Brother ︸

predicate

KingJohn^ ︸

constant

RichardTheLionheart ︸

constant

B. Beckert: KI für IM

Syntax of First-order Logic:

Atomic Sentences

Example Brother ︸

predicate

KingJohn^ ︸

constant ︸

term

RichardTheLionheart ︸

constant ︸

term

atomic sentence B. Beckert: KI für IM

Syntax of First-order Logic:

Atomic Sentences

Example

Length

LeftLegOf

Richard

,^

Length

LeftLegOf

KingJohn

B. Beckert: KI für IM