KnowledgeRep

Knowledge
Representation
CPTR 314
The need of a Good
Representation
 The
representation that is used to
represent a problem is very
important
 The representation used can make
the difference between an efficient
algorithm and an algorithm that
doesn’t work al all
Associationist Theories




Associationist theories define the meaning of an
object in terms of a network of associations with
other objects
For the associationist, when humans perceive and
reason about an object, that perception is first
mapped into a concept
This concept is part of our entire knowledge of
the world and is connected through appropriate
relationships to other concepts
These relationships form an understanding of the
properties and behavior of objects such as snow
– For example, through experience, we associate the
concept snow with other concepts such as cold, white,
snowman, slippery, and ice.
Semantic Nets
The semantic net is a commonly used
representation in Artificial Intelligence and
it is based on the associationist theories
 A semantic net is a graph consisting of
nodes that are connected by edges
 The nodes represent objects, and the links
between nodes represent relationships
between those objects
 The links are usually labeled to indicate
the nature of the relationship

Psychological evidence
 Collins
and Quillan (1969) modeled
human information storage and
management using a semantic
network
 They found that there is evidence
that there is an intrinsic a
hierarchical representation of
concepts
Semantic network developed by Collins and Quillian in their research on
human information storage and response times (Harmon and King 1985)
Semantic Nets
 In
semantic nets the links are
arrows, meaning that they have a
direction
 One limitation of semantic nets is the
inability to represent negations
Semantic net representation of snow and ice
Semantic Nets
 Note
that in the previous semantic
net we have represented some
specific entities (Frosty) and some
general as (Snowman)
 We use object oriented concepts as
instances, classes and inheritance to
build semantic nets
Frames
 Frame-based
representation is a
development of semantic nets and
allows us to express the idea of
inheritance
 A Frame system consists of a set of
frames, which are connected
together by relations
 Each frame has one or more slots
which are assigned slot values
Frame Example
Frame Name
Slot
Slot Value
Bob
Is a
Owns
Eats
Builder
Fido
Cheese
Fido
Is a
Chases
Dog
Fang
Fang
Is a
Chases
Cat
Mice
Mice
Eat
Cheese
Cheese
Builder
Dog
Cat
Part of a frame description of a hotel room. “Specialization”
indicates a pointer to a superclass
Frame Relationships
 Generalizations
– “Is a”
 Aggregations
– One object being part of another object
 Associations
– Meaning in two directinons
 Example:
Fido “chases” Fang and Fang is
being “chased” by Fido
Inheritance

We might extend our frame system with
the following additional information
– Dogs chase cats
– Cats chase mice
We now do not need to state explicitly
that Fido chases Fang or that Fang chases
mice.
 We could add the following Fact:

– Mammals have four legs
– This is not true for humans. But we can define
a default value that it may be overridden.
Procedures
A
procedure is a set of instructions
associated with a frame that can be
executed on request
 Frames may have demon procedures
– Run automatically whenever a particular
value changes or when a particular
event occurs
Search Spaces
A search space is a representation of the
set of possible choices in a given problem,
one or more of which are the solution to
the problem
 Because a search space consists of a set
of states, connected by paths that
represent actions, they are also known as
state spaces
 The arrows between states represent state
transitions

State space of the 8-puzzle generated by “move blank” operations.
Semantic Tree
A
semantic tree is semantic net with
the restriction of being a tree instead
of a graph
 This means that it cannot contain
cycles while semantic nets could
Example: Traveling Salesman
A
salesman must visit each of a set
of cities and then return home. The
aim of the problem is to find the
shortest path that lets the salesman
visit each city.
 This is an NP complete problem
 If we fix the starting city there is
(n-1)! Possibilities to find the
shortest path
Traveling Salesman Example
We can write the tree and possible
distances
 We can search the tree using brute-force.

– Not very productive for large n; it can take
thousand of years to solve

We can search using a heuristics
– Heuristics is a rule or piece of information that
is used to make search more effective or more
efficient
– In this case we could use the nearest neighbor
heuristics for an approximation
An instance of the traveling salesperson problem.
Search of the traveling salesperson problem. Each arc is marked
with the total weight of all paths from the start node (A) to its
endpoint.
An instance of the traveling salesperson problem with the nearest
neighbor path in bold. Note that this path (A, E, D, B, C, A), at a cost of
550, is not the shortest path. The comparatively high cost of arc (C, A)
defeated the heuristic.
Goal Trees
A
goal tree (also called an and-or
tree) is a form of semantic tree used
to represent problems that can be
broken down in this way
 We say that the solution to the
problem is the goal, and each
individual step along the way is a
sub-goal
And/or graph of the expression (q and r => p)
And/or graph of the expression (q or r => p)
And/or graph a grammar. Some of the nodes (np, art, etc.) have been written more than
once to simplify drawing the graph.