SlideShare a Scribd company logo
Module
               8
Other representation
         formalisms
           Version 2 CSE IIT, Kharagpur
Lesson
     21
Frames – II
  Version 2 CSE IIT, Kharagpur
Slots as Objects
How can we to represent the following properties in frames?

    •   Attributes such as weight, age be attached and make sense.
    •   Constraints on values such as age being less than a hundred
    •   Default values
    •   Rules for inheritance of values such as children inheriting parent's names
    •   Rules for computing values
    •   Many values for a slot.

A slot is a relation that maps from its domain of classes to its range of values.

A relation is a set of ordered pairs so one relation is a subset of another.

Since slot is a set the set of all slots can be represent by a metaclass called Slot, say.

Consider the following:


SLOT

                     isa:                 Class

                     instance:                      Class

                     domain:

                     range:

                     range-constraint:

                     definition:

                     default:

                     to-compute:

                     single-valued:




Coach

                     instance:                      SLOT

                     domain:                        Rugby-Team

                     range:                         Person


                                                               Version 2 CSE IIT, Kharagpur
range-constraint:                         (experience x.manager)

                    default:

                    single-valued:                        TRUE

Colour




                    instance:                    SLOT

                    domain:                      Physical-Object

                    range:                       Colour-Set

                    single-valued:                        FALSE

Team-Colours

                    instance:                    SLOT

                    isa:               Colour

                    domain:                      team-player

                    range:                       Colour-Set

                    range-constraint:                     not Pink

                    single-valued:                        FALSE

Position

                    instance:                    SLOT

                    domain:                      Rugby-Player

                    range:                       { Back, Forward, Reserve }

                    to-compute:                      x.position

                    single-valued:                        TRUE




NOTE the following:

   •   Instances of SLOT are slots
   •   Associated with SLOT are attributes that each instance will inherit.


                                                           Version 2 CSE IIT, Kharagpur
•   Each slot has a domain and range.
   •   Range is split into two parts one the class of the elements and the other is a
       constraint which is a logical expression if absent it is taken to be true.
   •   If there is a value for default then it must be passed on unless an instance has its
       own value.
   •   The to-compute attribute involves a procedure to compute its value. E.g. in
       Position where we use the dot notation to assign values to the slot of a frame.
   •   Transfers through lists other slots from which values can be derived

Interpreting frames

A frame system interpreter must be capable of the following in order to exploit the frame
slot representation:

   •   Consistency checking -- when a slot value is added to the frame relying on the
       domain attribute and that the value is legal using range and range constraints.
   •   Propagation of definition values along isa and instance links.
   •   Inheritance of default. values along isa and instance links.
   •   Computation of value of slot as needed.
   •   Checking that only correct number of values computed.

Access Paths

One advantage of a frame based representation is that the (conceptual) objects related to a
frame can be easily accessed by looking in a slot of the frame (there is no need, for
example, to search the entire knowledge-base). We define an access path, in a network of
frames, as a sequence of frames each directly accessible from (i.e. appearing in a slot of)
its predecessor. A sequence of predicates defines an access path iff any variable
appearing as the first argument to a predicate has appeared previously in the sequence.
For example, ``John's parent's sister'' can be expressed in Algernon as the path:



The access path ((parent John ?x) (sister ?x ?y)) is equivalent to the
syntactically similar predicate calculus statement:



In predicate calculus this statement is equivalent to



However, the corresponding sequence of predicates:




                                                             Version 2 CSE IIT, Kharagpur
is not an access path because a query of (sister ?x ?y) requires a search of every
frame in the entire knowledge-base.

Questions
1. Construct semantic network representations for the information below.

a. Richard Nixon is a Quaker and a Republican. Quakers and Republicans are Persons. Every
Quaker every quaker follows the doctrine of pacifism.

b. Mary gave the green flowered vase to her cousin.

2. Consider the following hierarchy of frames.

                   COMPUTER USERS
                    /           |
                   /            |
               ako/             | ako
                 /              |
                /               |
      UNIX USERS             PC USERS              MICROSOFT
                                                   CUSTOMERS
                              /                   /
                             /                   /
                  ako       /ako      ako       /ako
                           /                   /
                          /                   /
                   LINUX USERS            WINDOWS98
                                            USERS
                                        /
                                       /
                          is-a        /is-a
                                     /
                                    /
                                  AMY

a. Give the class-precedence list for Amy that would be obtained by applying the
topological-sorting algorithm to the above graph.

b. Suppose that each of the classes Unix users, PC users and Computer Users contains a
favorite programming language slot. The default value for this slot is:
           o Fortran, for the Computer Users class.
           o C, for the Unix Users class.
           o C++, for the PC Users class.

What is the value obtained for Amy's favorite programming language according to the
class-precedence list you constructed above?




                                                               Version 2 CSE IIT, Kharagpur
Solutions
1.a




1.b




2.a.
             Node                                Fish-hook pairs
       Amy               Amy-Linux Users, Linux Users-Windows98 Users
       Linux Users       Linux Users-Unix Users, Unix Users-PC Users
       Windows98 Users   Windows98 Users-PC Users, PC Users-Microsoft Customers
       Unix Users        Unix Users-Computer Users
       PC Users          PC Users-Computer Users




                                                     Version 2 CSE IIT, Kharagpur
Class Precedence list :

                  Amy
                  Linux Users
                  Unix Users                 - Use C
                  Windows98 Users
                  PC Users                  - Use C++
                  Computer Users             - Use Fortran
                  Microsoft Customers

   1. Amy's favorite programming language is C




                                                       Version 2 CSE IIT, Kharagpur

More Related Content

Viewers also liked

AI Lesson 11
AI Lesson 11AI Lesson 11
AI Lesson 11
Assistant Professor
 
AI Lesson 28
AI Lesson 28AI Lesson 28
AI Lesson 28
Assistant Professor
 
AI Lesson 29
AI Lesson 29AI Lesson 29
AI Lesson 29
Assistant Professor
 
AI Lesson 37
AI Lesson 37AI Lesson 37
AI Lesson 37
Assistant Professor
 
AI Lesson 38
AI Lesson 38AI Lesson 38
AI Lesson 38
Assistant Professor
 
AI Lesson 39
AI Lesson 39AI Lesson 39
AI Lesson 39
Assistant Professor
 
AI Lesson 40
AI Lesson 40AI Lesson 40
AI Lesson 40
Assistant Professor
 
AI Lesson 22
AI Lesson 22AI Lesson 22
AI Lesson 22
Assistant Professor
 
AI Lesson 33
AI Lesson 33AI Lesson 33
AI Lesson 33
Assistant Professor
 
AI Lesson 41
AI Lesson 41AI Lesson 41
AI Lesson 41
Assistant Professor
 

Viewers also liked (10)

AI Lesson 11
AI Lesson 11AI Lesson 11
AI Lesson 11
 
AI Lesson 28
AI Lesson 28AI Lesson 28
AI Lesson 28
 
AI Lesson 29
AI Lesson 29AI Lesson 29
AI Lesson 29
 
AI Lesson 37
AI Lesson 37AI Lesson 37
AI Lesson 37
 
AI Lesson 38
AI Lesson 38AI Lesson 38
AI Lesson 38
 
AI Lesson 39
AI Lesson 39AI Lesson 39
AI Lesson 39
 
AI Lesson 40
AI Lesson 40AI Lesson 40
AI Lesson 40
 
AI Lesson 22
AI Lesson 22AI Lesson 22
AI Lesson 22
 
AI Lesson 33
AI Lesson 33AI Lesson 33
AI Lesson 33
 
AI Lesson 41
AI Lesson 41AI Lesson 41
AI Lesson 41
 

Similar to AI Lesson 21

Core java
Core javaCore java
Core java
Savita Rawat
 
Music Recommender Systems
Music Recommender SystemsMusic Recommender Systems
Music Recommender Systems
fuchaoqun
 
There are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdfThere are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdf
aparnatiwari291
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspective
Anirban Santara
 
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
Silvio Cesare
 
Beirut Java User Group JVM presentation
Beirut Java User Group JVM presentationBeirut Java User Group JVM presentation
Beirut Java User Group JVM presentation
Mahmoud Anouti
 
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machines
butest
 
Java14
Java14Java14
Java14
aiter2002
 
Java 7
Java 7Java 7
Java 7
Rajiv Gupta
 
JVM
JVMJVM
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machines
butest
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, Captioning
Charles Deledalle
 
Machine Learning with Mahout
Machine Learning with MahoutMachine Learning with Mahout
Machine Learning with Mahout
bigdatasyd
 
SHOGUN使ってみました
SHOGUN使ってみましたSHOGUN使ってみました
SHOGUN使ってみました
Yasutomo Kawanishi
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
National Cheng Kung University
 
Early Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator ModelEarly Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator Model
Chunhua Liao
 
Chapter 6 data types
Chapter 6 data types Chapter 6 data types
Chapter 6 data types
Arafat X
 
KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live Patching
Yue Chen
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
kabirmahlotra
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
kabirmahlotra
 

Similar to AI Lesson 21 (20)

Core java
Core javaCore java
Core java
 
Music Recommender Systems
Music Recommender SystemsMusic Recommender Systems
Music Recommender Systems
 
There are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdfThere are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdf
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspective
 
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
 
Beirut Java User Group JVM presentation
Beirut Java User Group JVM presentationBeirut Java User Group JVM presentation
Beirut Java User Group JVM presentation
 
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machines
 
Java14
Java14Java14
Java14
 
Java 7
Java 7Java 7
Java 7
 
JVM
JVMJVM
JVM
 
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machines
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, Captioning
 
Machine Learning with Mahout
Machine Learning with MahoutMachine Learning with Mahout
Machine Learning with Mahout
 
SHOGUN使ってみました
SHOGUN使ってみましたSHOGUN使ってみました
SHOGUN使ってみました
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
Early Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator ModelEarly Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator Model
 
Chapter 6 data types
Chapter 6 data types Chapter 6 data types
Chapter 6 data types
 
KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live Patching
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 

More from Assistant Professor

AI Lesson 35
AI Lesson 35AI Lesson 35
AI Lesson 35
Assistant Professor
 
AI Lesson 34
AI Lesson 34AI Lesson 34
AI Lesson 34
Assistant Professor
 
AI Lesson 32
AI Lesson 32AI Lesson 32
AI Lesson 32
Assistant Professor
 
AI Lesson 31
AI Lesson 31AI Lesson 31
AI Lesson 31
Assistant Professor
 
AI Lesson 30
AI Lesson 30AI Lesson 30
AI Lesson 30
Assistant Professor
 
AI Lesson 27
AI Lesson 27AI Lesson 27
AI Lesson 27
Assistant Professor
 
AI Lesson 26
AI Lesson 26AI Lesson 26
AI Lesson 26
Assistant Professor
 
AI Lesson 25
AI Lesson 25AI Lesson 25
AI Lesson 25
Assistant Professor
 
AI Lesson 24
AI Lesson 24AI Lesson 24
AI Lesson 24
Assistant Professor
 
AI Lesson 23
AI Lesson 23AI Lesson 23
AI Lesson 23
Assistant Professor
 
Lesson 20
Lesson 20Lesson 20
AI Lesson 19
AI Lesson 19AI Lesson 19
AI Lesson 19
Assistant Professor
 
AI Lesson 18
AI Lesson 18AI Lesson 18
AI Lesson 18
Assistant Professor
 
AI Lesson 17
AI Lesson 17AI Lesson 17
AI Lesson 17
Assistant Professor
 
AI Lesson 16
AI Lesson 16AI Lesson 16
AI Lesson 16
Assistant Professor
 
AI Lesson 15
AI Lesson 15AI Lesson 15
AI Lesson 15
Assistant Professor
 
AI Lesson 14
AI Lesson 14AI Lesson 14
AI Lesson 14
Assistant Professor
 
AI Lesson 13
AI Lesson 13AI Lesson 13
AI Lesson 13
Assistant Professor
 
AI Lesson 12
AI Lesson 12AI Lesson 12
AI Lesson 12
Assistant Professor
 

More from Assistant Professor (19)

AI Lesson 35
AI Lesson 35AI Lesson 35
AI Lesson 35
 
AI Lesson 34
AI Lesson 34AI Lesson 34
AI Lesson 34
 
AI Lesson 32
AI Lesson 32AI Lesson 32
AI Lesson 32
 
AI Lesson 31
AI Lesson 31AI Lesson 31
AI Lesson 31
 
AI Lesson 30
AI Lesson 30AI Lesson 30
AI Lesson 30
 
AI Lesson 27
AI Lesson 27AI Lesson 27
AI Lesson 27
 
AI Lesson 26
AI Lesson 26AI Lesson 26
AI Lesson 26
 
AI Lesson 25
AI Lesson 25AI Lesson 25
AI Lesson 25
 
AI Lesson 24
AI Lesson 24AI Lesson 24
AI Lesson 24
 
AI Lesson 23
AI Lesson 23AI Lesson 23
AI Lesson 23
 
Lesson 20
Lesson 20Lesson 20
Lesson 20
 
AI Lesson 19
AI Lesson 19AI Lesson 19
AI Lesson 19
 
AI Lesson 18
AI Lesson 18AI Lesson 18
AI Lesson 18
 
AI Lesson 17
AI Lesson 17AI Lesson 17
AI Lesson 17
 
AI Lesson 16
AI Lesson 16AI Lesson 16
AI Lesson 16
 
AI Lesson 15
AI Lesson 15AI Lesson 15
AI Lesson 15
 
AI Lesson 14
AI Lesson 14AI Lesson 14
AI Lesson 14
 
AI Lesson 13
AI Lesson 13AI Lesson 13
AI Lesson 13
 
AI Lesson 12
AI Lesson 12AI Lesson 12
AI Lesson 12
 

Recently uploaded

SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
IsmaelVazquez38
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 

Recently uploaded (20)

SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 

AI Lesson 21

  • 1. Module 8 Other representation formalisms Version 2 CSE IIT, Kharagpur
  • 2. Lesson 21 Frames – II Version 2 CSE IIT, Kharagpur
  • 3. Slots as Objects How can we to represent the following properties in frames? • Attributes such as weight, age be attached and make sense. • Constraints on values such as age being less than a hundred • Default values • Rules for inheritance of values such as children inheriting parent's names • Rules for computing values • Many values for a slot. A slot is a relation that maps from its domain of classes to its range of values. A relation is a set of ordered pairs so one relation is a subset of another. Since slot is a set the set of all slots can be represent by a metaclass called Slot, say. Consider the following: SLOT isa: Class instance: Class domain: range: range-constraint: definition: default: to-compute: single-valued: Coach instance: SLOT domain: Rugby-Team range: Person Version 2 CSE IIT, Kharagpur
  • 4. range-constraint: (experience x.manager) default: single-valued: TRUE Colour instance: SLOT domain: Physical-Object range: Colour-Set single-valued: FALSE Team-Colours instance: SLOT isa: Colour domain: team-player range: Colour-Set range-constraint: not Pink single-valued: FALSE Position instance: SLOT domain: Rugby-Player range: { Back, Forward, Reserve } to-compute: x.position single-valued: TRUE NOTE the following: • Instances of SLOT are slots • Associated with SLOT are attributes that each instance will inherit. Version 2 CSE IIT, Kharagpur
  • 5. Each slot has a domain and range. • Range is split into two parts one the class of the elements and the other is a constraint which is a logical expression if absent it is taken to be true. • If there is a value for default then it must be passed on unless an instance has its own value. • The to-compute attribute involves a procedure to compute its value. E.g. in Position where we use the dot notation to assign values to the slot of a frame. • Transfers through lists other slots from which values can be derived Interpreting frames A frame system interpreter must be capable of the following in order to exploit the frame slot representation: • Consistency checking -- when a slot value is added to the frame relying on the domain attribute and that the value is legal using range and range constraints. • Propagation of definition values along isa and instance links. • Inheritance of default. values along isa and instance links. • Computation of value of slot as needed. • Checking that only correct number of values computed. Access Paths One advantage of a frame based representation is that the (conceptual) objects related to a frame can be easily accessed by looking in a slot of the frame (there is no need, for example, to search the entire knowledge-base). We define an access path, in a network of frames, as a sequence of frames each directly accessible from (i.e. appearing in a slot of) its predecessor. A sequence of predicates defines an access path iff any variable appearing as the first argument to a predicate has appeared previously in the sequence. For example, ``John's parent's sister'' can be expressed in Algernon as the path: The access path ((parent John ?x) (sister ?x ?y)) is equivalent to the syntactically similar predicate calculus statement: In predicate calculus this statement is equivalent to However, the corresponding sequence of predicates: Version 2 CSE IIT, Kharagpur
  • 6. is not an access path because a query of (sister ?x ?y) requires a search of every frame in the entire knowledge-base. Questions 1. Construct semantic network representations for the information below. a. Richard Nixon is a Quaker and a Republican. Quakers and Republicans are Persons. Every Quaker every quaker follows the doctrine of pacifism. b. Mary gave the green flowered vase to her cousin. 2. Consider the following hierarchy of frames. COMPUTER USERS / | / | ako/ | ako / | / | UNIX USERS PC USERS MICROSOFT CUSTOMERS / / / / ako /ako ako /ako / / / / LINUX USERS WINDOWS98 USERS / / is-a /is-a / / AMY a. Give the class-precedence list for Amy that would be obtained by applying the topological-sorting algorithm to the above graph. b. Suppose that each of the classes Unix users, PC users and Computer Users contains a favorite programming language slot. The default value for this slot is: o Fortran, for the Computer Users class. o C, for the Unix Users class. o C++, for the PC Users class. What is the value obtained for Amy's favorite programming language according to the class-precedence list you constructed above? Version 2 CSE IIT, Kharagpur
  • 7. Solutions 1.a 1.b 2.a. Node Fish-hook pairs Amy Amy-Linux Users, Linux Users-Windows98 Users Linux Users Linux Users-Unix Users, Unix Users-PC Users Windows98 Users Windows98 Users-PC Users, PC Users-Microsoft Customers Unix Users Unix Users-Computer Users PC Users PC Users-Computer Users Version 2 CSE IIT, Kharagpur
  • 8. Class Precedence list : Amy Linux Users Unix Users - Use C Windows98 Users PC Users - Use C++ Computer Users - Use Fortran Microsoft Customers 1. Amy's favorite programming language is C Version 2 CSE IIT, Kharagpur