Knowledge Representation Issues
Knowledge Representation Issues
Issues
* Internal
Reasoning
Facts Programs
Representations
*
English Understanding English Generation
English
Representations
Representation mappings:
Forward representation mappings (facts-representation)
Backward representation mappings (representation-facts)
Mappings between Facts &
Representations
An example using mathematical logic as the
representational formalism:
– Spot is a dog: dog(Spot)
– Every dog has a tail: ∀x: dog(x) → hastail(x)
Use the deductive mechanisms of logic:
hastail(Spot) : Spot has a tail
Mappings between Facts &
Representations
The available mapping functions are not one-
to-one
They are not even functions but rather many-
to-many relations
Each object in the domain may map to several
elements in the range
Several elements in the domain may map to
the same element in the range
Mappings between Facts &
Representations
“All dogs have tails” & “Every dog has a tail”
Both represent the same fact (every dog has at least one tail)
But
– Former: every dog has at least one tail/each dog has
several tails
– Latter: every dog has at least one tail/there is a tail that
every dog has
When we try to convert English sentences into some other
representation (such as logical propositions) , we must first
decide what facts the sentence represent & then convert those
facts into the new representation
Mappings between Facts &
Representations
What an AI program does is to manipulate the
internal representation of the facts it is given
This manipulation should result in new
structures than can also be interpreted as the
internal representations of facts
More precisely, these structures should be the
internal representations of facts that
correspond to the answer to the problem
described by the starting set of facts
Representation of Facts: Expanded view
Initial Desired real reasoning Final
facts facts
Forward Backward
* representation representation *
mapping mapping
Internal Internal
representation Operation of representation
of initial facts program of final facts
instance instance
team
Chicago Three-Finger- Pee-Wee- team Brooklyn-
-Cubs Brown Reese Dodgers
Baseball Player: Frame
Baseball-player
isa: Adult-Male
Viewing a Node as a Frame
bats: (EQUAL handed)
height: 6-1
batting-average: .252
-All of the objects & most of the attributes to correspond to the
baseball domain.
Two Exceptions:
-attribute isa show class inclusion
-attribute instance show class membership
-these attributes provide the basis for property inheritance as an
inference technique
Algorithm: Property Inheritance
To retrieve a value V for attribute A of an instance object O:
1. Find O in the knowledge base
2. If there is a value there for the attribute A, report that
value
3. Otherwise, see if there is a value for the attribute
instance. If not, then fail
4. Otherwise move to the node corresponding to that value
& look for a value for the attribute A. if one found,
report it
5. Otherwise, do until there is no value for the isa attribute
or until an answer found:
a) Get the value of the isa attribute & move to that node
b) See if there is a value for the attribute A. if there is,
report it
Example
• Team (Pee-Wee-Reese)=Brooklyn-Dodgers. The
attribute had a value stored explicitly in the knowledge
base
• batting-average (Three-Finger-Brown)=.106. Since
there is no value for batting average stored explicitly
for Three-Finger-Brown, we follow the instance
attribute to Pitcher & extract the value stored there.
• height (Pee-Wee-Reese) = 6-1.
This represent another default inference.
Note: we get to it first, the more specific fact about the
height of baseball players overrides a more general fact
about the height of adult males
Example
• bats (Three-Finger-Brown)=Right.
To get a value for the attribute bats required going up the isa
hierarchy to the class Baseball-Player.
But what we found there was not a value but a rule for
computing a value
This rule required another value (that for handed) as input
So the entire process must be begun again recursively to find a
value handed
This time, it is necessary to go all the way up to Person to
discover that the default value for handedness for people is
Right.
Now the rule for bats can be applied, producing the result
Right, that turns out to be wrong, since Brown is a switch
hitter (he can hit both left-and-right-handed )
Approaches to Knowledge
Representation
Inferential knowledge
– Facts represented in a logical form (e.g. First-Order
Logic: FOL), which facilitates reasoning.
– This knowledge is useless unless there is also an
inference procedure that can exploit it
– The required inference procedure now is one that
implements the standard logical rules of inference
– There are many such procedures, some of which
reason forward from given facts to conclusions, others
of which reason backward from desired conclusions to
given facts.
– Resolution most commonly used
Approaches to Knowledge
Representation
Procedural knowledge
– Representation of “how to make it” rather than “what it is”
– Procedural knowledge can be represented in programs in
many ways:
• Code in some programming language, such as Lisp
→May have inferential efficiency, no inferential
adequacy (difficult to write a program that can reason
about another program‟s behaviour), acquisitional
efficiency (b/c of the process of updating and
debugging large pieces of code)
The Frame Problem
How to represent efficiently sequences of problem states
that arise from a search process
For complex ill-structured problems, this can be a
serious matter
Consider the world of a household robot.
There are many objects & relationships in the world, & a
state description must somehow included facts
On(Plant, Table), under(Table, Window), and in(Table, Room)
-one strategy is to store each state description as a list of such
facts
The Frame Problem
But what happens during the problem solving process if
each of those descriptions is very long?
Most of the facts will not change from one state to another,
yet each fact will be represented once at every node & will
quickly run out of memory
Furthermore, spend the majority of time creating these
nodes & copying these facts-most of which do not change
often-from one node to another.
Spend a lot of time recording above(Ceiling,Floor) at every
node
-All of these is, of course, in addition to the real problem figuring
out which facts should be different at each node
The Frame Problem
This whole problem of representing the facts that
change as well as that do not is known as the frame
problem.
In some domains, the only hard part is representing all
the facts
In other, though, figuring out which ones change is
nontrivial
Robot World: there might be a table with a plant on it
under the window. Suppose we move the table to the
center of the room. We must also infer that the plant is
now in the center of the room too but the window is not.
The Frame Problem
To support this kind of reasoning, some
systems make use of an explicit set of axioms
(Frame Axioms).
– describes all the things that do not change when a
particular operator is applied in state n to produce
state n+1 (the things that do change must be
mentioned as part of the operator itself)
color(x,y,s1) move(x,s1,s2) color(x,y,s2)
The Frame Problem
Simply start with a description of initial state and then making changes to
that description as indicated by the rules applied.
But when back tracking how to know what change to problem statement
need to undone.
Two solution:
– Do not modify the initial state description at all. At each node, store an
indication of the specific changes that should be made at this node.
Whenever it is necessary to refer to the description of the current
problem state, look at the initial state description and also look back
through all the nodes on the path from the start state to the current state.
– Modify the initial state description as appropriate, nut also record at
each node an indication of what to do undo the move it ever be
necessary to back track through the ode. Then whenever it is necessary
to back track, check each node along the way and perform the indicated
operation on the state description.
The END