Chapter 7 Knowledge Representation

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

SPC 2312 Knowledge

Based Systems
Chapter 7 Knowledge
Representation I
Knowledge Rep
Requirements
 Representational adequacy
 declarative, procedural
 Inferential adequacy
 manipulate knowledge
 incorporate new knowledge
Semantic nets

 knowledge is represented as a collection


of concepts, represented by nodes
(shown as boxes in the diagram),
connected together by relationships,
represented by arcs (shown as arrows in
the diagram).
 certain arcs - particularly isa arcs - allow
inheritance of properties.
Semantic Nets

 Arcs define binary relationships that


hold between objects denoted by the
nodes. mother age
Sue john 5
wi
age fe
hus father
ba nd mother(john,sue)
34 Max age(john,5)
age wife(sue,max)
age(max,34)
...
Semantic Networks
 The ISA (is-a) or
AKO (a-kind-of) Animal
relation is often
isa
used to link hasPart
instances to Bird

classes, classes isa Wing


to superclasses Robin
 Some links (e.g. isa isa
hasPart) are
inherited along
Rusty Red
ISA paths.
Semantic Nets
Advantages Disadvantages
 Flexible  Hard to deal with
 easy to understand exceptions
 support inheritance  procedural

 “natural” way to knowledge difficult


represent to represent
 no standards for
knowledge
defining nodes or
relationships
 The semantics of a semantic net can be
relatively informal or very formal
 often defined at the implementation level
Frames

 Devised by Marvin Minsky, 1974.


 Incorporates certain valuable human
thinking characteristics:
 Expectations, assumptions, stereotypes.
Exceptions. Fuzzy boundaries between
classes.
 The essence of this form of knowledge
representation is typicality, with
exceptions, rather than definition.
Frames

 The idea of frame hierarchies is very


similar to the idea of class hierarchies
found in object-orientated programming.
How frames are organised
 A frame system is a hierarchy of frames
 Each frame has:
 a name.
 slots: these are the properties of the entity
that has the name, and they have values
(facets). A particular value may be:
 a default value
 an inherited value from a higher frame
 a procedure, called a daemon, to find a
value
 a specific value, which might represent
an exception.
How frames are organised

 An instance of an object is joined to its


class by an 'instance_of' relationship.
 A class is joined to its superclass by a
'subclass_of' relationship.
 Frames may contain both procedural
and declarative knowledge.
 Slot values normally amount to declarative
knowledge, but a daemon is in effect a
small program. So a slot with a daemon in it
amounts to procedural knowledge.
“a car has 4 wheels, is moved by an engine,
and runs on petrol or diesel.”

Name: car Subclass of: thing

Slots:
Name: Value: Restrictions:

wheels 4
moved by engine
fuel ? petrol or diesel
“there is a particular type of Golf called a TDi,
which runs on diesel, has 4 cylinders, and has a 1.8
litre engine.”

Name: TDi Subclass of: Golf

Slots:
Name: Value: Restrictions:

fuel diesel
engine
capacity 1.8 litres
cylinders 4
OOP

 Classes describe common properties of


objects
 Objects may be physical or conceptual
 Attributes are characteristics of objects
 Values are specific measures of Attributes
for specific instances
Classes

 Specify common properties of instances


 support hierarchical classification
 superclass / subclass
 subclass may be more refined version
 each subclass inherits operations and
attributes of its ancestors
 subclass may have its own operations and
attributes
Other varieties of
structured object - Scripts
 Knowledge representation researchers -
particularly Roger Schank and his
associates - devised some interesting
variations on the theme of structured
objects.
 In particular, they invented the idea of
scripts (1973).
 A script is a description of a class of
events in terms of contexts, participants,
and sub-events.
Scripts

 Rather similar to frames: uses inheritance


and slots; describes stereotypical
knowledge, (i.e. if the system isn't told
some detail of what's going on, it assumes
the "default" information is true), but
concerned with events.
 Somewhat out of the mainstream of
expert systems work. More a
development of natural-language-
processing research.
Scripts
 Why represent knowledge in this way?
 Because real-world events do follow
stereotyped patterns. Human beings use
previous experiences to understand verbal
accounts; computers can use scripts instead.
 Because people, when relating events, do
leave large amounts of assumed detail out of
their accounts. People don't find it easy to
converse with a system that can't fill in
missing conversational detail.
Scripts

 Commercial applications of script-like


structured objects: work on the basis that a
conversation between two people on a pre-
defined subject will follow a predictable
course.
 Certain items of information need to be
exchanged.
 Others can be left unsaid (because both people
know what the usual answer would be, or can
deduce it from what's been said already), unless
(on this occasion) it's an unusual answer.
Conceptual Graphs
 In 1984, John Sowa published his conceptual graph
approach.
 Semantic network where each graph represents a
single proposition
 Concept nodes can be
 Concrete (visualisable) such as restaurant, my dog Spot
 Abstract (not easily visualisable) such as anger
 Edges do not have labels
 Instead, conceptual relation nodes
 Easy to represent relations between multiple objects
KR&R Challenges

 representation of commonsense knowledge


 the ability of a knowledge-based system to
tradeoff computational efficiency for accuracy
of inferences
 its ability to represent and manipulate
uncertain knowledge and information.

11/11/2024 Chapter 8 Knowledge Representation 23


I

You might also like