Frame

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 22

Artificial Intelligence

Lecture #06

February 5, 2024 Artificial Intelligence, Lecturer #06 1


Contents
Knowledge Representation
Rule-Based Representation
Frame-Based Representation
Semantic-Networks

February 5, 2024 Artificial Intelligence, Lecturer #06 2


Frame-Based Knowledge Representation
What is frame?
 A frame is a data structure with typical knowledge about
a particular object or concept.
 Followings are two typical frames with knowledge about
airline passengers. Both frames have the same
structure.
 Each frame has its own name & a set of attributes or
slots, associated with it.
QUANTAS BOARDING PASS AIR NEW ZEALAND BOARDING
Carrier: QUANTAS AIRWAYS PASS
Name: MR N BLACK Carrier: AIR NEW ZEALAND
Flight: QF 612 Name: MRS J WHITE
Data: 29DEC Flight: NZ 0198
Seat: 23A Data: 23NOV
From: HOBART Seat: 27K
TO: MELBOURNE From: MELBOURNE
Boarding:0620 TO: CHRISTCHURCH
Gate: 2 Boarding:1815
Gate: 4

February 5, 2024 Artificial Intelligence, Lecturer #06 3


Frame-Based Knowledge Representation
Why is it necessary to use frames?
Basically, frames are an application of Object
Oriented Programming for expert system.
Frames provide a way for the structured and
concise representation of knowledge. In a
single entity, a frame combines all necessary
knowledge about a particular object or
concept.
During a search for a specific item, we go
directly to the item’s instance frame that
contains the desired goal.

February 5, 2024 Artificial Intelligence, Lecturer #06 4


Frame-Based Knowledge Representation
Frames a knowledge representation
technique
The concept of a frame is defined by a
collection of slots or attributes.
Each slot describes a particular attribute or
operation of the frame.
Slots are used to store values.
A slot may contain a default value or a pointer
to another frame, a set of rules or procedure
by which the slot value is obtained.

February 5, 2024 Artificial Intelligence, Lecturer #06 5


Frame-Based Knowledge Representation
 Slots may include such information as :
Frame name
Relationship of the frame to the other frames
Slot values
Default slot value
Range of the slot value
Procedural information
WHEN CHANGED
This is executed when the slot value is
changed.
WHEN NEEDED
This is executed when the slot value
is unspecified
February 5, 2024 6
Artificial Intelligence, Lecturer #06
Frame-Based Knowledge Representation
WHEN CHANGED
WHEN CHANGED
BEGIN
CLASS: Credit Evaluation BEGIN
Action IS ….
Action IS ….
END
Evaluate Credit: [WHEN CHANGED] END

Collateral:
Excellent:
Good:
Moderate
Financial rating:
Excellent:
Good:
Medium:
Bad:
Evaluation: [WHEN NEEDED] WHEN NEEDED
WHEN NEEDED
BEGIN
BEGIN
EVALUATION VALUE : = Excellent
EVALUATION VALUE : = Excellent
END
END

February 5, 2024 Artificial Intelligence, Lecturer #06 7


Frame-Based Knowledge Representation
 Frame-based expert systems also provide an extension to the slot-
value structure through the application of FACETS.

 A FACET is a means of providing extended knowledge about an


attribute of a frame.

 FACETS are used to establish the attribute value, control end-user


queries, and tell the inference engine how to process the attribute.

 There are 3 types of FACETS


 Value facets
Specifies the default or initial value of that slot
 Prompt facets
Enables end-users to enter slot values during a session
with the system.
 Inference facets
Stop the inference process when the slot value is changed.
February 5, 2024 Artificial Intelligence, Lecturer #06 8
Frame-Based Knowledge Representation
CLASS: Computer
Item Code:
Model:
Processor:
Floppy: [Default] 3.5’’;
3.5’’;1.44MB
1.44MB
Keyboard
Power Supply: [Default] 145
145Watt
Watt
Waranty: [Default] 33years
years
Cost:
Stock: [Default] InInStock
Stock

February 5, 2024 Artificial Intelligence, Lecturer #06 9


Frame-Based Knowledge Representation
How are objects related in a frame-based system?

There are 3 types of relationships between


objects:
Generalization:
It denotes “a-kind-of” or “is-a”
relationship between super-class and its
sub-class.
For example, a car is-a vehicle, or in
other words, Car represents a subclass
of the more general super-class Vehicle.

February 5, 2024 Artificial Intelligence, Lecturer #06 10


Frame-Based Knowledge Representation
Generalization

CLASS: Vehicle

is-a is-a is-a

CLASS: Boat CLASS: Car CLASS: Airplane

Superclass: Vehicle Superclass: Vehicle Superclass: Vehicle

February 5, 2024 Artificial Intelligence, Lecturer #06 11


Frame-Based Knowledge Representation
How are objects related in a frame-based system?

Aggregation:
It is “a-part-of” or “part-whole” relationship
in which several subclass representing
components are associated with a super-
class representing components are
associated with a super-class representing
a whole.
For example, an engine is a part of a car.

February 5, 2024 Artificial Intelligence, Lecturer #06 12


Frame-Based Knowledge Representation
Aggregation
CLASS: Car

a-part-of a-part-of a-part-of

CLASS:Chassis CLASS:Engine CLASS:Transmission

Superclass: Car Superclass:Car Superclass:Car

February 5, 2024 Artificial Intelligence, Lecturer #06 13


Frame-Based Knowledge Representation
How are objects related in a frame-based system?

Association:
It describes some semantic relationship
between different classes which are
unrelated otherwise.
For example, Mr. Black owns a car.

February 5, 2024 Artificial Intelligence, Lecturer #06 14


Frame-Based Knowledge Representation
Association
CLASS: Mr. Black

owns
owns owns

Belongs-to
Belongs-to
Belongs-to

CLASS:House CLASS: Car CLASS: Computer

Superclass: Mr. Black Superclass: Mr. Black Superclass:Mr. Black

February 5, 2024 Artificial Intelligence, Lecturer #06 15


Frame-Based Knowledge Representation
Advantages
We can define the given problem in abstract
way.
Frames provide a way for the structured and
concise representation of knowledge.
In a single entity, a frame combines all
necessary knowledge about a particular
object or concept.
During a search for a specific item, we go
directly to the item’s instance frame that
contains the desired goal.

February 5, 2024 Artificial Intelligence, Lecturer #06 16


Frame-Based Knowledge Representation
Disadvantages
Idea behind the frame based system is easy,
but implementation is difficult.
It can not distinguish between essential
properties and accidental properties of a frame.
Another disadvantages is lack of precision.
Hence, in a complex case, it is difficult to
predict how these features will interact, or to
explain unexpected interactions, which makes
debugging and updating difficult.

February 5, 2024 Artificial Intelligence, Lecturer #06 17


Frame-Based Knowledge Representation
Interaction of frames and rules.
Most frame-based expert systems allow us to use a
set of rules to evaluate information contained in
frames.
Are there any specific differences between
rules used in rule-based expert systems and
those used in frame-based systems?
The answer is typically NO.
However, in a frame-based systems, rules often use
pattern matching clauses. These clauses contain
variables that are used for finding matching
conditions among all instance-frames.
February 5, 2024 Artificial Intelligence, Lecturer #06 18
Semantic Networks
It is a directed graph consisting of vertices, which represent concepts,
and edges, which represent semantic relations between the concepts.

Important semantic relations:


Meronymy (A is part of B, i.e. B has A as a part of itself)
Holonymy (B is part of A, i.e. A has B as a part of itself)
Hyponymy (or troponymy) (A is subordinate of B; A is kind of B)
Hypernymy (A is superordinate of B)
Synonymy (A denotes the same as B)
Antonymy (A denotes the opposite of B)

Semantic network is a way of representing relationships between


concepts.

Each concept is represented by a word or set of words.

A simple example is a hierarchical network where the concepts are


taxonomic
February 5, 2024
terms from biology, and the only type of relationship is type-of
Artificial Intelligence, Lecturer #06 19
(hyponymous relationship).
Semantic Networks
 Knowledge is represented as a network or graph

animal HAS_PART

subclass subclass head

mammal
reptile
subclass

LIVES_IN
africa elephant large
SIZE
instance
Nellie apples
LIKES
Semantic Networks
has
Vertebrata Cat Fur

Has-a is-a has

Bear
Animal Mammal
is-an is-a

is-a
is-an

Whale
Lives-in
Lives-in
Fish Water
February 5, 2024 Artificial Intelligence, Lecturer #06 21
Recommended Textbooks
 [Negnevitsky, 2001] M. Negnevitsky “ Artificial Intelligence: A guide to
Intelligent Systems”, Pearson Education Limited, England, 2002.
 [Russel, 2003] S. Russell and P. Norvig Artificial Intelligence: A Modern
Approach Prentice Hall, 2003, Second Edition
 [Patterson, 1990] D. W. Patterson, “Introduction to Artificial Intelligence
and Expert Systems”, Prentice-Hall Inc., Englewood Cliffs, N.J, USA,
1990.
 [Minsky, 1974] M. Minsky “A Framework for Representing
Knowledge”, MIT-AI Laboratory Memo 306, 1974.
 [Hubel, 1995] David H. Hubel, “Eye, Brain, and Vision”
 [Horn, 1986] B. K. P. Horn, Robot Vision, MIT Press, 1986.
 [Ballard, 1982] D. H. Ballard and C. M. Brown, “Computer Vision”,
Prentice Hall, 1982.

February 5, 2024 Artificial Intelligence, Lecturer #06 22

You might also like