introduction to artificial intelligence
Download
Skip this Video
Download Presentation
INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Loading in 2 Seconds...

play fullscreen
1 / 32

INTRODUCTION TO ARTIFICIAL INTELLIGENCE - PowerPoint PPT Presentation


  • 98 Views
  • Uploaded on

INTRODUCTION TO ARTIFICIAL INTELLIGENCE. Massimo Poesio LECTURE 3: Logic: predicate calculus, psychological evidence. PREDICATE CALCULUS. The propositional calculus is only concerned with connectives – statements not containing connectives are left unanalyzed Massimo is happy: p

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 ' INTRODUCTION TO ARTIFICIAL INTELLIGENCE' - trenton-dempsey


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
introduction to artificial intelligence

INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Massimo PoesioLECTURE 3: Logic: predicate calculus, psychological evidence

predicate calculus
PREDICATE CALCULUS
  • The propositional calculus is only concerned with connectives – statements not containing connectives are left unanalyzed
    • Massimo is happy: p
  • In predicate calculus, or predicate logic, atomic statements are decomposed into TERMS and PREDICATES
    • Massimo is happy: HAPPY(m)
    • Students like AI: LIKE(students,AI)
  • In this way it is possible to state general properties about predicates: for instance, every professor at the University of Trento is happy, etc.
first order logic
FIRST-ORDER LOGIC
  • Predicate calculus becomes FIRST ORDER LOGIC when we add QUANTIFIERS – logical symbols that make it possible to make universal and existential statements (i.e., to translate statements A, E, I and O of syllogisms)
the existential quantifier
THE EXISTENTIAL QUANTIFIER
  • Used to traduce statements like
    • Some birds are swallows
  • Notation:
    • ∃(backwards E, for Exist – Peano, 1890)
    • ‘Some birds are swallows’ 
    • There exists an x, such that x is a bird, and x is a swallow
    • (∃ x) (BIRD(x) & SWALLOW(x))
the universal quantifier
THE UNIVERSAL QUANTIFIER
  • To represent
    • All men are mortal
    • But also: Swallows are birds
  • Notation:
    • ∀for inverted A (alle)
  • Conversion of universal statements requires conditional:
    • For every x, is x is a man, then x is mortal
    • (∀ x) (MAN(x) → MORTAL(x))
the syntax of fol vocabulary
THE SYNTAX OF FOL: VOCABULARY
  • TERMS
    • Constants
    • Variables
  • PREDICATES: 1 argument ( HAPPY), two arguments (LIKES), etc
  • CONNECTIVES (from the propositional calculus): ~, &, ∨, →, ↔
  • QUANTIFIERS: ∀ ∃
the syntax of fol phrases
THE SYNTAX OF FOL: PHRASES
  • If P is an n-ary predicate and t1, … tn are terms, then P(t1,…,tn) is a formula.
  • If φ and ϕ are formulas, then ~φ, φ & ϕ , φ ∨ϕ , φ →ϕ and φ ↔ ϕ are formulas
  • If ϕ is a formula and x is a variable, then (∀ x) ϕ and (∃ x) ϕ are formulas.
scope and binding
SCOPE AND BINDING
  • Let x be a variable and ϕ a formula, and let (∀ x) ϕ and (∃ x) ϕ be formulas. then ϕ is the SCOPE of x in these formulas.
  • An occurrence of x is BOUND if it occurs in the scope of (∀ x) or (∃ x)
  • Examples (PMW p. 141)
the semantics of fol
THE SEMANTICS OF FOL
  • As in the case of propositional calculus, statements (formulas) can be either true or false
  • But the other phrases of the language have set-theoretic meanings:
    • Terms denote set elements
    • Unary predicates denote sets
    • N-ary predicates denote n-ary relations
    • Quantifiers denote relations between sets
set theory recap
SET THEORY RECAP

Fred

HAPPY PEOPLE

John

Matilda

Massimo

Lucy

HAPPY(m) = T

HAPPY(f) = F

set theory recap relations
SET THEORY RECAP: RELATIONS

PEOPLE

SUBJECTS

John

AI

Matilda

Logic

Fred

Maths

Massimo

LIKES(j,AI) = T

LIKES(m,Maths) = F

set theory recap quantifiers
SET THEORY RECAP: QUANTIFIERS

AIRPLANES

BIRDS

SWALLOWS

Tweety

Lou

Airplane1

Roger

Loreto

FLYING THINGS

Swallows are birds

Birds fly

the semantics of fol1
THE SEMANTICS OF FOL
  • If t is a term and P a unary predicate, then [P(t)] = TRUE iff [t] ∈[P]
  • If φ and ϕ are formulas, then
    • [~φ] = TRUE iff [φ] = FALSE
    • [φ & ϕ] = TRUE iff [φ] = TRUE and [ϕ] = TRUE
  • [(∀ x) ϕ] = TRUE iff for every value a for x in model M, [ϕ(a/x)] = TRUE
  • [(∃ x) ϕ] = TRUE iff there is at least one object a in model M such that [ϕ(a/x)] = TRUE
some tautologies of fol
SOME TAUTOLOGIES OF FOL
  • Laws of Quantifier Distribution:
    • (∀x) (φ(x) & ϕ(x)) ≡ (∀x) φ(x) & (∀x) ϕ(x)
    • “Every object is formed of elementary particles and has a spin” iff “Every object is formed of elementary particles” and “Every object has a spin”
  • Law of Quantifier Negation:
    • ~ (∀x) (φ(x)) ≡ (∃y) (~ φ(y))
    • “It is not the case that every object is made of cheese” iff “there is an object which is not made of cheese”
from syllogisms to fol
FROM SYLLOGISMS TO FOL
  • Four types of syllogism:
    • Universal affirmative: All Ps are Qs
    • Universal negative: All Ps are not Qs (No P is a Q)
    • Particular affirmative: Some P is a Q
    • Particular negative: Some P is not a Q
from syllogisms to fol1
FROM SYLLOGISMS TO FOL
  • Syllogism in FOL:
    • Universal affirmative: (∀ x) (P(x) → Q(x))
    • Universal negative: (∀y) (P(y) → ~ Q(y))
    • Particular affirmative: (∃z) (P(z) & Q(z))
    • Particular negative: (∃ w) (P(w) & ~ Q(w))
from syllogysm to fol
FROM SYLLOGYSM TO FOL

An example of BARBARA:

A Birds fly

A Swallows are birds

A Swallows fly

barbara in predicate calculus
BARBARA IN PREDICATE CALCULUS

(∀x) (BIRD(x) → FLY(x))

(∀y) ( SWALLOW(y) → BIRD(y))

(∀z) ( SWALLOW(z) → FLY(z))

set theoretic demonstrations of validity of syllogisms
SET THEORETIC DEMONSTRATIONS OF VALIDITY OF SYLLOGISMS

R

Q

Q

P

A: All Ps are Qs

R

A: All Qs are Rs

P

A: All Ps are Rs

(A more general method exists)

representing knowledge in logic 2
REPRESENTING KNOWLEDGE IN LOGIC, 2
  • Modern logics make it possibile to represent every type of knowledge
  • Different types of knowledge have different EXPRESSIVE POWER
representing knowledge in logic 21
REPRESENTING KNOWLEDGE IN LOGIC, 2
  • “Tutte le biciclette hanno due ruote”
  • Propositional calculus: p
  • Predicate logic + quantifiers:
    • (∀ x) (BICYCLE(x) → HAS_TWO_WHEELS(x))
    • Can be used to represent DARII
  • Explicit representation of the number 2:
    • (∀ x) (BICYCLE(x) → HAS_WHEELS(x,2))
  • Set of wheels:
deduction in fol
DEDUCTION IN FOL
  • The system of inference rules for FOL includes all the inference rules from the propositional calculus, together with four new rules for quantifier introduction and elimination
  • The tableaus system has also been extended
natural deduction for fol 1
NATURAL DEDUCTION FOR FOL, 1

(∀y) P(y)

UNIVERSAL INSTANTIATION

∴P(c) (for any constant c)

P(c) (for any constant c)

UNIVERSAL GENERALIZATION

∴ (∀y) P(y)

ui and ug examples
UI AND UG EXAMPLES

(∀y) MADE-OF-ATOMS(y)

UNIVERSAL INSTANTIATION

∴ MADE-OF-ATOMS(c) (for any c)

natural deduction for fol 2
NATURAL DEDUCTION FOR FOL, 2

(∃y) P(y)

EXISTENTIAL INSTANTIATION

∴ P(k) (for a new k)

P(c) (for a constant c)

EXISTENTIAL GENERALIZATION

∴ (∃ y) P(y)

beyond first order logic
BEYOND FIRST ORDER LOGIC
  • Artificial Intelligence research moved beyond first order logic in several directions:
    • Beyond using logic as a formalization of valid inference only, developing logics for non-valid (or NONMONOTONIC / UNCERTAIN) reasoning
    • Developing simpler logics in which inference can be done more efficiently (description logics, discussed in later lectures)
psychological evidence on reasoning
PSYCHOLOGICAL EVIDENCE ON REASONING
  • First order logic and the propositional calculus are good formalizations of ‘sound’ reasoning, and are therefore the basis for work on proving mathematical truths
  • But are they a good formalization of the way people reason?
  • Evidence suggests that this is not the case
    • The WASON SELECTION TASK perhaps the best known example of this evidence
the wason selection task
THE WASON SELECTION TASK
  • Subjects are asked to verify the truth of a statement (typically, a conditional statement) by turning over cards
wason test example
WASON TEST: EXAMPLE

If A CARD SHOWS AN EVEN NUMBER ON ONE SIDE, then THE OPPOSITE FACE IS RED

Answer: the second and fourth card

readings
READINGS
  • Basics:
    • B. Partee, A. ter Meulen, R. Wall, Mathematical Methods in Linguistics, Springer, ch. 5, 6, 7
    • (in Italian): D. Palladino, Corso di Logica, Carocci
  • To know more:
    • History of logic: P. Odifreddi, Le menzogne di Ulisse, Tea, ch. 1-7
    • Inference: P. Blackburn, J. Bos, Representation and Inference for Natural Language, CSLI
    • K. Stenning and M. van Lambalgen, Human Reasoning and Cognitive Science, MIT Press
  • Logic on the Web:
    • http://www.thelogiccourse.com/
    • Do the Wason selection task: http://coglab.wadsworth.com/experiments/WasonSelection.shtml
ad