Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge...

21
Ontology Applying logic to the real world

description

D Goforth - COSC 4117, fall Ontology: structure of knowledge  E.g. java programming ontology – object-oriented design: class/object inheritance and interfaces part-of hierarchy API message-passing sequential execution, threads

Transcript of Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge...

Page 1: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

OntologyApplying logic to the real world

Page 2: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 2

Real world knowledge

general knowledge /common sense reasoning

domain expertise /specific knowlege

problem /facts

example: understand a news reportlanguage and world knowledge; specific situation and terminology interpret story

Page 3: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 3

Ontology: structure of knowledge E.g. java programming ontology –

object-oriented design: class/object inheritance and interfaces part-of hierarchy API message-passing sequential execution, threads

Page 4: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 4

Ontology: structure of knowledge general knowledge: what top-level

structure? Anything

(like class Object)

AbstractObject(eternal)

GeneralizedEvent(time-limited existence)

Page 5: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 5

Upper Ontology

Page 6: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

General knowledge

Domain knowledge

Problem facts and questions

Ontology in Knowledge base

“Abstract objects”

“Generalized events”

Categories (ontology)

Logic (sentences)

Page 7: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 7

Representing Knowledge how ‘deep’?

shallow – as predicate: Terrier(x)

deep ‘reification’category with meaning structure: Terriers ⊆ Dogs,

Dogs ⊆ Mammals Member (x, Terriers)

Page 8: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 8

Categories like set theory – easy to reason with

in FOL subcategories / subsets categories of categories intersections, unions, disjoint sets,

partitions

Page 9: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 9

Reasoning about categories disjoint subcategories – no common

objects NO: x Students, x Employed YES:x Mazdas, x Mercedes

x Mazdas ⇒ ~(x Mercedes) x Mercedes ⇒ ~(x Mazdas)

Page 10: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 10

Reasoning about categories exhaustive decomposition – all

objects of a category belong to at least one of the subcategories Namedstreets Cityroutes Numberedroads Cityroutes x Cityroutes ⇒ (x Namedstreets)

(x Numberedroads)(could be both named and numbered)

Page 11: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 11

Reasoning about categories Partitioning a category

subcategories are disjoint subcategories form exhaustive decompositione.g.,Players are teammates or opponents:Players = Teammates OpponentsTeammates Opponents = {}

Page 12: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 12

Physical objects properties

things – a pile of sand measurable / quantities

vs stuff - sand

intrinsic qualities

PhysicalObjects

StuffThings

Page 13: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 13

Situation calculus in specific domain

(TimedEvents vs AbstractObjects) some objects are ‘fluent’

functions and properties can change over time (position, orientation, etc)

some objects are ‘eternal’ existence and properties remain fixed

during period of reasoning (more efficient)(recall wumpus world example)

Page 14: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 14

GeneralizedEvents – the time problem

objects in this hierarchy have time property physical objects events processes intervals

‘fluent’ (“fleeting”) vs ‘eternal’ abstract objects

Page 15: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 15

Situation calculusuniverse is defined as

sequence of ‘situations’ ‘actions’ are like

inferences: preconditions – required

facts in current situation effects – facts that are

true in subsequent situation if action is applied

situa

tion

S 3

precondition effectaction

situa

tion

S 2

situa

tion

S 1

situa

tion

S 0

Page 16: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 16

Situation calculus - example blocks world

tabletop and three blocks actions and situations

A BC

eternal Table(x) Block(x)

fluent On(x,y,s) ClearTop(x,s)

s is situation variable

objects/terms in FOL

Page 17: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 17

Situation calculus - example actions are functions (objects) situations are objects

A BC

PutOn(x,y) preconditions:

ClearTop(x,s) ClearTop(y,s) V

Table(y) effect:

On(x,y,Result(PutOn(x,y),s))

Page 18: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 18

Situation calculus - example each situation is a function of the

previous one – Result function

A BC

Result(a,s) preconditions:

action a can be applied at s effect:

Result is next situation after a is applied at s

Page 19: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 19

T

Situation calculus - example e.g. KB:

function PutOn(x,y) ∀x (~∃y On(y,x,s)) ⇒ ClearTop(x,s) ∀x,y,s ClearTop(x,s) ^

(ClearTop(y,s) v Table(y) => On(x,y,Result(PutOn(x,y),s))

constants: A, B, C, T, S0, S1, S2,… Table(T), Block(A), Block(B), Block(C) On(A,B,S0), On(B,C,S0), On(C,T,S0)

ABC

S0

Page 20: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 20

T

Situation calculus - example action: PutOn(A,T)

preconditions: ClearTop(A,S0),Table(T) effect: On(A,T,Result(PutOn(A,T),S0))

BUT…what happens to other fluents?

some propagated, some not ABC

S1

A

Page 21: Ontology Applying logic to the real world. D Goforth - COSC 4117, fall 20062 Real world knowledge general knowledge / common sense reasoning domain expertise.

D Goforth - COSC 4117, fall 2006 21

T

Situation calculus - example ‘On’ axiom: ∀x,y,z,a,s On(x,y,Result(a,s)) [ClearTop(x,s)^(ClearTop(y,s)vTable(y))^

a= PutOn(x,y)

v [ On(x,y,s)^~(a=PutOn(x,z))]

CS1

A

AB