Knowledge representation and reasoning (KR) is the field of artificial intelligence (AI) dedicated to representing information about the world in a form that a computer system can utilize to solve complex tasks such as diagnosing a medical condition or having a dialog in a natural language
3. Ontological Engineering
Ontologies are constructed using knowledge representation languages and logics. An ontology consists of a set of
concepts, axioms, and relationships that describe a domain of interest .
⢠Create more general and flexible representations.
⢠Concepts like actions, time, physical object and beliefs
⢠Define general framework of concepts
⢠Upper ontology
⢠Limitations of logic representation
Red, green and yellow tomatoes: exceptions and uncertainty
⢠Representing a general-purpose ontology is a difficult task called ontology engineering
⢠Existing GP ontologies have been created in different ways:
By team of trained ontologists
By importing concepts from database(s)
By extracting information from text documents
By inviting anybody to enter commonsense knowledge
⢠Ontological engineering has only been partially successful, and few large AI systems are based on GP
ontologies (use special purpose ontologies)
Complex domains such as shopping on the
Internet or driving a car in traffic require more
general and flexible representations
4. Each link indicates that the lower concept is a specialization of the upper one. Specializations are not
necessarily disjoint; a human is both an animal and an agent, for example.
Ontological Engineering
5. Categories - Representation
Categories and Objects
⢠Two choices for representation:
⢠Predicate
⢠Basketball(b)
⢠Object
⢠Basketballs
⢠Member(b, Basketballs)
⢠Subset(Basketballs, Balls)
Categories - Organizing
⢠Inheritance:
⢠All instances of the category Food are edible
â Fruit is a subclass of Food
â Apples is a subclass of Fruit
⢠Therefore, Apples are edible
⢠The Class/Subclass relationships among Food, Fruit and Apples is a
taxonomy
6. Categories and Objects
Categories - Partitioning
⢠Disjoint: The categories have no members in common
⢠Disjoint(s)â(â c1,c2 c1 â s ⧠c2 â s ⧠c1 â c2 â Intersection(c1,c2) ={})
⢠Example:
Disjoint({animals, vegetables})
⢠Exhaustive Decomposition: Every member of the category is included in at least
one of the subcategories
⢠E.D.(s,c) â (â i i â c â â c2 c2 â s ⧠i â c2)
⢠Example:
ExhaustiveDecomposition( {Americans, Canadian, Mexicans},
NorthAmericans).
⢠Partition: Disjoint exhaustive decomposition
⢠Partition(s,c) â Disjoint(s) ⧠E.D.(s,c)
⢠Example: Partition({Males,Females},Persons).
⢠Is ({Americans,Canadian, Mexicans},NorthAmericans)
a partition?
⢠No! There might be dual citizenships.
⢠Categories can be defined by providing necessary and
sufficient conditions for membership
⢠â x Bachelor(x) â Male(x) ⧠Adult(x) ⧠Unmarried(x)
Persons
Male
Persons
Lee
Subsetof
Memberof
7. Categories and Objects
Natural kinds
⢠Many categories have no clear-cut definitions (chair, bush, book).
⢠Tomatoes: sometimes green, red, yellow, black, mostly round.
⢠One solution: category Typical(Tomatoes)
⢠âx x â Typical(Tomatoes) â Red(x) ⧠Spherical(x)
⢠We can write down useful facts about categories without providing exact
definitions
Physical composition
⢠One object may be part of another:
⢠PartOf(Seoul,Southkoarea)
⢠PartOf(Southkorea,EastAsia)
⢠PartOf(EastAsia,Asia)
⢠The PartOf predicate is transitive (and reflexive),
so we can infer that PartOf(Seoul,Asia)
⢠More generally:
⢠â x PartOf(x,x)
⢠â x,y,z PartOf(x,y) ⧠PartOf(y,z) â PartOf(x,z)
⢠Often characterized by structural relations among parts.
⢠E.g. Biped(a) â
8. Categories and Objects
Measurements
⢠Objects have height, mass, cost, ....
Values that we assign to these are measures
⢠Combine Unit functions with a number:
⢠Length(L1) = Inches(1.5) = Centimeters(3.81).
⢠Conversion between units:
⢠â i Centimeters(2.54 x i)=Inches(i).
⢠Some measures have no scale:
Beauty, Difficulty, etc.
⢠Most important aspect of measures:
they are orderable.
⢠Don't care about the actual numbers.
(An apple can have deliciousness .9 or .1.)
⢠Measures can be used to describe objects as follows:
⢠Diameter(Basketball 12) = Inches(9.5) .
⢠ListPrice(Basketball 12) = $(19) .
⢠d â Days â Duration(d) = Hours(24) .
9. Events
⢠facts were treated as true independent of time
⢠Events: need to describe what is true, when something is happening
⢠For instance: Flying event
⢠E â Flying's
⢠Flyer(E, Shankar)
⢠Origin(E, SanFrancisco)
⢠Destination(E, Baltimore)
⢠We will consider two kinds of time intervals: moments and extended intervals. The distinction is
that only moments have zero duration:
Partition({Moments, ExtendedIntervals}, Intervals)
i â Moments â Duration(i) = Seconds(0) .
⢠The function Duration gives the difference between the end time
and the start time.
⢠Interval(i) â Duration(i) = (Time(End(i)) - Time(Begin(i))) .
⢠Time(Begin(AD1900)) = Seconds(0) .
⢠Time(Begin(AD2001)) = Seconds(3187324800) .
⢠Time(End(AD2001)) = Seconds(3218860800) .
⢠Duration(AD2001) = Seconds(31536000) .
10. Events
⢠Two intervals Meet if the end time of the first equals the star time of the second. The complete set of
interval relations logically below:
⢠Meet(i, j) â End(i) = Begin(j)
⢠Before(i, j) â End(i) < Begin(j)
⢠After(j, i) â Before(i, j)
⢠During(i, j) â Begin(j) < Begin(i) < End(i) < End(j)
⢠Overlap(i, j) â Begin(i) < Begin(j) < End(i) < End(j)
⢠Begins(i, j) â Begin(i) = Begin(j)
⢠Finishes(i, j) â End(i) = End(j)
⢠Equals(i, j) â Begin(i) = Begin(j) ⧠End(i) = End(j)
⢠Graphically
Predicates on time intervals.
11. ⢠Physical objects can be viewed as generalized events, in the sense
that a physical object is a chunk of spaceâtime.
⢠George Washington was president throughout 1790
⢠T (Equals (President(USA), George Washington), AD1790)
Events
A schematic view of the object President(USA) for the first 15 years
of its existence.
12. Mental events and objects
⢠So far, KB agents can have beliefs and deduce new beliefs
⢠What about knowledge about beliefs? What about
knowledge about the inference process?
⢠Requires a model of the mental objects in someoneâs head and the
processes that manipulate these objects.
⢠Relationships between agents and mental objects: believes,
knows, wants,
⢠Believes(Lois,Flies(Superman)) with Flies(Superman) being a
function . . . a candidate for a mental object (reification).
⢠Agent can now reason about the beliefs of agents.
⢠Modal logic solves some tricky issues with the interplay of
quantifiers and knowledge.
⢠particular someone who Bond knows is a spy
â x Kbond Spy(x) ,
⢠Bond just knows that there is at least one spy
⢠Kbondâ x Spy(x)
Alice asks âwhat is the square root of 1764â and Bob replies âI donât know.â If Alice
insists âthink harder,â Bob should realize that with some more thought, this question
can in fact be answered. On the other hand, if the question were âIs your mother
sitting down right now?â then Bob should realize that thinking harder is unlikely to
help. Knowledge about the knowledge of other agents is also important; Bob should
realize that his mother knows whether she is sitting or not, and that asking her
would be a way to find out.
13. Reasoning System for Categories
Semantic Networks
⢠Logic vs. semantic networks
⢠Many variations
⢠All represent individual objects, categories of objects and relationships
among objects.
⢠persons have two legsâthat is
⢠â x x â Persons â Legs(x, 2)
⢠Allows for inheritance reasoning
⢠Female persons inherit all properties from person.
⢠Cfr. OO programming.
⢠Inference of inverse links
⢠SisterOf vs. HasSister
Female
Persons
Mary
Mammals
Persons
Male
Persons
Lee
Subsetof
SubsetofSubsetof
Sisterof
Memberof Memberof
Legs
Legs
2
1
HasMother
14. Reasoning System for Categories
Description logics
⢠Are designed to describe definitions and properties about
categories
⢠A formalization of semantic networks
⢠Bachelor = And(Unmarried,Adult,Male)
⢠Principal inference task is
⢠Subsumption: checking if one category is the
subset of another by comparing their definitions
⢠Classification: checking whether an object belongs
to a category.
⢠Consistency: whether the category membership
criteria are logically satisfiable.
describe the set of men with at least three sons who are all
unemployed and married to doctors, and at most two daughters
who are all professors in physics or math departments
The syntax of CLASSIC descriptions