Professional Documents
Culture Documents
Unit-Iii Knowledge and Reasoning
Unit-Iii Knowledge and Reasoning
B = Breeze
G = Glitter, Gold
OK = Safe square
P = Pit
S = Stench
V = Visited
W = Wumpus
A reasoning system be able to draw conclusions that follow from the premises, regardless of the world to which
the sentences are intended to refer.
PROPOSITIONAL LOGIC
Models
• Any world in which a sentence is true under a particular interpretation is called a model of that
sentence under that interpretation.
Eg: In Wumpus world, "S1,2“means there is a stench in [1,2].
• A sentence “a” is entailed by a knowledge base KB if the models of KB are all models of “a”. If this is
the case, then whenever KB is true, a must also be true
• models are mathematical objects
PROPOSITIONAL LOGIC
Rules of inference for propositional logic
Inference rule- patterns of inferences that occur over and over again, and their soundness can be shown once
and for all
PROPOSITIONAL LOGIC
Complexity of prepositional inference
• Monotonicity-The use of inference rules to draw conclusions from a knowledge base relies implicitly
on a general property of certain logics.
• A logic is monotonic if when we add some new sentences to the knowledge base, all the sentences entailed
by the original KB are still entailed by the new larger knowledge base.
Horn sentences
A useful class of sentences for which a polynomial-time inference procedure exists
PI A P2 A ... A Pn => Q
• When Q is the constant False, we get a sentence that is equivalent to ¬ P1 V ... V ¬ Pn.
• When n = 1 and PI = True, we get True => Q, which is equivalent to the atomic sentence Q.
PROPOSITIONAL LOGIC-Wumpus world
The knowledge base
• Use the Modus Ponens inference rule to find out whom he hates
• Find those sentences in the knowledge base that unify with Knows(John, x), and then apply the
unifier to Hates(John, x)
• Knowledge base sentences:
Knows(John, Jane)
Knows(y, Leonid)
Knows(y, Mother(y))
Knows(x, Elizabeth)
• Unifying the antecedent of the rule against each of the sentences in the knowledge base
UNlFY(Knows(John,x), Knows( John, Jane)) - {x/Jane}
UNlFY(Knows(John, x), Knows(y, Leonid)) = {x/Leonid, y/John}
UNIFY(Knows(John,x), Knows(y,Mother (y))) = {y/John,x/Mother(John)}
UNlFY(Knows(John,x), Knows(x, Elizabeth)) =fail
Unification and Lifting
• The last unification fails because x cannot take on the value John and the value Elizabeth at the same time.
• we should be able to infer that John hates Elizabeth
standardizing apart
• Renaming the variables of one (or both) to avoid name clashes
UNlFY(Knows(John,x1), Knows(x2, Elizabeth)) = {x1 /Elizabeth, x2/John}
• UNIFY should return a substitution that makes the two arguments look the same.
UNlFY(Knows(John,x), Knows(y, z)) = {y/John,x/z}
Sample proof
1. American(x) A Weapon(y) A Nation(z) A Hostile(z) A Sells(x, z, y) => Criminal(x)
2. Owns(Nono,M1)
3. Missile(M1)
4. Owns(Nono, x) A Missile(x) => Sells(West, Nono, x)
5. Missile(x) => Weapon(x)
6. Enemy(x, America) => Hostile(x)
7. American(West)
8. Nation(Nono)
9. Enemy(Nono, America)
10. Nation(America)
Unification and Lifting
Proof using Modus Ponens:
Weapon(M1)
Hostile(Nono)
Sells(West,Nono,M1)
Criminal(West)
Logic programming
Working Strategy
Types of Knowledge
• Declarative Knowledge
• Description of notions, facts, and rules of the world
• E.g.
• For each lecture there is a specific time and place
• Only one lecture can take place at each time and place
• E.g.
• To construct the exams timetable, assign first the classes of the
first year
• To reach Athens faster, take the airplane
• ELIZA-like rules
(X me Y) → (X you Y)
(I remember X) → (Why do you remember X just now?)
(My {family-member} is Y) → (Who else in your family is Y?)
(X {family-member} Y) → (Tell me more about your family)
Semantic Nets
• Since the late 1950s dozens of different versions of semantic networks have been proposed, with various
terminologies and notations.
• The main ideas:
1.For representing knowledge in structures
2.The meaning of a concept comes from the ways it is connected to other concepts
3.Labelled nodes representing concepts are connected by labelled arcs representing relations
Example:
A semantic Network Making Distinctions
Semantic Nets
Types of reasoning
Commonsense reasoning
• one of the branches of AI that is concerned with simulating the human ability to make presumptions about the
type and essence of ordinary situations they encounter every day.
• These assumptions include judgments about the physical properties, purpose, intentions and behavior of
people and objects, as well as possible outcomes of their actions and interactions.
• A device that exhibits commonsense reasoning will be capable of predicting results and drawing conclusions
that are similar to human.
Hypothetical reasoning
• Derives an explanatory hypothesis from a given set of facts
• The inference result is a hypothesis that, if true, could explain the occurrence of the given facts
• Examples
Dendral, an expert system to construct 3D structure of chemical compounds
Fact: mass spectrometer data of the compound and its chemical formula
KB: chemistry, esp. strength of different types of bounds
Reasoning: form a hypothetical 3D structure that satisfies the chemical formula, and that would most
likely produce the given mass spectrum
Types of reasoning
Analogical Reasoning
• Analogical Reasoning involves understanding new problems, in terms of family of problems. It also involves
addressing new problems, but transferring knowledge of relationships from known problems across domains.
• It consists of five major phases, retrieval, mapping, transfer, evaluation, and storage.
• An analogical reasoning in general, the target form and the source case need not be from the same domain.
• map the conceptual relationship in the target problem to the conceptual relationships in the source case
• Try to transfer some of the relationships in the source case to the target problem
• Abstract those relationships and then transfer them to the target problem