You are on page 1of 73

CHAPTER 4

KNOWLEDGE
REPRESENTATIO
N ISSUES

Representation and
Mappings
Approaches to
knowledge
Representation
Issues in Knowledge
Representation
Frame problem
1/6/16

Knowledge It is defined as
Intellectual acquaintance with, or
perception of , fact or truth.
Representation A way of
describing certain fragments or
information.
Knowledge Representation - a
study of how knowledge is actually
pictorized & how effectively it
resembles the representation of
1/6/16

Knowledge Base
Representation of knowledge and the
reasoning processes that brings
knowledge to life center to entire
field of AI

Knowledge base = set of sentences


in a formal language
1/6/16

In solving problems in AI we must represent knowledge


and there are two entities to deal with:

Facts
-truths about the real world and what we represent.
e.g.Guitars have strings, trumpets are brass
instruments.
This can be regarded as theknowledge level - to be
represented

Representation of the facts


which we manipulate.
1/6/16

Facts

Internal
Representations

English
understandin
g

reasonin
g
program
s

English
generation

English
Representations

The links in the figure are


called representation
mappings.
1/6/16

Representation mappings, there are: Forward representation which maps from


facts to representation.
Backward representation which maps the
other way.

One representation of facts concerns


with natural language (particularly
English) sentences.

1/6/16

Example we can use mathematical


logic as the representation
formalism.
Consider the English sentences
below

Spot is a dog
This fact can also be represented in
logic as follows:1/6/16

Suppose also we have a logical


representation of the fact: all dogs have
tails as shown below:

x: dog(x) hastail(x)
Using the deductive mechanisms of the logic,
we may generate the new representation
object

hastail(Spot)
1/6/16

Using an appropriate backward


mapping function we could then
generate the English sentence:

Spot has a tail


Or we could make use this
representation of new fact to cause
us to take some appropriate action or
to derive representation of additional
facts.
1/6/16

10

Spot is a dog
dog(Spot)

Every dog has a tail


x: dog(x) hastail(x)

Spot has a tail

hastail(Spot)
1/6/16

11

Fact-representation mapping is not


one-to-one.

Good representation can make a


reasoning program trivial.

1/6/16

12

Three Representations of Multilated Checker Board

No. black squares


= 30
No. white square
= 32
1/6/16

13

Initial
facts

Abstract Reasoning Program


Model

desired real
reasoning

forward
representatio
n mapping
Internal
representations
of initial facts

Final
facts

backward
representatio
n mapping

operation
of
program

Internal
representations
of final facts
Concrete Reasoning Program
Performs

AI Domain : Find Concrete


implementation of Abstract concepts
1/6/16

14

Approach to Knowledge
Reperesentation
There are multiple techniques for
knowledge representation.
Different representation formalisms
Logic
Database systems
Semantic nets
Frames

Many programs rely on more than


one technique.
1/6/16

15

Properties for Knowledge


Representation Systems
The following properties should be possessed by a
knowledge representation system.
Representational Adequacy
-The ability to represent all kinds of knowledge that are
needed in that domain

Inferential Adequacy

- The ability to manipulate the represented structure and


infer new structures.

Inferential Efficiency

- The ability to incorporate additional information into the


knowledge structure that will aid the inference
mechanisms.

Acquisitional Efficiency

-The ability to acquire new information easily, either by


direct insertion or by program control.
1/6/16

16

To date no single system optimizes all of the above

Simple relational knowledge

Simple way to store facts.


Each fact about a set of objects is set out
systematically in columns.
Little opportunity for inference.
Knowledge represented in this form serve as the
input to more powerful inference engines.

1/6/16

17

An example of Simple Relational


Knowledge Systems
Player

Height

Weight

BatsThrown

Hank Aaaron 6-0

180

Right-Right

Willie Mays

5-10

170

Right-Right

Babe Ruth

6-2

215

Left-Left

Ted William

6-3

205

Left-Right

From the facts it is not possible to answer


even simple questions directly.
1/6/16
Eg: Who is the tallest player?
18

Inheritable knowledge
Relational knowledge is made up of objects
consisting of
attributes
corresponding associated values.
We extend the base more by allowing
inference mechanisms:
Property inheritance
elements inherit values from being
members of a class.
data must be organized into a hierarchy
of classes.
1/6/16

19

Device to support property inheritance along Isa


and Instance links.
Inheritance is easy - knowledge in slot and filler
systems is structured as a set of entities and
their attributes.
A slot is an attribute value pair in its simplest
form.
A filler is a value that a slot can take -- could be
a numeric, string (or any data type) value or a
pointer to another slot.

Two types:
Semantic Nets.
Frames.
1/6/16

20

Semantic Nets
Information is represented as a set of
nodes connected to each other by a
set of labeled arcs which represent
relationships among the nodes.

1/6/16

21

1/6/16

22

Boxed nodes -- objects and values of


attributes of objects.
Values can be objects with attributes
and so on.
Arrows -- point from object to its value.

1/6/16

23

All objects and most attributes


correspond to baseball domain.
Is A- Class Inclusion
Instance Class Membership
-- Basis for property Inheritance as an
inference technique.

1/6/16

24

Algorithm to retrieve a value for an


attribute of an instance object:
1. Find the object in the knowledge
base
2. If there is a value for the attribute
report it
3. Otherwise look for a value of
instance if none fail
4. Otherwise go to that node and find a
value for the attribute and then
report it
5. Otherwise search through
1/6/16

25

Example Knowledge Base to derive


answers to the following queries:
Team(Pee-Wee-Reese) = BrooklynDodgers .
Batting-average(Three-FingerBrown)=.106
Height(Pee-Wee-Reese) =6-1.
Bats(Three-Finger-Brown) = Right.

1/6/16

26

A Semantic Graph
bought

pasttense
time

agent
object

student

computer

the:definite
modifier

a:indefinite

June
in:modifier

new
The student bought a new computer in June.
1/6/16

27

Frames

A frame is a collection of attributes or slots


and associated values that describe some real
world entity.
Knowledge is organized into small packets called
Frames.
Frames can also be regarded as an extension to
Semantic nets.
The contents of the frame are certain slots which
have values.
Each frame represents:

1/6/16

28

3 components of a frame
frame name
attributes (slots)
values (fillers: list of values, range,
string, etc.)

1/6/16

29

1/6/16

30

Frame Knowledge Representation

1/6/16

31

Inferential knowledge:

Facts represented in a logical


form, which facilitates reasoning.

An inference engine is required.

1/6/16

32

1/6/16

33

1/6/16

34

1/6/16

35

Procedural knowledge:

Representation of how to make it


rather than what it is.

May have inferential efficiency, but


no inferential adequacy and
acquisitional efficiency.

Can be represented in LISP, ADA,


PROLOG etc

1/6/16

36

1/6/16

37

1/6/16

38

Advantages:
Heuristic or domain specific knowledge
can be represented.
Default reasoning facilitated.

Disadvantages:
Completeness : not all cases may be
represented
Consistency : not all deductions may
be correct.

Example:
If Fred is a bird, deduce- Fred can Fly.
1/6/16

39

Issues in Knowledge
Representation

There are several issues that must be

considered when representing various


kinds of real-world knowledge.
Important Attributes
Relationship among Attributes
Inverses
Existence in an Isa hierarchy
Technique for reasoning about values
Single-valued attributes
1/6/16

40

Important Attributes :
The attributes that occur in many
different types of problem

instance and isa


is important because each supports
property inheritance.
1/6/16

41

Relationship among Attributes


Attributes to describe objects are entities.
Properties like:

Inverses
Existence in an ISA Hierarchy
Techniques for reasoning
about values
Single valued Attributes
1/6/16

42

Inverses:
Entities are related to each other in
different ways.
Eg:Attributes (Isa, Instance,Team)
with directed arrow,
Originating- Object being described
Terminating Object or Value

1/6/16

43

Relationships
An example of an inverse in

Team(Pee-Wee-Reese,BrooklynDodgers)

This can be treated as


Pee-Wee-Reese plays in the team BrooklynDodgers or
Pee-Wee-Reese team is Brooklyn-Dodgers.

Another representation is
Team = Brooklyn-Dodgers

Team-members = Pee-Wee-Reese
1/6/16

44

An Isa Hierarchy of Attributes:


This is about generalizationspecialization.
Eg:
physical attribute General attribute
physical _size Specialization of
general attribute
height attribute

1/6/16

45

Techniques for Reasoning about Values


Reasoning values of attributes- not given
explicitly
Eg:
Type of Value: Height- Centimeter
Constraints on related entity values :
Person_age < Parent_age

Backward / If Needed Rules:


Rules for computing the value when it is needed

Forward / If added Rules:


Rules describing actions that should be taken if a
value ever becomes known
1/6/16

46

Single Valued Attributes:


A kind of attribute that takes a unique
values
Eg:
A player will have unique height

1/6/16

47

Choosing the Granularity of


Representation:
Level of the knowledge represented
Eg:

Fact John spotted Sue


Representation Spotted(agent(John),Object(Sue))

Question : Who Spotted Sue?


1/6/16

48

Disadvantages:
At what level of detail should knowledge
be represented?
Balance the trade-off
High-level facts may not be adequate for inference
Low-level primitives may require a lot of storage.

Eg: John punched Mary


Represented in CD- Conceptual Dependency
CD representations of a sentence is built out
of primitives and these primitives are
combined to form the meanings of the
words.
1/6/16

49

John
punche
d Mary

Mary
punched
John
1/6/16

50

In the above representation the symbols


have the following meaning:
Arrows indicate direction of
dependency
Double arrow
indicates two may
link between actor and the action
P indicates past tense
0 indicates the object case relation
R indicates the recipient case relation
D indicates the direction of the object in
the action
1/6/16

51

The classical example- kinship


terminology
One set of primitives:
Mother,father,Son,Daughter,Brother and
Sister

Eg: Fact - Mary is Sues Cousin


An attempt to describe the cousin
relationship in terms of the primitives
could be interpreted as,
Mary =
daughter(brother(mother(Sue)))
Mary =
daughter(sister(mother(Sue)))
1/6/16
52
Mary =

1/6/16

53

1/6/16

54

How should sets of objects be


represented?
By Names.
By Extensional Definition.
By Intensional Definition

1/6/16

55

By Names:
Node named Baseball Player in Semantic net
Predicates Ball and Batter in Logical
representations

This simple representation makes it possible


to aassociate predicate with sets.
It doesnot provide any information about the
set it represents.
It doesnot tell how to determine whether a
particular object is a member of the set or
not.
1/6/16
56

There are 2 ways to state a definition of a


Ser and its elements.
By Extensional Definition
List the members
Eg: {Earth}

By Intensional Definition
When a particular object is evaluated, it returns
True/False depending on whether the object is in
the set or not.
Eg:

{x:sun-planet(x) ^ humaninhabited(x)}
{x:sun-planet(x) ^ nth fatherest
from
1/6/16
57

Finding the Right Structures as


needed:
Locating appropriate knowledge structures
that have been stored in memory.
We have a Sample Script
Sue went out to lunch. She sat at a table
and called a Waitress, who brought her a
menu. She ordered a sandwich.
Questions:
1. Was sue in a restaurant?
2. Who was the She who ordered the sandwich?
1/6/16

58

SCRIPTS
A script is a knowledge-representation
structure that is extensively used for
describing stereo typed sequences of
actions.
A Script consists of a set of Slots

Events like,
Going to Hotel-Eating-paying the Bill-Exiting
Going to Theatre-Getting a Ticket-Viewing
Flim-Leaving
etc..
1/6/16

59

The components of a script include:


Entry Conditions
-- these must be satisfied before events in the script can occur.
Results
-- Conditions that will be true after events in script occur.
Props
-- Slots representing objects involved in events.
Roles
-- Persons involved in the events.
Track
-- Variations on the script. Different tracks may share components of the same
script.
Scenes
-- The sequence ofeventsthat occur.Eventsare represented inconceptual
dependencyform.
Advantages of Scripts:
Ability to predict events.
A single coherent interpretation may be build up from a collection of observations.
Disadvantages of Scripts:
Less general than frames.
May not be suitable to represent all kinds of knowledge.
1/6/16

60

1/6/16

61

1/6/16

62

1/6/16

63

Selecting an Initial Structure:

Three important properties


1. Index the structure
Eg: Word Fly has a different meaning
John flew to Newyork.
John flew a kite.
John flew down the street.
John flew into a rage.

1/6/16

64

2. Major concepts as a pointer to all of the


structures
Concept Steak points to 2 scripts
One for Restaurant
One for Supermarket
Concept Bill - points to 2 scripts
One for Restaurant
One for Shopping Script
- Take intersection of those sets that involves all
the content words
3. Locate a major clue to select an initial structure.
1/6/16

65

Revising the choice when


necessary
Candidate Knowledge structure
Detailed Matching process
Variables bound to objects
Attributes values compared
Values satisfy- put into appropriate places

If no appropiriate values then new


structure
If appropiriate values then current
structure
If Situation change - new structure
1/6/16

66

Part of the structure should contain


information-acceptable to make
excuses.
Heuristic:
Appropriate if a desired feature is
missing than an inappropriate feature is
present
Eg:
Person with one leg is more plausible than
aperson with a tail.

1/6/16

67

Similarity Network
Linking among a set of frames
There is a CHAIR 4 legs can be
modulated as
TABLE too big, no back
STOOL too high, no back
BENCH no back,too wide
DESK- drawers

1/6/16

68

1/6/16

69

The Frame problem


The whole problem of representing the facts
that change as well as those that do not is known
as frame problem.
ROBOT World
ON(Plant, Table)
UNDER(Table,Window)
IN(Table,Room)
Table with a plant on it under the window
Move the table to the center of the room
Inference
plant is in the center of the room
while window remains as such.
1/6/16

70

Frame Axioms:
Explicit set of axioms
Rules to tell what predicates
describing a state are not changed
Describe all the things that do not
change when a particular operator is
applied in state n to produce n+1

1/6/16

71

Frame Axioms

color(x,y,s1)^
move(x,s1,s2)

color(x,y,s2)
1/6/16

72

State Variable:
A specific indication of the time at
which the fact was true.

Eg:
Robot World- before the table was
moved it was under the window and
after being moved, it was in the center
of the room.

1/6/16

73

You might also like