Professional Documents
Culture Documents
Artificial Intelligence: Knowledge Representation Using Structures
Artificial Intelligence: Knowledge Representation Using Structures
1
Structures
• A structure may be defined as a device to
support property inheritance.
• Inherence property employs that elements of
specific classes inherit attributes and values
from more general classes in which they are
combined.
• In order to support property inheritance,
objects must be organized into classes and
classes must be arranged in a generalized
hierarchy.
2
Semantic Networks
• It is one of the oldest and easiest knowledge
representation schemes.
• It is composed of nodes and links.
• Nodes represent objects.
Objects can be any physical item, e.g. Book, car etc.
Nodes can also be concepts, events or actions.
Attributes of an object may also be used as nodes, e.g.
Size, colour, class, age etc.
• Nodes are interconnected by links or arcs. The arcs
(or arrows) show the relationship between various
objects.
3
Semantic Networks
is a Human
goes to is a
School Afaq Boy being
has is a
son eats
has Woman
Alia is a is a
son
Food
is married
to
owns a works IT in
Car MUET
Waqas as Manager
manufactured
by plays is in
6
Frames
• A frame is a datastructure that includes all the
knowledge about a particular object. Frames were
introduced by Marvin Minisky in 1975.
• Frames are normally used to represent stereotyped
knowledge or knowledge built on well known
characteristics and experiences.
• Frame represents knowledge as structured objects
which is composed of labelled slots with their values
called fillers.
• Slots are similar to attributes in object oriented
approach, however, they can contain broader
information. The information may be declarative or
procedural
7
Frames
• Each frame describes one object. A frame includes all
the knowledge about a particular object.
• Frames are basically an application of object-oriented
programming for AI and Expert Systems.
• Frames, as in frames of reference, provide a concise,
structural representation of knowledge in a natural
manner.
• In contrast to other representation methods, the
values that describe one object are grouped together
into a single unit called a frame. Thus, a frame
compasses complex objects, entire situations, or a
management problem as a single entity.
8
Frames
• The knowledge is partitioned in a frame into slots. A
slot can describe declarative knowledge or
procedural knowledge.
• The slots in a frame contain information such as:
Frame identification information
Relationship of this frame to other frames.
Descriptor of requirements for a frame (e.g. A chair, its
height and size etc.)
Procedural information on use of the structure described.
Frame default information.
New instance information.
• Frame systems support class inheritance.
9
Example of a Frame
10
Scripts
• A script is a knowledge representation scheme
similar to a frame, but instead of describing an
object, the script describes a sequence of events.
• Like the frame, the script portrays a stereotyped
situation. Unlike the frame, it is usually presented in
a particular context.
• To describe a sequence of events, the script uses a
series of slots containing information about the
people, objects, and actions that are involved in the
events.
11
Scripts
• Some of the elements of a typical scripts include
entry conditions, props, roles, tracks, and scenes.
Props refers to objects that are used in the sequence of
events that occur.
Roles refer to the people involved in the script.
The result is conditions that exist after the events in the
script have occurred.
Track refers to variations that might occur in a particular
script.
Scenes describe the actual sequence of events that occur.
12
Restaurant Script: An Example
Track: Fast food Restaurant
Roles: Customer
Server
Props: Counter
Tray
Food
Money
Napkins
Salt/Pepper/Catsup/Straws etc.
Entry Conditions:
Customer is hungry
Customer has money
Scene1: Entry
• Customer parks car
• Customer enters restaurant
• Customer waits in line at the counter
• Customer reads the menu on the
wall and makes a decision about what
to
order.
13
Restaurant Script: An Example
Scene 2: Order
• Customer gives order to server
• Server fills order by putting food on tray
• Customer pays server
Scene 3: Eating
• Customer gets napkins, straws, salt etc.
• Customer takes tray to an unoccupied
table.
• Customer eats food quickly.
Scene 3A: (Option): Take-out
• Customer takes food and exists.
Scene4: Exist
• Customer cleans up table
• Customer discards trash
• Customer leaves restaurant
• Customer drives away.
14
Restaurant Script: An Example
Results:
• Customer is no longer hungry
• Customer has less money
• Customer is happy*
• Customer is unhappy*
• Customer is too full*
• Customer has upset stomach*
Options
*
15