33
WEAK SLOT -AND FILLER -STRUCTURES Amey D.S.Kerkar, Asst.Professor, Computer Engineering Dept. Don Bosco College of Engineering, Fatorda-Goa.

weak slot and filler structure

Embed Size (px)

Citation preview

Page 1: weak slot and filler structure

WEAK SLOT -AND FILLER -STRUCTURES

Amey D.S.Kerkar,Asst.Professor, Computer Engineering Dept.

Don Bosco College of Engineering,Fatorda-Goa.

Page 2: weak slot and filler structure

Inheritable knowledge• The relational knowledge base determines a set of

attributes and associated values that together describe the objects of knowledge base.

E.g. Player_info(“john”,”6.1”,180,right_throws)• The knowledge about the objects, their attributes and

their values need not be as simple as shown.

• One of the most powerful form of inference mechanisms is property inheritance.

Player Height Weight Bats_throws

John 6.1 180 Right_throws

Sam 5.10 170 right_right

Jack 6.2 215 Bats_throws

Page 3: weak slot and filler structure

• Property Inheritance

• Here elements of specific classes inherit attributes and values from more general classes in which they are included.

• In order to support property inheritance objects must be organized into classes and classes must be arranged in generalization hierarchy.

Page 4: weak slot and filler structure

Here,

Lines ==attributes and boxed nodes== object/values of attributes of an object.

This structure is also called as slot and filler structure. These structures are the devices to support property inheritance along isa and instance links.

Mammal

Person

Owen

Nose

Red Liverpool

isa

instance

has-part

uniform

colour team

person(Owen) instance(Owen, Person)

team(Owen, Liverpool)

Here,

Lines ==attributes and boxed nodes== object/values of attributes of an object.

This structure is also called as slot and filler structure. These structures are the devices to support property inheritance along isa and instance links.

Mammal

Person

Owen

Nose

Red Liverpool

isa

instance

has-part

uniform

colour team

Page 5: weak slot and filler structure

• Advantage of slot and filler structures:

1. monotonic reasoning can be performed more effectively than with pure logic and non monotonic reasoning is easily supported.

2. Makes it easy to describe properties of relations.

e.g. “does Owen has-part called nose?”

3. Form of object oriented programming and has advantages such as modularity and ease of viewing by people.

Page 6: weak slot and filler structure

Slot and filler structures

Attribute= slot and its value= filler

Weak slot and filler structure Strong slot and filler structure

FramesSemantic nets ScriptsConceptual Dependency

Weak slot and filler structures: are “Knowledge- Poor” or “weak” as very little importance is given to the specific knowledge the structure should contain.

Page 7: weak slot and filler structure

Semantic nets• In semantic nets information is represented as:

– set of nodes connected to each other by a set of labelled arcs.

• Nodes represent: various objects / values of the attributes of object .

• Arcs represent: relationships among nodes.Mammal

Person

Jack

Nose

Blue Chicago Royals

isa

instance

has-part

uniform

color team

Page 8: weak slot and filler structure

• In this network we could use inheritance to derive the additional info:

has_part(jack, nose)

Intersection Search

One way to find relationships among objects is to spread the activation(links) out from two nodes and find out where it meets

Ex: relation between :

Red and liverpoolMammal

Person

Owen

Nose

Red Liverpool

isa

instance

has-part

uniform

color team

Page 9: weak slot and filler structure

• Representing non binary predicates:

1. Unary –

e.x. Man(marcus) can be converted into:

instance(marcus,Man)

2. Other arities-

e.x. Score(india,australia,4-1)

3 or more place predicates can be converted to binary form as follows:

1. Create new object representing the entire predicate.

2. Introduce binary predicates to describe relation to this new object.

Page 10: weak slot and filler structure

TEST4

isa

Game

Australia

India

4-1

Visiting _team Score

Home _team

Score(india,australia,4-1)

Page 11: weak slot and filler structure

Ex. 2. “john gave the book to Mary”

give(john,mary,book)

EV 1

instance

Give

John

Mary

Book

BK1

instance

Objectagent

beneficiary

Page 12: weak slot and filler structure

Making some important distinctions

1. “john has height 72”

2. “john is taller than Bill”

John 72

height

John Bill

H1 H2

height height

72

Value

greater_than

Page 13: weak slot and filler structure

Partitioned semantic nets• Used to represent quantified expressions in

semantic nets.

• One way to do this is to partition the semantic net into a hierarchical set of spaces each of which corresponds to the scope of one or more variable.

• “the dog bit the mail carrier” [partitioning not required]

d

Dogs

b

Bite

m

Mail-Carrier

isa isa isa

assailant victim

Page 14: weak slot and filler structure

• “every dog has bitten a mail carrier”

x: dog (x) y: mail-carrier(y) bite(x, y)

• How to represent universal quantifiers?

– Let node ‘g’ stands for assertion given above

– This node is an instance of a special class ‘GS’ of general statements about the world.

– Every element in ‘GS’ has 2 attributes:-

• Form - states relation that is being asserted.

• connections - one or more, one for each of the universally quantified variables.

– ‘SA’ is the space of partitioned sementic net.

Page 15: weak slot and filler structure

• “every dog has bitten a mail carrier”

SA

S1

d

Dogs

b

Bite

m

Mail-Carrier

isa isa isa

assailant victimg

GS

isaform

Page 16: weak slot and filler structure

• “Every dog in the town has bitten the constable”

SA

m

Constables

isaS1

d

Dogs

b

Bite

isa isa

assailant

g

GS

isa

form

victim

Page 17: weak slot and filler structure

• “Every dog in the town has bitten every constable”

SAConstables

S1

d

Dogs

b

Bite

isa isa

assailant

gGS

isa

form

victimc

isa

Page 18: weak slot and filler structure

• More examples of sementic nets:

• “ Mary gave the green flowered vase to her favourite cousin”

EV 1

instance

Give

Mary

cousin

vaseObjectagent

beneficiaryColour_pattern

Green flowered

favourite

Page 19: weak slot and filler structure

• “every batsman hits a ball”

SA

S1

b

Batsman Hits

b

Balls

isa isa isa

action Acts_ong

GS

isaform

h

Page 20: weak slot and filler structure

• “Tweety is a kind of bird who can fly. It is Yellow in colour and has wings.”

Bird

Tweety

Wings

instance

has-partyellow

fly

colour

action

Page 21: weak slot and filler structure

• Represent following using sementic nets:-

Tom is a cat. Tom caught a bird. Tom is owned by John. Tom is ginger in color. Cats like cream.The cat sat on the mat. Acat is a mammal. Abird is an animal. All mammals are animals.mammals have fur.

Page 22: weak slot and filler structure

Frames• Another kind of week slot and filler structure.

• Frame is a collection of attributes called as slots and associated values that describe some entity in the world (filler).

• Consider,Room

Hotel room

isa

Hotel bed

contains

Hotel Chair

contains

Location

Chair

Sitting_on

4

20-40 cmsisa

use

legs

height

Room No 2

instance

Page 23: weak slot and filler structure

Hotel Room

isa : Room

contains: Hotel Bed

contains: Hotel Chair

Hotel Chair

isa: Chair

use: sitting_on

location: Hotel Room

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

Frame System for Hotel Room

Frame structure for Hotel Room

Frame structure for Hotel Chair

Frame structure for all remaining attributes

Page 24: weak slot and filler structure

Person Jack_Roberts

isa: Mammal instance: Fielder

cardinality: 6,000,000,000 height: 5-10

* Handed: right balls: right

batting_avg: 0.309

Adult__Male team: Chicago cubs

isa: Person uniform_color: blue

Cardinality: 2,000,000,000 Fielder

* Height: 5- 10 isa: ML_Baseball_Player

cardinality: 376

ML_Baseball_Player batting_avg: 0.262

isa: Adult_Male

cardinality: 624 ML_Baseball_Team

* height: 6-1 isa: Team

* bats: equal to handed cardinality: 26

* batting-avg: 0.252 team_size: 24

* team: manager:

*uniform_color:

Individualframe

Page 25: weak slot and filler structure

• Meta Class: special class whose elements themselves are classes.

– If X is meta class and Y is another class which is an element of X, then Y inherits all the attributes of X.

• Other ways of relating classes to each other

1. Mutually disjoint: 2 classes are mutually disjoint if they are guaranteed to have no elements in common.

2. Is covered by: relationship is called as ‘covered-by’ when we have a class and it has set of subclasses, the union of which is equal to the superclass.

ML_Baseball_Player

isa

Fielder Pitcher

isa

Catcher

isa

American Leaguer

isa

National Leaguer

isa

Jackinstanceinstance

Page 26: weak slot and filler structure

ML_Baseball_Player

is covered-by: { Pitcher, Catcher, Fielder,American leaguer, National leaguer}

Pitcher

isa: ML_Baseball_Player

mutually_disjoint-with: {Catcher, Fielder }

Catcher

isa: ML_Baseball_Player

mutually_disjoint-with: {Pitcher, Fielder }

Fielder

isa: ML_Baseball_Player

mutually_disjoint-with: {Pitcher, Catcher}

.

.

.

.

Page 27: weak slot and filler structure

Tangled Hierarchies

• Hierarchies that are not trees

• Usually hierarchy is an arbitrary directed acyclic graph.

• Tangled hierarchies requires new property inheritance algorithm.

Page 28: weak slot and filler structure

•FIGURE A

• Can fifi fly?

• The correct answer must be ‘no’.

– Although birds in general can fly, the subset of birds , ostriches does not.

– Although class pet bird provides path from fifi to bird and thus to the answer that fifican fly, it provides no info that conflicts with the special case knowledge associated with class ostrich, so it should hove no effect on the answer.

isa

isaisa

isa

Ostrichfly :no

fififly : ?

Birdfly :yes

Pet-Bird

Page 29: weak slot and filler structure

FIGURE B• Is Jack Pacifist?

– Ambiguity

• One way to solve ambiguity is to base the new inheritance algo based on path length:– Using BFS start with the frame for which slot value is needed.

– Follow its instance links, then follow isa links upwards .

– If the path produces a value it can be terminated, as can all other paths once their length exceeds that of the successful path.

instanceinstance JackPacifist : ?

Quakerpacifist: true

Republicanpacifist: False

Page 30: weak slot and filler structure

• Using this technique our answers to fifi problem is :’no’ and for jack problem we get 2 values hence ‘contradiction’.

• Now consider following hierarchies:FIGURE C

• Our new algo gives answer: fifi can fly. i.e. Fly: yes.

isa

instanceinstance

isa

White-PlumedOstrich

fififly : ?

Birdfly :yes

Pet-Bird

Plumed Ostrich

isa

Ostrichfly: no

isa

Page 31: weak slot and filler structure

FIGURE D

• Here our new algo reaches Quaker and deduces pacifist:true and stops without noticing further contradiction.

instanceinstanceJack

Pacifist : ?

Quakerpacifist: true

ConservativeRepublican

isa

Republicanpacifist: false

Page 32: weak slot and filler structure

• Solution to the problem is to base our algo not based on path length but on inferential distance.

• Class 1 is closer to class2 than class 3 if class1 has an inferential path through class2 to class3.

• For figure A answer is no

• For figure B Contradiction

PLEASE REFER PROPERTY INHERITANCE ALGO

Rich and Knight pg. 204-205 3rd edition.

Class 2Class 1 Class 3

Page 33: weak slot and filler structure