The document discusses various methods for representing knowledge, including:
- Using categories, objects, and properties to represent knowledge about the world in first-order logic
- Representing actions, events, and how objects and properties change over time using the situation calculus
- Addressing challenges like the frame and qualification problems by developing successor state axioms that characterize how fluents change with actions
2. 2
KR
โข previous chapters: syntax, semantics,
and proof theory of propositional and
first-order logic
โข Chapter 10: what content to put into
an agentโs KB
โข How to represent knowledge of the
world
3. 3
Natural Kinds
โข Some categories have strict definitions
(triangles, squares, etc)
โข Natural kinds donโt
โข Define a cup (distinguishing it from bowls,
mugs, glasses, etc)
โข Bachelor: is the Pope a bachelor?
โข But logical treatment can be useful (can
extend with typicality, uncertainty,
fuzziness)
4. 4
Upper Ontologies
โข An ontology is similar to a dictionary
but with greater detail and structure
โข Ontology: concepts, relations, axioms
that formalize a field of interest
โข Upper ontology: only concepts that
are meta, generic, abstract; cover a
broad range of domain areas
5. 5
Anything
AbstractObjects GeneralizedEvents
Sets Numbers RepresentationalObjects Interval Places PhysicalObjects Processes
Categories Sentences Measurements Moments things stuff
times weights animals agents solid liquid gas
Lower concepts are specializations of their parents
6. 6
Categories and Objects
โข I want to marry a Swedish woman
โ Category of Swedish woman?
โ A particular woman who is Swedish?
โข Choices for representing categories:
predicates or reified objects
โข basketball(b) vs
member(b,basketballs)
โข Letโs go with the reified versionโฆ
7. 7
Facts about categories and
objects in FOL
โข An object is a member of a category
โข A category is a subclass of another
category
โข All members of a category have some
properties
โข Members of a category can be recognized
by some properties
โข A category as a whole has some properties
Necessary versus sufficient properties?
Note: simplification of real categories
8. 8
Other Relationships
โข disjoint (no members in common)
โข exhaustive decomposition of a
category (all members are in at least
one of the sets)
โข Partition: disjoint, exhaustive
decomposition
9. 9
Composite Objects
โข partof(england,europe)
โข All X,Y,Z partof(X,Y) ^ partof(Y,Z) ๏
partof(X,Z)
โข Heavy(bunchOf({apple1,apple2,apple3}))
โข Before continuing: inspiration for
creative reification!
โข From Through the Looking Glass
10. 10
Measures
โข Diameter(basketball12) = inches(9.5)
โข All XY member(X,dimestore) ^ sells(X,Y) ๏
cost(Y) = $(1)
โข member(db1,dollarbills)
โข member(db2,dollarbills)
โข denomination(db1) = $(1)
โข denomination(db2) = $(1)
There are multiple dollar bills, but a single
$(1)
11. 11
Ordinal Comparisons
โข But often scales are not so precisely
defined
โข Often, ordinal comparisons among members
of categories are useful
โข member(p1,poems) ^ member(p2,poems) ^
beauty(p1) < beauty(p2)
We donโt have to say p1 has beauty 54.321
Qualitative physics: reasoning about physical
systems without detailed equations and
numerical simulations.
12. 12
Stuff versus Things
โข Suppose some ice cream and a cat in
front of you. There is one cat, but no
obvious number of ice-cream things in
front of you.
โข A piece of an ice-cream thing is an
ice-cream thing (until you get down to
very low level)
โข A piece of a cat is not a cat
13. 13
Stuff versus Things
โข Linguistically distinguished, in English
through mass versus count noun phrases
โข โa catโ
โข โan ice-creamโ (you have to coerce this to a
thing, such as an ice-cream bar, or a
variety of ice cream)
โข โa sandโ, โan energyโ
โข โsome catโ (you have to coerce this to a
substance; eeewww)
14. 14
Actions, Situations, and Events
The Situation Calculus
โข The robot is in the kitchen.
โ in(robot,kitchen)
โข It walks into the living room.
โ in(robot,livingRoom)
โข Oopsโฆ
โข in(robot,kitchen,2:02pm)
โข in(robot,livingRoom,2:17pm)
โข But what if you are not sure when it was?
โข We can do something simpler than rely on
time stampsโฆ
15. 15
Situation Calculus Ontology
โข Actions: terms, such as โforwardโ
and โturn(right))โ
โข Situations: terms; initial situation s0
and all situations that are generating
by applying an action to a situation.
result(a,s) names the situation
resulting when action a is done in
situation s.
16. 16
Situation Calculus Ontology
continued
โข Fluents: functions and predicates that
vary from one situation to the next. By
convention, the situation is the last
argument of the fluent.
~holding(robot,gold,s0)
โข Atemporal or eternal predicates and
functions do not change from situation to
situation. gold(g1).
lastName(wumpus,smith).
adjacent(livingRoom,kitchen).
17. 17
Sequences of Actions
โข Also useful to reason about action
sequences
โข All S resultSeq([],S) = S
โข All A,Se,S resultSeq([A|Se],S) =
resultSeq(Se,result(A,S))
resultSeq([a,b,a2,a3],so) is
result(a3,result(a2,result(b,result(a,s0)
18. 18
Modified Wumpus World
โข Fluent predicates: at(O,X,S) and
holding(O,S)
โข Initial situation: at(agent,[1,1],s0) ^
at(g1,[1,2],s0)
โข But we want to exclude possibilities
from the initial situation tooโฆ
19. 19
Initial KB
โข All O,X at(O,X,s0) ๏๏ [O=agent ^
X = [1,1]) v (O=g1 ^ X = [1,2])]
โข All O ~holding(O,s0)
โข Eternals:
โ gold(g1) ^ adjacent([1,1],[1,2]) ^
adjacent([1,2],[1,1]).
20. 20
Goal: g1 is in [1,1]
At(g1,[1,1],resultSeq(
[go([1,1],[1,2]),grab(g1),go([1,2],[1,1])],
s0)
Or, planning by answering the query:
Exists S at(g1,[1,1],resultSeq(S,s0))
So, what has to go in the KB for such queries to
be answered?...
21. 21
Possibility and Effect Axioms
โข Possibility axioms:
โ Preconditions ๏ poss(A,S)
โข Effect axioms:
โ poss(A,S) ๏ changes that result from
that action
22. 22
Axioms for our Wumpus World
โข For brevity: we will omit universal
quantifies that range over entire
sentence. S ranges over situations, A
ranges over actions, O over objects
(including agents), G over gold, and
X,Y,Z over locations.
23. 23
Possibility Axioms
โข The possibility axioms that an agent
can
โ go between adjacent locations,
โ grab a piece of gold in the current
location, and
โ release gold it is holding
24. 24
Effect Axioms
โข If an action is possible, then certain
fluents will hold in the situation that
results from executing the action
โ Going from X to Y results in being at Y
โ Grabbing the gold results in holding the
gold
โ Releasing the gold results in not holding
it
25. 25
Frame Problem
โข We run into the frame problem
โข Effect axioms say what changes, but
donโt say what stays the same
โข A real problem, because (in a non-toy
domain), each action affects only a
tiny fraction of all fluents
26. 26
Frame
โข A data structure
โข Knowledge about an object or concept
โข Natural way for concise
representation of knowledge
โข Organizes knowledge into a set of
slots
27. 27
Frame Problem (continued)
โข One solution approach is writing explicit
frame axioms, such as:
At(O,X,S) ^ ~(O=agent) ^ ~holding(O,S) ๏
at(O,X,result(Go(Y,Z),S))
โข With F fluent predicates and A actions,
need O(AF) frame axioms
โข But if an action has at most E effects,
then need only O(AE).
28. 28
Representational Frame
Problem
โข What stays the same?
โข A actions, F fluents, and E
effects/action (worst case).
Typically, E << F
โข Want O(AE) versus O(AF) solution
29. 29
Solving the Representational
Frame Problem
โข Instead of writing the effects of each
action, consider how each fluent predicate
evolves over time
โข Successor-state axioms:
โข Action is possible ๏
(fluent is true in result state ๏๏
actionโs effect made it true v
it was true before and action left it alone)
30. 30
Ramification Problem
โข Implicit effects, such as: if an agent
moves from X to Y, then any gold it is
carrying will move too
โข For our specific domain, we can solve
this by writing a more general
successor-state axiom for โatโ
31. 31
Initial KB (reminder)
โข All O,X at(O,S,s0) ๏๏ [O=agent ^
X = [1,1]) v (O=g1 ^ X = [1,2])]
โข All O ~holding(O,s0)
โข Eternals:
โ gold(g1) ^ adjacent([1,1],[1,2]) ^
adjacent([1,2],[1,1]).
33. 33
Inheritance
โข If a property is true of a class, it is true
of all subclasses of that class
โข If a property is true of a class, it is true
of all objects that are members of that
class
โข (If a property is true of a class, it is true
of all objects that are members of
subclasses of that class)
โข There are exceptions
34. 34
Semantic Networks
โข Graphical aids for visualizing the knowledge
base
โข Efficient algorithms for inferring
properties based on category membership
โข Often, correspond to a subset of first-
order logic
โข Many variants
โข All distinguish among individual objects,
categories of objects and relations among
objects
36. 36
Example
โข See previous slide
โข Specify what edges and nodes mean
โข In previous slide, indivs and categories look
the same
โข memberOf(indiv,category)
โข sisterOf(indiv,indiv)
โข subsetOf(category,category)
โข hasMother(indiv,indiv)
37. 37
Semantic Networks
โข How about
hasMother(persons,femalePersons)?
โข Nope: hasMother is a relation between
individuals
โข cat1-- label ๏ cat2 means:
โข all X X in cat1 ๏ [all Y label(X,Y) ๏ Y in
cat2]
(So, this does not say that each person has a
mother)
39. 39
Inheritance
โข Inheritance is efficient and
convenient
โข Trace paths from individuals to
categories, inheriting properties as
you go
โข In Example slide, how many legs does
John have? Most specific (nearest)
information wins
40. 40
Semantic Networks
โข In a semantic network, only binary
relations are possible
โข A richer representation is possible by
reifying propositions and events
โข This forces creation of a rich
ontology of reified concepts; many
current ideas originated in semantic
network systems