1 knowledge representation cs 171/cs 271. 2 how to represent reality? use an ontology (a formal...
TRANSCRIPT
1
Knowledge Representation
CS 171/CS 271
2
How to represent reality? Use an ontology (a formal
representation of reality) General/abstract domain Specific domains
Goal is to incorporate an ontology in a computer system such that the system seems to know the domain
3
Using Logic forKnowledge Representation Propositional and First-Order Logic
describe the technology for knowledge-based agents
What gets into these knowledge bases? Categories, objects, substances Agent actions, situations, events Beliefs Uncertain information Dynamic information
4
Categories Intelligent system -> a system that
seems to “reason” Human reasoning is based largely on
categories Presence of a certain object from perceptual
input Category membership inferred from
perceived properties Predictions can be made about that said
object
5
Categories Example:
You observe the presence of a certain something (perceptual input)
Green, mottled skin, large size, ovoid shape (perceived properties from perceptual input)
Conclusion: that something is a Watermelon Watermelon is a fruit Prediction? Watermelon is good for fruit
salad
6
Categories Example:
You observe the presence of a certain something (perceptual input)
Average height, brown skin, familiar hair, Dardar shape (perceived properties from perceptual input)
Conclusion: that something is Dardar Dardar is a friend Dardar is a good choice to ask food
from
7
Categories Test:
Is there a difference between property and category?
8
Categories Representing categories
As predicates: Singer( Madonna) As objects: Member( Madonna,
Singers ) or Madonna Singers
9
Categories Basketball(b) Member(b,Basketball)
b Basketball Subset(Basketballs, Balls)
Balls Basketballs
10
Categories A category being a set of its
members A complex object that has Member
and Subset relations defined to it
11
Categories To simplify the knowledge base,
inheritance may be used whenever applicable
Inheritance in objects involving categories Think of inheritance in object oriented
programing What examples of inheritance can
you think of?
12
Categories Related notions
Subclasses/subcategories ( ) Categories versus properties Categories of categories
13
Relationships between Categories Disjoint categories Exhaustive decomposition Partition
14
Relationships between Categories Disjoint categories
No members in common Exhaustive decomposition
If not a member of one, must be a member of the other
Partition A disjoint exhaustive decomposition
15
Relationships between Categories Disjoint categories
Disjoint( {Animals, Vegetables} ) Exhaustive decomposition
ExhaustiveDecomposition( {Faculty,Staff,Administrators}, UniversityPersonnel )
Partition Partition( {Males,Females}, Persons )
Look at the white board
16
Physical Composition Part-of relationship Composite objects
With structural properties (e.g., car as something with wheels and other things attached to it)
Transitive and Reflexive Look at the white board
17
Physical Composition “The apples in the bag weigh 2
pounds” Weight of 2 pounds ascribed to a set
of apples – is this the correct way? Set is an abstract mathematical concept
with elements , but not weight Concept of the BUNCH
18
Physical Composition BunchOf( {Apple1, Apple2,
Apple3} ) BunchOf(Apples) BunchOf(Apples) vs. Apples
19
Measurements Measures as objects Measure: a number with units Example
Length(L1) = Inches(1.5)
20
Measurements Diamater(Basketball) = Inches(9.5) LastPrice(Basketball) = $(19) d Days -> Duration(d) =
Hours(24)
21
Measurements Inches(0) vs. Centimeters(0) vs.
Seconds(0) Note differences in what they
represent
22
Measurements Measures are easy if they are
quantitative How about qualitative
measurements? Assign quantities to qualitative
concepts? Is this the correct/best way?
23
Measurements Quantifying non numerical measures
Unnecessary! Imagine imposing a numerical scale on
beauty An important aspect of measures is
not the particular numerical values but the fact that the measures can be ordered What does this mean?
24
Substances and Objects x Butter PartOf( y,x ) y
Butter This is true
x Dog PartOf( y,x ) y Dog Is this true?
25
Substances and Objects Slice butter in 2, you get 2 tangible
objects, both are butter Slice a dog in 2, what do you get? Illustrates 2 important concepts:
STUFF THING
26
Substances and Objects World not necessarily
individuated Not always divided into distinct
objects In the English language
Count nouns versus mass nouns
27
Actions In the context of an agent, we need
to represent actions and consequences
Need to also worry about percepts, time, changing situations, and many others
Situation calculus or event calculus
28
Situation Calculus Situations Fluents Eternal Predicates
29
Situation Calculus Situations
Logical terms consisting of the initial situation S0 and all situations generated by applying an action to a situation
Objects/terms that stand for the states between actions carried out (initial situation and generated situations after an action)
Result( a, s ) names the resulting state when action a is executed in situation s
30
Situation Calculus Fluents
Predicates/functions that vary across situations
Holding(G1, S0 ) Age( Dardar, S3 )
31
Actions in Situation Calculus Possibility Axiom
It is possible to execute an action Effect Axiom
What happens when a possible action is executed
32
Actions in Situation Calculus Possibility Axiom
preconditions Poss( action, situation ) Example:
“can move to a square if it is adjacent” “can feed Dardar if Dardar is hungry”
Effect Axiom Poss( action, situation ) changes Example:
“moving updates agent position”“Feeding Dardar makes Dardar not hungry”
33
Frame Problem In the real world, most things stay the
same from one situation to the next Change occurs for a tiny fraction of the
fluents Note: effect action would often only note
those changes Frame problem: problem of representing
those that stay the same Efficiency/compactness issue Representational versus Inferential
34
Inadequacy of Situation Calculus
Situation Calculus works well with Single agent involved Actions are discrete
What if: Not dealing with a single agent Actions have duretion and may
overlap across situations
35
Event Calculus Based on points in time instead of
situations Time as objects Fluents hold at points in time Reasoning can be made over time
intervals (more humanlike!) More next week
36
Other Challenges Beliefs Uncertain Information Dynamic Information