Docsity

Artificial intelligence, Schémas de Algorithmes avancés

Toggle sidebar
bg1
1
The Predicate Calculus
2
2.0 Introduction
2.1 The Propositional
Calculus
2.2 The Predicate Calculus
2.3 Using Inference Rules to
Produce Predicate
Calculus Expressions
2.4 Application: A Logic-
Based Financial Advisor
2.5 Epilogue and
References
2.6 Exercises
Additional references for the slides:
Robert Wilensky’s CS188 slides:
www.cs.berkeley.edu/%7wilensky/cs188/lectures/index.html
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47

Aperçu partiel du texte

Télécharge Artificial intelligence et plus Schémas au format PDF de Algorithmes avancés sur Docsity uniquement!

The Predicate Calculus

2.0 Introduction 2.1 The Propositional Calculus 2.2 The Predicate Calculus 2.3 Using Inference Rules to Produce Predicate Calculus Expressions 2.4 Application: A Logic- Based Financial Advisor 2.5 Epilogue and References 2.6 Exercises Additional references for the slides: Robert Wilensky’s CS188 slides: www.cs.berkeley.edu/%7wilensky/cs188/lectures/index.html

Chapter Objectives

  • (^) Learn the basics of knowledge representation
  • (^) Learn the basics of inference using propositional logic and predicate logic
  • (^) The agent model: Has a knowledge base of logical statements and can draw inferences.

Example

Given:  “The red block is above the blue block”  “The green block is above the red block” Infer:  “The green block is above the blue block”  “The blocks form a tower”

Example

Given: If it is sunny today, then the sun shines on the screen. If the sun shines on the screen, the blinds are brought down. The blinds are not down. Find out: Is it sunny today?

The inference procedures need to be

  • (^) Correct (sound)
  • (^) Complete
  • (^) Efficient

Candidates (for now)

  • (^) English (natural language)
  • (^) Java (programming language)
  • (^) Logic (special KR language)

Propositional logic

The symbols of propositional calculus are the propositional symbols: P, Q, R, S, … the truth symbols: true, false and connectives: , , , , 

Propositional Calculus Sentences

Every propositional symbol and truth symbol is a sentence. Examples: true, P, Q, R. The negation of a sentence is a sentence. Examples: P,  false. The conjunction , or and , of two sentences is a sentence. Example: P  P

Propositional calculus semantics

An interpretation of a set of propositions is the assignment of a truth value, either T or F to each propositional symbol. The symbol true is always assigned T, and the symbol false is assigned F. The truth assignment of negation , P, where P is any propositional symbol, is F if the assignment to P is T, and is T is the assignment to P is F. The truth assignment of conjunction , , is T only when both conjuncts have truth value T; otherwise it is F.

Propositional calculus semantics (cont’d)

The truth assignment of disjunction , , is F only when both disjuncts have truth value F; otherwise it is T. The truth assignment of implication , , is F only when the premise or symbol before the implication is T and the truth value of the consequent or symbol after the implication F; otherwise it is T. The truth assignment of equivalence , , is T only when both expressions have the same truth assignment for all possible interpretations; otherwise it is F.

Fig. 2.1: Truth table for the operator 

P Q (^) PQ T T T T F F T T F T F F

Fig. 2.2 Truth table demonstrating the

equivalence of PQ and PQ

Prove using a truth table

Variables Premises Trial Conclusions P Q R (^) PQ QR R P (^) P T T T T T F T F T T F T F T T F T F T F T F T F T F F F T T T F F T T T T F F T F T F T F T F T F F T T T F F T F F F T T T F T

Propositional calculus is cumbersome

If it is sunny today, then the sun shines on the screen. If the sun shines on the screen, the blinds are brought down. The blinds are not down. Is it sunny today?


If it is sunny on a particular day, then the sun shines on the screen. If the sun shines on the screen on a particular day, the blinds are brought down. The blinds are not down today. Is it sunny today?