Week 3 Lect 1 (Semantic Net and Frames)
Week 3 Lect 1 (Semantic Net and Frames)
Week 3 Lect 1 (Semantic Net and Frames)
Representation
• To solve complex problems we need:
1. Large amount of knowledge
2. Mechanism for representation and manipulation
of existing knowledge to create new solution.
Two Types of Knowledge:
(i) Procedural (ii) Declarative
Knowledge Representation
– Facts: Things we want to represent. Truth in
some relevant world.
– Representation of facts.
Representation and Mapping
• Spot is a dog
dog(Spot)
hastail(Spot)
Spot has a tail
3
Representation and Mapping
8
Approaches to KR
1. Simple relational knowledge:
• Provides very weak inferential capabilities.
• May serve as the input to powerful inference engines.
Player Height Weight handed
Peter 6-0 180 right
Ajay 5-10 170 left
John 6-2 215 left
Vickey 6-3 205 right
10
Approaches to KR
Inheritable knowledge:
• Objects are organized into classes and classes are
organized in a generalization hierarchy.
• Inheritance is a powerful form of inference, but not
adequate.
• Ex. Property inheritance inference mechanism.
is handed
Adult male a Person Right
instanc
e
Peter Consultancy 11
Works_a
Approaches to KR
Inferential knowledge:
• Facts represented in a logical form, which facilitates
reasoning.
• An inference engine is required.
Procedural knowledge:
• Representation of “how to make it” rather than “what
it is”.
• May have inferential efficiency, but no inferential
adequacy and acquisitional efficiency.
• Ex. Writing Prolog programs
8
Some General
Representations
1. Logical Representations
2. Production Rules
3. Semantic Networks
• Conceptual graphs, frames
4. Description Logics (see textbook)
Big Ideas
(P Q) R
“If it is hot and humid, then it is raining”
QP
“If it is humid, then it is hot”
Q
“It is humid.”
We’re free to choose better symbols, btw:
Ho = “It is hot”
Hu = “It is humid”
R = “It is raining”
Propositional logic (PL)
Simple language for showing key ideas and definitions
User defines set of propositional symbols, like P and Q
User defines semantics of each propositional symbol:
P means “It is hot”, Q means “It is humid”, etc.
A sentence (well formed formula) is defined as follows:
A symbol is a sentence
If S is a sentence, then S is a sentence
If S is a sentence, then (S) is a sentence
If S and T are sentences, then (S T), (S T), (S T), and (S ↔
T) are sentences
A sentence results from a finite number of applications of the
rules
Some terms
17
Soundness of modus ponens
A B A→B OK?
True True True
True False False
False True True
False False True
Resolution
(S ˄ R) W
22
First-order logic
First-order logic (FOL) models the world in terms of
Objects, which are things with individual identities
Properties of objects that distinguish them from others
Relations that hold among sets of objects
Functions, which are a subset of relations where there is only
one “value” for any given “input”
Examples:
Objects: Students, lectures, companies, cars ...
Relations: Brother-of, bigger-than, outside, part-of, has-color,
occurs-after, owns, visits, precedes, ...
Properties: blue, oval, even, large, ...
Functions: father-of, best-friend, second-half, more-than ...
User provides
Variable symbols
E.g., x, y, foo
Connectives
Same as in propositional logic: not (), and
(), or (), implies (), iff ()
Quantifiers
Universal x or (Ax)
Existential x or (Ex)
PREDICATE LOGIC
26
Using Predicate Logic
27
• Quantifiers:
• 2 types:-
28
• Quantifiers:
• 2 types:-
29
• Existential quantifier ( ):
30
Nested Quantifiers
• We can use both and seperately
x: y:
loves ( x , y)
32
6. “All Pompeians were Romans”
x: Pompeian(x) Roman(x)
33
Some more examples
• “all indoor games are easy”
x: indoor_game( x) easy(x)
34
Semantic Networks
A semantic network is a simple representation scheme that uses a
graph of labeled nodes and labeled, directed arcs to encode
knowledge.
Usually used to represent static, taxonomic, concept
dictionaries
Semantic networks are typically used with a special set of
accessing procedures that perform “reasoning”
e.g., inheritance of values and relationships
The graphical depiction associated with a semantic network is a
significant reason for their popularity.
Nodes and Arcs
mother age
Sue john 5
wi
age fe
father
hu
sba mother(john,sue)
nd
age(john,5)
Max
34 age wife(sue,max)
age(max,34)
...
Semantic Networks
Rusty Red
Individuals and Classes
Genus
Many semantic
networks distinguish Animal
nodes representing instance
subclass
individuals and those
hasPart
representing classes Bird
the “subclass” relation subclass Wing
from the “instance-of”
relation Robin
instance instance
Rusty Red
From Semantic Nets to Frames