Professional Documents
Culture Documents
L. Manevitz
Lecture 7
Definitions
Representation a set of syntactic and semantic conventions that make it possible to describe things. Syntax specifies the symbols that may be used and the ways those symbols may be arranged. Semantics specifies how meaning is embodied in the symbol arrangements allowed by the syntax.
All rights reserved L. Manevitz Lecture 7 2
L. Manevitz
Lecture 7
A Semantic Network
Mammal
Is-a
Person
uniformcolor Blue
has-part
Nose
L. Manevitz
Lecture 7
L. Manevitz
Lecture 7
home-team
Dodgers
All rights reserved L. Manevitz Lecture 7 6
John
agent
instance
BK23
L. Manevitz
Lecture 7
Second try:
John Bill
height greater-than
H1
All rights reserved L. Manevitz Lecture 7
height
H2
8
Bill height H2
Mail-carrier Is-a m
L. Manevitz
Lecture 7
10
L. Manevitz
Lecture 7
11
Town-Dogs
Bite
Constables
form
S1
d
Is-a
assailant b
Is-a
victim
Is-a
m
form
GS
All rights reserved
Is-a g
L. Manevitz Lecture 7 13
Inheritance
Is-a slot appears between objects and classes. ako slot appears between subsets.
L. Manevitz
Lecture 7
14
Inheritance -Procedure
F the given node; S the given slot; 1. Form a Queue of F and all class nodes connected to F via Is-A node. F is at top of Queue. 2. Until Queue is empty or default has been found determine if the first element of Queue has a value in its S slot:
a. b. Yes a value has been found. No remove the first element from Queue and add the nodes related to the first element by AKO slots to the end of Queue.
3.
If a value has been found say that this is the default value of Fs S slot. Otherwise announce Failure.
L. Manevitz Lecture 7 15
Inheritance - Example
Block ako Wedge shape Triangular ako Brick shape rectangular
Is-a Wedge18
All rights reserved L. Manevitz
Is-a Brick12
Lecture 7 16
3.
If a value has been found say that the value found is the value of Fs S slot. Otherwise announce Failure.
L. Manevitz Lecture 7 17
Brick12
Density
All rights reserved L. Manevitz
Example cont.
Block Weight is activated by request for the weight of Brick12 !
Brick
Weight Volume
4400 400 11
Lecture 7 19
Brick12
Density
All rights reserved L. Manevitz
3.
If a value has been found say that the value found is the default value of Fs S slot. Otherwise announce Failure.
L. Manevitz Lecture 7 20
Block
Blue
ako
ako
Brick Color (Default) Red
Is-a
Wedge18
All rights reserved
Is-a
Brick12
L. Manevitz Lecture 7 21
rectangular
Perspective -Example
Play Commemorate
shape
Brick
Purpose
Gift Is-a
Is-a
Purpose
Support
All rights reserved L. Manevitz Lecture 7 22
L. Manevitz
Lecture 7
23
L. Manevitz
Lecture 7
24
Frames
Frames : A collection of nodes that describe a stereotyped object, act or event. Example : newspaper report.
L. Manevitz
Lecture 7
25
Earthquake Example
Disaster-event
Killed
Event
Place
Injured
Homeless Damage
Day
Time
Earthquake
Magnitude Fault
Social-event
Number-ofguests Host
Flood
Crest River
Birthday-party
Birthdayperson Age
L. Manevitz Lecture 7 26
Hurricane
Wind-speed Name
All rights reserved
Lower Slabovia
Today
25
500,000,000
8.5
Sadie Hawkins
Lecture 7 28
L. Manevitz
Lecture 7
30
L. Manevitz
Lecture 7
31
L. Manevitz
Lecture 7
32
Scripts
L. Manevitz
Lecture 7
33
Scripts
Example - Restaurant script. Script: Restaurant Roles: S=Customer Track: Coffee Shop W=Waiter Props: Tables C=Cook Menu M=Cashier F=Food O=Owner Check Money
All rights reserved L. Manevitz Lecture 7 34
Results : S has less money O has more money S is not hungry S is pleased (optional)
All rights reserved L. Manevitz Lecture 7 35
S MTRANS W to table *S MBUILD choice of F S MTRANS signal to W W PTRANS W to table S MTRANS I want F to W
C MTRANS no F to W W PTRANS W to S W MTRANS no F to S (go back to *) or (go to Scene 4 at no pay All rights reserved L. Manevitz path)
L. Manevitz
Lecture 7
38