Ontology Applying logic to the real world
D Goforth - COSC 4117, fall Real world knowledge general knowledge / common sense reasoning domain expertise / specific knowlege problem / facts example: understand a news report language and world knowledge; specific situation and terminology interpret story
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
D Goforth - COSC 4117, fall Ontology: structure of knowledge general knowledge: what top-level structure? Anything (like class Object) AbstractObject (eternal) GeneralizedEvent (time-limited existence)
D Goforth - COSC 4117, fall Upper Ontology
General knowledge Domain knowledge Problem facts and questions Ontology in Knowledge base “Abstract objects” “Generalized events” Categories (ontology) Logic (sentences)
D Goforth - COSC 4117, fall Representing Knowledge how ‘deep’? shallow – as predicate: Terrier(x) deep ‘reification’ category with meaning structure: Terriers ⊆ Dogs, Dogs ⊆ Mammals Member (x, Terriers)
D Goforth - COSC 4117, fall Categories like set theory – easy to reason with in FOL subcategories / subsets categories of categories intersections, unions, disjoint sets, partitions
D Goforth - COSC 4117, fall 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)
D Goforth - COSC 4117, fall 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)
D Goforth - COSC 4117, fall Reasoning about categories Partitioning a category subcategories are disjoint subcategories form exhaustive decomposition e.g., Players are teammates or opponents: Players = Teammates Opponents Teammates Opponents = {}
D Goforth - COSC 4117, fall Physical objects properties things – a pile of sand measurable / quantities vs stuff - sand intrinsic qualities PhysicalObjects StuffThings
D Goforth - COSC 4117, fall 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)
D Goforth - COSC 4117, fall GeneralizedEvents – the time problem objects in this hierarchy have time property physical objects events processes intervals ‘fluent’ (“fleeting”) vs ‘eternal’ abstract objects
D Goforth - COSC 4117, fall Situation calculus universe 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 situation S 3 preconditioneffect action situation S 2 situation S 1 situation S 0
D Goforth - COSC 4117, fall Situation calculus - example blocks world tabletop and three blocks actions and situations AB C eternal Table(x) Block(x) fluent On(x,y,s) ClearTop(x,s) s is situation variable objects/terms in FOL
D Goforth - COSC 4117, fall Situation calculus - example actions are functions (objects) situations are objects AB C PutOn(x,y) preconditions: ClearTop(x,s) ClearTop(y,s) V Table(y) effect: On(x,y,Result(PutOn(x,y),s))
D Goforth - COSC 4117, fall Situation calculus - example each situation is a function of the previous one – Result function AB C Result(a,s) preconditions: action a can be applied at s effect: Result is next situation after a is applied at s
D Goforth - COSC 4117, fall 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, S 0, S 1, S 2,… Table(T), Block(A), Block(B), Block(C) On(A,B,S 0 ), On(B,C,S 0 ), On(C,T,S 0 ) A B C S0S0
D Goforth - COSC 4117, fall T Situation calculus - example action: PutOn(A,T) preconditions: ClearTop(A,S 0 ),Table(T) effect: On(A,T,Result(PutOn(A,T),S 0 )) BUT… what happens to other fluents? some propagated, some not A B C S1S1 A
D Goforth - COSC 4117, fall 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))] C S1S1 A A B