Sunteți pe pagina 1din 27

FRAMES

By:

Abisekh Bahadur Niraula (071/MSCSKE/651)


Rasu Shrestha (071/MSCSKE/662)
Shikhar Basnet (071/MSCSKE/666)
Umesh Timalsina (071/MSCSKE/669)

Department of Electronics and Computer Engineering


IOE, Pulchowk Campus

1.

FRAMES- INTRODUCTION:

o Knowledge Representation Technique


o Similar to Semantic Nets.
o Proposed by: Marvin Minsky in 1974.
o Article: A Framework For Representing Knowledge.
o Common Sense System: Not Rule Based.
o AIs Primary Data Structures.

1.

FRAMES- INTRODUCTION-II:

o Frame: Prototype of a Concept


o Denoting attributes of the concept
o The class of objects or concepts to which the concept in
question belongs.
o And some other things

o An instance of a Frame.
o Representation of a specific object.

o Semantic Nets with Attributes.


o Description: Similar to Structure Data Type in C.

1.

FRAMES- INTRODUCTION-III: 4

o A frame represents an entity as a set of slots


(attributes) and associated values
o Represents:
o General Concept (Frame)
o Specific Entry (Instance of the Frame)

o Implicit Relation with other Frames.


o Concept: Similar to OOS(Object Oriented Systems)
o Hierarchical Representations: Super and Sub Classes.
o Classes and Frames: Used interchangebly.

2.

EXAMPLES:

2.

EXAMPLES-HIERARCHY:

2.

EXAMPLES-HIERARCHY:

2.

EXAMPLES- I:

o FIDO is a Dog.
o Dog is a concept.
o Fido is a Particular dog.
How Can We Represent the Concept/ Notion of the
Creature Dog?

2.

EXAMPLES:

o FIDO is a Dog.
o Dog is a concept.
o Fido is a Particular dog.
How Can We Represent the Concept/ Notion of the
Creature Dog?
A Way: ANIMALS>>>MAMMALS>>DOG
o FIDO: an instance of the Frame Dog.
o Notion of Frames: Felt by people out of Common
Sense.

2.

10

EXAMPLES- FRAME:
DOG:
SLOT NAME

SLOT VALUES(Default)

IS_A

Mammal

No_of_legs

Has_Tail

Yes

Color_of_Skin

Owner
Type_of_Teeth

Sharp

2.

11

EXAMPLES- FRAME:
FIDO:
SLOT NAME

SLOT VALUES

IS A

Mammal

No_of_legs

Has Tail

Yes

Color of Skin

White

Owner

Shikhar

Type of Teeth

Sharp

2.

EXAMPLES- FRAME:
A Book Frame:
Book Frame
Slot Filler
Title

AI. A modern Approach

Author Russell & Norvig

Year

2003

12

2.

13

EXAMPLES- FRAME:
Inheritance: Similar to OOP Paradigm.
Hotel Chair
Hotel Room

what
room
where hotel
contains
hotel chair
hotel phone
hotel bed

what chair
height 20-40cm
legs
4

Hotel Phone
what phone
billing guest

Hotel Bed
what
size
part

bed
king
mattress

Mattress
price

100$

3.

SLOTS:

14

o Slots Denote Attributes.


o Attributes are typed.
o Some Values: Already Instantiated.
o Some Values: Defined in the Instances only.
o Instantiated Slots: May be Used to Answer
Queries.

3.

SLOTS-II:

15

Slots Can Contain:


o Values
o Types
o Constraints Over Possible Values
o Predicates:
o Daemons/ Functions.

o Slots Can be Structured- Frames Within the SlotsFrame Pointers.

3.

16

SLOTS-III:

o Constraints over Possible Values:


BOY:

Is_a

Human_being

Type

Name

String

Age

Float

Stays_at

String

Studies_in

String

Grades

*results

Constraints

<=15

3.

SLOTS-IV:

17

Predicates in a slot:
o Two Types of Predicates in General:
o If needed
o If added.

o If needed: State How to Find a Value.


o If added: Used to check constraints on the Values.

3.

18

SLOTS-IV:

o Predicates in a slot- Example:


BOY:

Is_a

Human_being

Type

Name

String

Age

Float

Stays_at

String

Studies_in

String

Grades

*results

If needed compute CGPA(BOY, results)


If added test(constraint).

<=15

4.

INHERITENCE:

Question: Does Tom drink Milk?


TOM is an instance of BOY.
Also, Boy is a HUMAN BEING.
HUMAN BEINGS drink milk.
All Human Beings Drink Milk.
The answer can be inherited.

19

5.

GENERIC and DEFAULT VALUES: 20

o Generic Values:
o Hold True for all instances and sub-classes of the class.
o Inherited Down the Hierarchy

o Default Values:
o Filler Values

o Default Values may be over-written.


o Specified in the Parent-Class(Super Class).
o Conflicts: Multiple Inheritance.

6.

INFERENCE IN A FRAME:

21

o Look for Candidate Frame or Instances.


o Look for Availability of Values.
o If Available- Solved.
o Else go to Preceding Level and so on.
o If Solved at a Higher Level, try to have More
Specific Answers Going Down the hierarchy.

7.

ANSWERING QUERIES- EXAMPLE:

22

9.

ADVANTAGES:

23

o Makes programming easier by grouping related


knowledge
o Easily understood by non-developers
o Expressive power
o Easy to set up slots for new properties and
relations
o Easy to include default information and detect
missing values.

9.

DISADVANTAGES:

24

o No standards (slot-filler values)


o More of a general methodology than a specific
representation:
o Frame for a class-room will be different for a professor and
for a maintenance worker

o No associated reasoning/inference mechanisms

10. REFERENCES:

25

1. Artificial Intelligence, Lecture-20, Prof. Dr.


Anupam Basu, Department of Computer Science
and Engineering, IIT Kharagpur, NPTEL, MHRD,
Government of India

11. QUERIES??

26

THANK-YOU

S-ar putea să vă placă și