Module 4
Module 4
Properties of FOL
• It has ability to represent the facts about some or all of the objects and
relations in the universe.
• Represent law & rules extracted from real world.
• Useful language for maths, philosophy and AI
• Represents facts in realistic manner rather than just true/false
• Makes ontological commitment.
The primary difference between propositional and first-order logic lies in the
ontological commitment made by each language—that is, what it assumes about
the nature of reality.
Mathematically, this commitment is expressed through the nature of the formal
models with respect to which the truth of sentences is defined.
• For example, propositional logic assumes that there are facts that either
hold or do not hold in the world. Each fact can be in one of two states:
true or false, and each model assigns true or false to each proposition
symbol.
• First-order logic assumes more; namely, that the world consists of objects
with certain relations among them that do or do not hold.
• Temporal logic assumes that facts hold at particular times and that those
times (which may be points or intervals) are ordered.
• Higher-order logic views the relations and functions referred to by first-
order logic as objects in themselves.
Semantics of FOL
I) Models for first order logic
ii) Atomic Sentence
a) Universal quantifiers
Example
b) Existential Quantifier
Example
Points to remember:
Properties of Quantifier:
Equality
Example1:
Example 2
Example 3:
Using First Order Logic
iii) Sets
iV) The Wumpus World:
Wumpus agent receives a percept vector with five elements. The typical percept
sentence is as given below:
That gets stored along with the time it occurred, to avoid confusing the agent.
• The raw percept data implies certain facts about the current state
example:
∀ t, s, g, m, c Percept ([s, Breeze, g, m, c], t) ⇒ Breeze(t) ,
∀ t, s, b, m, c Percept([s, b, Glitter , m, c], t) ⇒ Glitter (t) ,…….
• These rules exhibit a trivial form of the reasoning process called perception
• If the agent is at a square and perceives a breeze, then that square is breezy
∀ s, t At(Agent , s, t) ∧ Breeze(t) ⇒ Breezy (s)
• First-order logic just needs one axiom to deduce where the pits are :
∀ s Breezy (s) ⇔ ∃ r Adjacent (r, s) ∧ Pit(r)
What is Inference:
Examples of Inference:
First Order Inference:
1.Universal Instantiation:
2.Existential Instantiation:
Unification:
• UNIFY(p,q) = θ
Where SUBST (θ,p) = SUBST (θ, q)
Examples:
Θ = {x / Jane}
Θ = { x/Bill, y/John}
Θ = FAIL
Forward Chaining:
Summary:
Backward Chaining:
Example:
Next step is converting the above FOL into Conjunctive normal form:
Resolution Tree
Questions
7) Explain i) Unification & ii) Subsumption Lattice with examples. Write short
note on how first Order logic is applied to Wumpus world.
-----------------------------------