Session 6
Session 6
ARTIFICIAL
INTELLIGENT SYSTEMS
SESSION NO: 6
TOPIC: KNOWLEDGE REPRESENTATION TECHNIQUES
TECHNIQUES OF KNOWLEDGE
REPRESENTATION
2
LOGICAL REPRESENTATION
• Logical representation is a language with some concrete rules which deals with
propositions and has no ambiguity in representation.
• Logical representation can be categorized into mainly two logics:
• Propositional Logic
• First Order Logic
3
PROPOSITIONAL LOGIC
• Represent real world facts as logical propositions written as Well Formed Formula (Wffs).
• Simple to deal with.
• A decision procedure exists for it.
Facts Propositional logic
it is raining RAINING
it is sunny SUNNY
it is windy WINDY
if it is raining, then it is not sunny RAINING SUNNY
4
PROPOSITIONAL LOGIC
5
LOGICAL EQUIVALENCE
Name Equivalences
Identity p ∧ T ≡ p, p ∨ F ≡ p
Domination p ∨ T ≡ T, p ∧ F ≡ F
Idempotent p ∧ p ≡ p, p ∨ p ≡ p
Double Negation ¬(¬p) ≡ p
Commutative p∨q≡q∨p, p∧q≡q∧p
Associative (p ∨ q) ∨ r ≡ p ∨ (q ∨ r) , (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
Distributive p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r), p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
De Morgan's Law ¬(p ∧ q)≡ ¬p ∨ ¬q, ¬(p ∨ q) ≡ ¬p ∧ ¬q
Absorption p ∨ (p ∧ q)≡p, p ∧ (p ∨ q) ≡ p
Negation p ∨ ¬p ≡ T, p ∧ ¬p ≡ F
6
LIMITATIONS OF PROPOSITIONAL LOGIC
7
FIRST ORDER LOGIC
• FOL is sufficiently expressive to represent the natural language statements in a concise way.
• First-order logic is also known as Predicate logic or First-order predicate logic. First-order logic is a powerful
language that develops information about the objects in a more easy way and can also express the relationship
between those objects.
• First-order logic (like natural language) does not only assume that the world contains facts like propositional
logic but also assumes the following things in the world:
• Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus, ......
• Relations: It can be unary relation such as: red, round, is adjacent, or n-any relation such as: the sister
of, brother of, has color, comes between
• Function: Father of, best friend, third inning of, end of, ......
8
FIRST ORDER LOGIC
goal ? loyalto(Marcus,Caesar)
May require search of AND-OR graph when there are alternative ways of satisfying
individual goals.
10
loyalto(Marcus,Caesar)
(7,substitution)
person(Marcus) ^
ruler(Caesar) ^
tryassassinate(Marcus, Caesar)
(4)
person(Marcus) ^
tryassassinate(Marcus, Caesar)
(8)
person(Marcus) Fails
since there is no
way to satisfy the goal
Add the representation of another fact...
9. All men are people. x: man(x) Person(x)
12
loyalto(Marcus,Caesar)
(7,substitution)
person(Marcus) ^
ruler(Caesar) ^
tryassassinate(Marcus, Caesar)
(4)
person(Marcus) ^
tryassassinate(Marcus, Caesar)
(8)
person(Marcus)
(9)
man(Marcus)
success
SEMANTIC NETWORK REPRESENTATION
14
SEMANTIC NETWORK REPRESENTATION
Mamma
• Statements: Cat
l
Is-a
• Rubi is a cat. Is-a
15
ADVANTAGES OF SEMANTIC NETWORK
REPRESENTATION
• Semantic networks are a natural representation of knowledge.
• Semantic networks convey meaning in a transparent manner.
• These networks are simple and easily understandable.
16
LIMITATION OF SEMANTIC NETWORK REPRESENTATION
• Semantic networks take more computational time at runtime as we need to traverse the
complete network tree to answer some questions
• Semantic networks try to model human-like memory to store the information, but in
practice, it is not possible to build such a vast semantic networks.
17
FRAME REPRESENTATION
• A frame is a record like structure which consists of a collection of attributes and its values
to describe an entity in the world. Frames are the AI data structure which divides
knowledge into substructures by representing stereotypes situations. It consists of a
collection of slots and slot values. These slots may be of any type and sizes. Slots have
names and values which are called facets.
• The various aspects of a slot is known as Facets. Facets are features of frames which
enable us to put constraints on the frames.
• A frame is also known as slot-filter knowledge representation in artificial intelligence.
18
FRAME REPRESENTATION
• Example:
Let's take an example of a frame for a book
Slots Filters
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition Third Edition
Year 1996
Page 1152
19
ADVANTAGES OF FRAME REPRESENTATION
• The frame knowledge representation makes the programming easier by grouping the
related data.
• The frame representation is comparably flexible and used by many applications in AI.
• It is very easy to add slots for new attribute and relations.
• It is easy to include default data and to search for missing values.
20
LIMITATION OF FRAME REPRESENTATION
21
SUMMARY
This session discuss about the Three major techniques of Knowledge Representation
• Logical Representation
• Semantic Network Representation
• Frame Representation
22
SELF ASSESSMENT QUESTIONS
1. Knowledge and reasoning also play a crucial role in dealing with __________________ environment.
2. A knowledge-based agent can combine general knowledge with current percepts to infer hidden aspects
of the current state prior to selecting actions.
(a) True
(b) False
TERMINAL QUESTIONS
24
REFERENCE
• Reference Books:
• 1. Russel and Norvig, ‘Artificial Intelligence’, third edition, Pearson Education, PHI, (2015)
• 2. Elaine Rich & Kevin Knight, ‘Artificial Intelligence’, 3nd Edition, Tata Mc Graw Hill Edition, Reprint( 2008)
1. https://www.virtusa.com/digital-themes/heuristic-search-techniques
2. https://towardsdatascience.com/a-star-a-search-algorithm-eb495fb156bb
25