AIES Unit-2
AIES Unit-2
Course Outcomes:
Knowledge Representation
– Facts: Things we want to represent. Truth in some
relevant world.
– Representation of facts.
● Logic is also of primary importance in expert systems in which the inference engine reasons
from facts to conclusions.
● A descriptive term for logic programming and expert systems is automated reasoning
systems.
ARTIFICIAL INTELLIGENCE 13
2/14/2020
Types of Logic
There are a number of logical systems with different syntax and
semantics.
1. Propositional logic
2. Predicate logic
3. Elaborat with example Propositional logic and Predicate logic
99
Examples of PL sentences:
o (P ^ Q) => R (here meaning "If it is hot and humid, then it is raining")
o Q => P (here meaning "If it is humid, then it is hot")
o Q (here meaning "It is humid.")
1. Idempotent rule:
P ˄ P ==> P
P ˅ P ==> P
2. Commutative rule:
P ˄ Q ==> Q ˄ P
P ˅ Q ==> Q ˅ P
3.Associative rule:
P ˄ (Q ˄ R) ==> (P ˄ Q) ˄ R
P ˅ (Q ˅ R) ==> (P ˅ Q) ˅ R
• Unification (prerequisite)
• Forward Chaining
• Backward Chaining
• Logic Programming (Prolog)
• Resolution
• Transform to CNF (Chomsky normal form )
• Generalization of Prop. Logic resolution
• It’s a matching procedure that compares two literals and discovers whether there exists a set of
substitutions that can make them identical.
• E.g. 1
Hate( marcus , X) Hate (marcus , caesar)
caesar/ X
e.g. 2.
Hate(X,Y) Hate( john, Z) could be unified as:
John/X and y/z
Key points
◦ Simplest type of representation
◦ Fully logic based
◦ Deduction, Abduction and Induction
◦ Resolution and Refutation
Application: In rule-based systems
▪Definition- A collection of attributes and associated values that describe some entity in the world
▪Differs from semantic nets in a way that frames may involve procedural embedding in place of
values of attributes. (which are called as fillers)
●CD theory was developed by Schank in 1973 to 1975 to represent the meaning
of NL sentences.
− It helps in drawing inferences
− It is independent of the language
●CD representation of a sentence is not built using words in the sentence rather
built using conceptual primitives which give the intended meanings of words.
●CD provides structures and specific set of primitives from which
representation can be built.
P O R man (to)
I ⇔ ATRANS ← book
I (from)
●It should be noted that this representation is same for different saying with same meaning.
For example
− I gave the man a book,
− The man got book from me,
− The book was given to man by me etc.
•A robot has to pick up an object fallen on the floor at point A and keep it at point
B on the floor in a room.
•State: positions of objects in the room + own position
•Robot actions: move one step LEFT, RIGHT, FORWARD, BACK, pick up
object from floor, put down the object in its arm on the floor.
•Robot needs to find a “safe” way from point A to B, by exploring the
environment
•Robot has a map of the entire room; knows all the objects in the room, and their
positions.
•“Please plan an economy class round trip air-travel from Pune to France lasting 9
days covering at least 3 different locations. I want to spend at least 2 days in each
location. I am interested in nature, history and art.”
Push all its subgoals on the stack (in any ELSE IF X is an action THEN
order) execute X in current state C, change the
Repeat until the stack is empty: new current state C
X:= Pop the top of the stack using the action’s effects, add X to plan
Principle
▪ hierarchical organization of 'actions'
▪ complex and less complex (or: abstract) actions
▪ lowest level reflects directly executable actions
Procedure
▪ planning starts with complex action on top
▪ plan constructed through action decomposition
▪ substitute complex action with plan of less complex actions (pre-
defined plan schemata; or learning of plans/plan abstraction)
▪ overall plan must generate effect of complex action
Continued...
Goto (bus, source) Buy-Ticket (bus) Hop-on (bus) Leave (bus, dest.)