Cooperating intelligent systems
Download
1 / 38

Cooperating Intelligent Systems - PowerPoint PPT Presentation


  • 301 Views
  • Updated On :

Cooperating Intelligent Systems. First-order predicate logic Chapter 8, AIMA. Why first order logic (FOL)?. Logic is a language we use to express knowledge. Propositional (boolean) logic is too limited; complex environments cannot be described in a concise way.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Cooperating Intelligent Systems' - Renfred


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Cooperating intelligent systems l.jpg

Cooperating Intelligent Systems

First-order predicate logic

Chapter 8, AIMA


Why first order logic fol l.jpg
Why first order logic (FOL)?

  • Logic is a language we use to express knowledge.

  • Propositional (boolean) logic is too limited; complex environments cannot be described in a concise way.

  • First order logic (predicate calculus) can express common-sense knowledge.


Limitations of propositional logic l.jpg

4

3

2

1

2

3

4

1

Limitations of propositional logic

B

C


We would like something like l.jpg

4

3

2

1

2

3

4

1

B

C

We would like something like


First order logic fol l.jpg
First-order logic (FOL)

Builds on:

  • Objects:Man, woman, house, car, conflict,...

  • Relations (between objects): Unary properties (red, green, nice,...)N-ary relations (larger, below,...)

  • Functions:Father of, brother of, beginning of


First order logic fol syntax l.jpg
First-order logic (FOL)Syntax

Components

ConstantsA, 125, Q, John, KingJohn, TheCrown, EiffelTower, Wumpus, HH, Agent,...

Function constants (of all ”arities”)FatherOf1, DistanceBetween2, Times2, LeftLegOf1, NeighborOf1, King1,...

Relations (predicates, of all ”arities”)Parent2, Brother2, Married2, Before2, Ontop2, Orange1,...

Connectives and separators∨ ∧ ¬ ⇒ ( ) ,

The superscript denotes the ”arity” = the number of arguments


First order logic fol syntax7 l.jpg
First-order logic (FOL)Syntax

Components

ConstantsA, 125, Q, John, KingJohn, TheCrown, EiffelTower, Wumpus, HH, Agent,...

Function constants (of all ”arities”)FatherOf1, DistanceBetween2, Times2, LeftLegOf1, NeighborOf1, KingOf1,...

FatherOf(John)

DistanceBetween(Timisoara,Lugoj)

Times(6,8)LeftLegOf(KingJohn)NeighborOf(Square31)KingOf(England)


First order logic fol syntax8 l.jpg

B

C

First-order logic (FOL)Syntax

Components

ConstantsA, 125, Q, John, KingJohn, TheCrown, EiffelTower, Wumpus, HH, Agent,...

Relations (predicates, of all ”arities”)Parent2, Brother2, Married2, Before2, Ontop2, Orange1,...

Parent(Bill,John)

Brother(RichardTheLionheart,KingJohn)

Married(CarlXVIGustaf,Silvia)Before(A,B)OnTop(Block(B),Block(C))Orange(Block(C))


Slide9 l.jpg

Unary

Binary

R = RichardTheLionheart

J = KingJohn

C = Crown

Object constants

Function constants

LeftLegOf(R)

LeftLegOf(J)

Relations (predicates)

Person(R)

Person(J)

King(J)

Crown(C)

Brother(J,R)

Brother(R,J)

OnHead(C,J)


First order logic fol syntax10 l.jpg
First-order logic (FOL)Syntax

Terms

  • An object constant is a term

  • A complete function constant is a term (complete = all arguments given)

  • A variable is a term(more on this later...)


First order logic fol syntax11 l.jpg
First-order logic (FOL)Syntax

Sentences

Atomic sentenceA complete predicate symbol (relation)Brother(RichardTheLionheart,KingJohn), Dead(Mozart), Married(CarlXVIGustaf,Silvia), Orange(Block(C)),...

Complex sentenceFormed by sentences and connectivesDead(Mozart) ∧ Composer(Mozart), ¬King(RichardTheLionheart) ⇒ King(KingJohn),King(CarlXVIGustaf) ∧ Married(CarlXVIGustaf,Silvia) ⇒ Queen(Silvia)

Semantics: The truth value of complex sentences is determined with truth tables


Example block world l.jpg

A

B

C

Example: Block world


First order logic fol syntax13 l.jpg
First-order logic (FOL)Syntax

Variables and quantifiers

Variables refer to unspecified objects in the domain. They are denoted by lower case letters (at the end of the alphabet)x, y, z, ...

Quantifiers constrain the meaning of a variable in a sentence. There are two quantifiers: ”For all” (∀) and ”There exists” (∃)

Existential quantifier

Universal quantifier


First order logic fol syntax14 l.jpg
First-order logic (FOL)Syntax

Variables and quantifiers

(∀ ”For all...”)



First order logic fol syntax16 l.jpg
First-order logic (FOL)Syntax

Variables and quantifiers

(∃ ”There exists...”)


First order logic fol syntax17 l.jpg
First-order logic (FOL)Syntax

Variables and quantifiers

(∃ ”There exists...”)



First order logic fol syntax19 l.jpg
First-order logic (FOL)Syntax

Nested quantifiers


First order logic fol syntax20 l.jpg
First-order logic (FOL)Syntax

Nested quantifiers

The order of ∀ and ∃ matters!


Quantifier duality l.jpg
Quantifier duality

DeMorgan’s rules

Ponder these for a while...


Family fun l.jpg
Family fun

Family axioms:

”A mother is a female parent”

”A husband is a male spouse”

”You’re either male or female”

”A child’s parent is the parent of the child” (sic!)

”My grandparents are the parents of my parents”

”Siblings are two children who share the same parents”

”A first cousin is a child of the siblings of my parents”

...etc.

Family theorems:

Sibling is reflexive

© 1998, Jon A. Davis

Write these in FOL


Family fun23 l.jpg
Family fun

Family axioms:

∀m,c (m = Mother(c)) ⇔ (Female(m) ∧ Parent(m,c))

∀w,h Husband(h,w) ⇔ Male(h) ∧ Spouse(h,w)

∀x Male(x) ⇔¬Female(x)

∀p,c Parent(p,c) ⇔Child(c,p)

∀g,c Grandparent(g,c) ⇔∃p (Parent(g,p) ∧ Parent(p,c))

∀x,y Sibling(x,y) ⇔ (∃p (Parent(p,x) ∧ Parent(p,y))) ∧ (x ≠ y)

∀x,y FirstCousin(x,y) ⇔∃p,s (Parent(p,x) ∧ Sibling(p,s) ∧ Parent(s,y))

...etc.

Family theorems:

∀x,y Sibling(x,y) ⇔ Sibling(y,x)

...etc.

© 1998, Jon A. Davis

Spouse(Gomez,Morticia)Parent(Morticia,Wednesday)Sibling(Pugsley,Wednesday)Sister(Ophelia,Morticia)FirstCousin(Gomez,Itt)

∃p (Parent(p,Morticia) ∧ Sibling(p,Fester))


Matematical fun l.jpg
Matematical fun

  • ”The square of every negative integer is positive”

    • ∀x [Integer(x) ∧ (x > 0)⇒ (x2 > 0)]

    • ∀x [Integer(x) ∧ (x < 0)⇒ (x2 > 0)]

    • ∀x [Integer(x) ∧ (x ≤ 0)⇒ (x2 > 0)]

    • ∀x [Integer(x) ∧ (x < 0)∧ (x2 > 0)]

  • ”Not every integer is positive”

    • ∀x [¬Integer(x) ⇒(x > 0)]

    • ∀x [Integer(x) ⇒(x ≤ 0)]

    • ∀x [Integer(x) ⇒¬(x > 0)]

    • ¬∀x [Integer(x) ⇒(x > 0)]

Borrowed from http://people.hofstra.edu/faculty/Stefan_Waner/RealWorld/logic/logic7.html


Matematical fun25 l.jpg
Matematical fun

  • ”The square of every negative integer is positive”

    • ∀x [Integer(x) ∧ (x > 0)⇒ (x2 > 0)]

    • ∀x [Integer(x) ∧ (x < 0)⇒ (x2 > 0)]

    • ∀x [Integer(x) ∧ (x ≤ 0)⇒ (x2 > 0)]

    • ∀x [Integer(x) ∧ (x < 0)∧ (x2 > 0)]

  • ”Not every integer is positive”

    • ∀x [¬Integer(x) ⇒(x > 0)]

    • ∀x [Integer(x) ⇒(x ≤ 0)]

    • ∀x [Integer(x) ⇒¬(x > 0)]

    • ¬∀x [Integer(x) ⇒(x > 0)]

Borrowed from http://people.hofstra.edu/faculty/Stefan_Waner/RealWorld/logic/logic7.html


The wumpus world revisited l.jpg

4

3

2

1

2

3

4

1

The Wumpus world revisited

Object constants: Square s = [x,y], Agent, Time (t), Percept p = [p1,p2,p3,p4,p5], Gold

Predicates:

Pit(s), Breezy(s), EvilSmelling(s), Wumpus(s), Safe(s), Breeze(p,t), Stench(p,t), Glitter(p,t), Wall(p,t), Scream(p,t), Adjacent(s,r), At(Agent,s,t), Hold(Gold,t)

cf. the 275 rules in boolean KB

(There are other possible representations)


Puzzles with nested quantifiers l.jpg
Puzzles with nested quantifiers

  • Are both these statements true?

TRUE

FALSE


Puzzles with nested quantifiers28 l.jpg
Puzzles with nested quantifiers

  • Are both these statements true?

TRUE

FALSE


Translations l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • The product of two negative integers is positive

  • The difference of two negative integers is not necessarily negative

Examples borrowed from Aaron Blomfield @ University of Virginia & Kenneth Rosen, Discrete Math and Its Applications, 5th edition. McGraw Hill, 2003


Translations30 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • The product of two negative integers is positive

  • The difference of two negative integers is not necessarily negative

Examples borrowed from Aaron Blomfield @ University of Virginia & Kenneth Rosen, Discrete Math and Its Applications, 5th edition. McGraw Hill, 2003


Translations31 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • The product of two negative integers is positive

  • The difference of two negative integers is not necessarily negative

Examples borrowed from Aaron Blomfield @ University of Virginia & Kenneth Rosen, Discrete Math and Its Applications, 5th edition. McGraw Hill, 2003


Translations32 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • The product of two negative integers is positive

  • The difference of two negative integers is not necessarily negative

Why not ∧ ?

Why not ⇒ ?

Examples borrowed from Aaron Blomfield @ University of Virginia & Kenneth Rosen, Discrete Math and Its Applications, 5th edition. McGraw Hill, 2003


Translations33 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • The product of two negative integers is positive

  • The difference of two negative integers is not necessarily negative

Can we write yx ?

Why not ∧ ?

Why not ⇒ ?

Can we write yx ?

Examples borrowed from Aaron Blomfield @ University of Virginia & Kenneth Rosen, Discrete Math and Its Applications, 5th edition. McGraw Hill, 2003


Translations34 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • There is a student at HH who has taken every mathematics course offered at HH.

  • Every salesman has at least one apple


Translations35 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • There is a student at HH who has taken every mathematics course offered at HH.

  • Every salesman has at least one apple


Translations36 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • There is a student at HH who has taken every mathematics course offered at HH.

  • Every salesman has at least one apple


Translations37 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • There is a student at HH who has taken every mathematics course offered at HH.

  • Every salesman has at least one apple


Translations38 l.jpg
Translations...

Translate the following sentences to a first order logic expression

  • There is a student at HH who has taken every mathematics course offered at HH.

  • Every salesman has at least one apple


ad