value

advertisement
ARTIFICIAL INTELLIGENCE
[INTELLIGENT AGENTS PARADIGM]
KNOWLEDGE
REPRESENTATION SCHEMAS
Professor Janis Grundspenkis
Riga Technical University
Faculty of Computer Science and Information Technology
Institute of Applied Computer Systems
Department of Systems Theory and Design
E-mail: Janis.Grundspenkis@rtu.lv
Knowledge Representation
Schemas
• Logical schemas
– First-order logic
– Higher-order logic
• Network schemas
– Semantic networks
– Conceptual graphs
• Procedural schemas • Structured schemas
– Rule-based systems
– Frames
– Scripts
Semantic Networks
• Definition: Semantic network (Quillian,
1967) is a knowledge representation schema
that captures knowledge as a graph. The
nodes denote objects or concepts, their
properties and corresponding values. The
arcs denote relationships between the
nodes. Both nodes and arcs are generally
labelled (arcs have weights).
Example of Semantic Network
covering
head
part of
animal
skin
fish
is a
swim
travel
travel
fly
is a
feathers
wings
covering
color
ostrich
travel
walk
red
has
bird
sound
is a
part of
is a
value
is a
travel
is a
opus
robin
is a
penguin
sound
canary
is a
has
color
value
brown
has
color
value
yellow
sing
tweety
has
color
value
white
Semantic Networks
• Typical relationships
– IS-A
– PART-OF
– HAS
– VALUE
– LINGUISTIC
Semantic Networks
• Typical relationships (continued)
– IS-A
• Supertype – type (superclass – class)
• Type – subtype (class – subclass)
• Subtype – instance (subclass – instance)
– PART-OF
• Supertype – type (superclass – class)
• Type – subtype (class – subclass)
Semantic Networks
• Typical relationships (continued)
– HAS
• Object – property
– VALUE
• Property – value
– LINGUISTIC
• Examples: likes, owns, travel, made of, …
Semantic Networks
• NETWORK EXTENSION
– Addition of new nodes and their
relationships
– Three ways of node addition:
• Similar object
• More specific object
• More general object
Semantic Networks
• REASONING
–Query node
–Answer search
• Answer localization at the query
node
• Path construction following labels
of arcs
Semantic Networks
• INHERITANCE
–Definition: Inheritance is a
process by which the local
information of a superclass node
is assumed by a class node, a
subclass node, and an instance
node
Semantic Networks
• INHERITANCE (continued)
– “+” 1) Provides a natural tool for representing
taxonomically structured knowledge. 2) Provides
economical means of expressing properties common to
a class of objects. 3) Reduces the size of a knowledge
base. 4) Provides more compact code
– “–” 1) Exception handling by local priority. 2)
Additional workload of knowledge engineer who must
decide at which node to define common properties
Conceptual Graphs
• DEFINITION: A conceptual graph (John Sowa, 1984) is
a finite, connected, bipartite graph
• The nodes of the graph denote either concepts or
conceptual relations
• Conceptual graphs do not use labelled arcs; instead the
conceptual relation nodes represent relations between
concepts
• Concepts can only have arcs to conceptual relations, and
vice versa
• Concepts are represented as boxes and conceptual relations
as ellipses
Conceptual Graphs
•
Concept nodes represent:
1. Concrete concepts (objects), for instance, cat,
telephone, book , etc. These concepts are
characterised by our ability to form an image of them
in our minds. Concrete concepts include generic
concepts such as cat or book along with concepts of
specific cats and books
2. Abstract concepts, for instance, beauty, loyalty, and
love that do not correspond to images in our minds
Conceptual Graphs
• Conceptual relation nodes indicate a relation
involving one or more concepts. Some special
relation nodes, namely, agent, recipient, object,
experiencer, are used to link a subject and the
verb
• Conceptual graphs can represent relations of any
arity
• A relation of arity n is represented by a conceptual
relation node having n arcs
Example of Conceptual Graph
person: john
agent
eat
object
soup
instrument
part
hand
Conceptual Graphs
• Each conceptual graph represents a
single proposition
• Knowledge base contains a set of
conceptual graphs
• Graphs may be arbitrary complex but
must be finite
Frame Based Systems
• The term frame is coined by Minsky in 1975.
• Frame is a static data structure used to represent
stereotypical information about some concept.
• Frame is like a template that contains generic
information about some concept that you could
refer to for describing a given instance of the
concept.
Frame Based Systems
• A frame has:
– Name – frame identification
information.
– Slots with labels describing the
attributes and possible values for
each attribute.
Frame Based Systems
• The slots contain:
– Frame identification information
– Relationship of this frame to other frames
– Frame default information (slot values that are taken to
be true when no evidence to the contrary has been
found)
– New instance information (slots may be left
unspecified)
– Procedural information (procedural code may be
attached to the slot)
– Descriptors of requirements for frame match
Frame Based Systems
• ATTRIBUTES
– STATIC
– DYNAMIC
• VALUES
– NUMERIC
– SYMBOLIC
– BOOLEAN
Frame Based Systems
• Sources of attribute values:
–
–
–
–
–
–
–
Initialize
Database
Procedure
Expert System
User
Inheritance
Other Frame (object)
Frame Based Systems
CLASS
Definition: Class is a collection of objects that share some
common properties (attributes).
• A class frame contains
– A descriptive name of the concept
– A set of attributes that are characteristic of all its associated
objects
– Attribute values that considered common to these objects
• It may contain: 1) An explicit reference to all of its
associated subclasses; 2) Information describing the
behaviour of the concept.
Frame Based Systems
SUBCLASSES
• Definition: Subclasses are classes that
represent subsets of higher level classes.
• Three kinds of class relationships:
– Generalization – “Kind of” relationship
– Aggregation – “Part of” relationship
– Association – “Semantic” relationship
Frame Based Systems
INSTANCE
Definition: Instance is a specific object from a class
of objects.
AN INSTANCE FRAME
– Describes
• A specific object from its related class.
– Contains
• All of the characteristics of the class frame as well
as a specific information (specific features and
property values).
Example of Frame Based System
truck
superclass: vehicle
class: vehicle
basket
reg. number
dimensions
2*3*1.5
producer
reg. number
producer
material
tin
model
model
owner
owner
tonnage
part of
car
John’s car
class: vehicle
class: car
reg. number
producer
model
owner
number of doors
horse-power
basket
4
reg. number
LV97
producer
BMW
model
520
owner
John
John
number of doors
2
age
22
horse-power
150
length of driving
2
Frame Based Systems
INHERITANCE
• Definition: Inheritance is the process by which
the characteristics of a parent frame are assumed
by its child frame.
• Note: In general, a child frame will inherit
information from its parents, grandparents, greatgrandparents, etc.
MULTIPLE INHERITANCE
• An object could inherit information from more
than one parent (in this case objects relate to
different worlds)
Frame Based Systems
INHERITANCE
• Practical value:
– Easier coding of the system
– Easier modification of information in a frame (adding
new property to the class frame it will be inherited
automatically by all of its instances)
• Potential problem: exception handling
– Any frame that is an exception from the norm, that is,
the frame has some property value unique to itself, this
value must be explicitly encoded in the frame.
Frame Based Systems
FACETS
Definition: A facet is an extended
knowledge about a frame’s property.
• Facets provide additional control over
property value and the operation of
the system.
Frame Based Systems
• A facet extends the information in the
following ways:
– TYPE – Defines a type of value that can be
associated with the property
– DEFAULT – Defines a default value, i.e., an
initial value for the property
– CONSTRAINT – Defines the allowable value
Frame Based Systems
– MINIMUM CARDINALITY – Establishes
min number of values
– MAXIMUM CARDINALITY – Establishes
max number of values
– IF-NEEDED – Specifies action to be taken if
the property’s value is needed
– IF-CHANGED – Specifies action to be taken
if the property’s value is changed
Frame Based Systems
METHODS (1)
• Definition: Method is a procedure attached to an
object, that will be executed whenever requested.
• An IF-NEEDED method is written in order to
obtain the property’s value only when it is needed.
IF-NEEDED facet executes some method only
when it is needed (method acts like a demon).
Frame Based Systems
METHODS (2)
• An IF-CHANGED method is written in order to
change an object’s property value, access
database, etc. IF-CHANGED facet executes some
method that performs some function in the event
the property's value changes.
• Methods designed to perform both operations can
be inherited.
Example of Methods
Temperature sensors
Name
Unknown
Value
Unknown
Critical
Value
Unknown
Value If-Needed Method
Get-Value (Self.Name)
Status If-Changed Method
Status
Unknown
IF Self.Status = Alert
THEN Sound-Alert
Value If-Changed Method
IF Self.Value
> Self.Critical Value
THEN
Self.Status = Alert
Frame Based Systems
COMMUNICATION BETWEEN
OBJECTS (1)
• Interobject communication using facets
– Using facet methods objects can communicate with
one another. A change to only one property value may
cause a series of changes in a number of objects
(frame system is dynamic!). Objects can influence the
property values in other objects, or even itself.
Frame Based Systems
COMMUNICATION BETWEEN
OBJECTS (2)
• Message passing
Definition: Message passing is a signal to an object
to which the object responds by executing a
method.
– Sending messages involves using a function:
(SEND message-name, object-name, arguments)
Download