Title: Intelligent Systems 2II40 C5
1Intelligent Systems (2II40)C5
October 2005
2Categories and Objects
- Ontologies
- Organize objects into categories
- Organize categories into taxonomic hierarchies
(by sub-classing) - Imply inheritance for properties over subclasses
3IV.4.B. Categories terminology
- FOL category predicate or object
- Teacher(Cristea) vs. Member(Cristea,Teachers)
- Reification category as object
- Inheritance proprieties transmitted from class
to subclass (like in OO) - Subset(Teachers,Staff)
- Taxonomy class-subclass relation organization
- Partition disjoint exhaustive decomposition
- E.g., Animals into Males and Females
- Composite object objects being PartOf another
- FOL category predicate or object
- Teacher(Cristea) vs. Member(Cristea,Teachers)
- Reification category as object
- Inheritance proprieties transmitted from class
to subclass (like in OO) - Subset(Teachers,Staff)
- Taxonomy class-subclass relation organization
- Partition disjoint exhaustive decomposition
- E.g., Animals into Males and Females
- Composite object objects being PartOf another
4Relations for objects, categories
PartOf is a relation, like in UML. PartOf(Leg,
Body) This doesnt make sense for substances,
such as Butter, for instance. (PartOf(Butter,Butte
r) ?)
BunchOf is similar to the Bag relation in RDF. We
cannot use set here, because a set is a
different, abstract mathematical
concept. BunchOf(Apple1, Apple2, Apple3) (no
particular structure)
5Measurements for objects
- Measure function and units
- Diameter(basketball3)Inches(9.5)
- ListPrice(basketball3)(19)
- Measures are ordered!
- e1?Exercises ? e2 ?Exercises ? Wrote(Norvig, e1)
? Wrote(Russel, e2) ? Difficulty(e1) gt
Difficulty(e2)
6IV.4.B.Actions, Situations Events
7Actions, Situations, Events
- How do we represent situations, results of
actions, events? Representation of these is
essential for knowledge-based agents! - PL unsuitable (1 proposition at a time)
- Obvious way to solve this in FOL quantify over
time ?t t1 - Instead of dealing w time explicitly, deal w
situations, i.e. states resulting from executing
actions situational calculus
8Situational calculus - ontology
- Situations Actions
- in active databases event condition action (ECA)
rules e.g., actions Turn(Right) or Forward
situations S0 in Result(Forward, S0) - Fluents varying predicates/ functions
- e.g. ?Gray(Anna,S0) Gray(Anna,S50)
- Atemporal predicates/ functions
- e.g. Female(Anna)
9Reasoning about action sequences
- Result(,s) s
- Result(aseq,s) Result(seq,Result(a,s))
Projection Task Given a (sequence of) actions,
deduce its outcome
Result(seq,state) Planning Task
finding the sequence that gives the desired
effect (projection)
10IV.4.C. Mental Events and Mental Objects
11Mental events objects - ontology
- Knowledge vs. Belief, e.g.,
- Knows(agent, BlueCoatPoliceman)
- KnowsWhether(agent, not(BlueCoatPoliceman))
- KnowsWhat(agent,Job(BlueCoat),String)
- Believes(agent, KnowsWhat(Policeman,
WayTo(Bucharest), ListStrings))
12Referential opaqueness for beliefs
- Referential transparency
- substitute freely a term for an equal term
- Referential opaqueness
- not possible (without changing meaning)
- Why do we need it?
13Example need of referential opaqueness
- (SupermanClark)
- (Believes(Lois, Flies(Superman)) ? Believes(Lois,
Flies(Clark)) - Which is false, so FOL is inadequate answers
- Syntactic theory
- mental objects strings
- Modal logic FOLmodal operators
- B (belief), K (knowledge) modal context
14IV.4.D. Internet Shopping World
15Internet shopping
- The query
- RelevantOffer(page,url,query) ?
Relevant(page,url,query) ? Offer(page) - Prerequisite knowledge
- Amazon ? OnlineStores ? Homepage(Amazon,
amazon.com) - Taxonomy of product categories
- Books ? Products
- MusicRecordings ? Products
- Result
- ?lc, offer lc ? LaptopComputers ? offer
?ProductOffers ? ScreenSize(lc,Inches(14))
OfferedProduct(offer,lc) ?Store(offer,GenStore)
?Price(offer,(449)) ?Date(offer,Today)
16IV.4.E. Reasoning System for categories
17IV.4.E. Reasoning System for categories
- Semantic networks
- graphical aid to visualize KB
- alg. to infer object prop.
- Description logics
- formal lang. to constructcombine category defs
- alg. to decide sub/superset rel. of categories
18Semantic networks
- Represent
- Objects
- Categories of objects
- Relationships between objects
- Objective like FOL
- to say (easily) things about objects
19Simple Semantic Net Example
Mammals
Persons
Female Persons
Male Persons
Mary
John
20Discussion Semantic Nets
- Semantic Nets concept maps, mind maps
- better resolution formalism
- Reification of links needed
- ?p,s HasSister(p,s) ? SisterOf(s,p)
- SN indexed by objects, categories
- FOL indexed by first argument of predicate
21Pros Cons Semantic nets
- Drawbacks
- only binary relations
- FOL but No negation, disjunction, nested
functions, existential quantification - Advantages
- Visual aid, easy queries
- Default values allowed to be overridden
22Description Logics
- Objective unlike FOL to describe definitions and
properties of categories, e.g. - Subsumption (category is subset of other?)
- Classification (object belongs to category?)
- /- Consistency (membership criteria
logically satisfiable?) - Allows logical operations on predicates
- And(,,) All()AtLeast()AtMost()
23RDF, XML
- Resource Description Framework (RDF) recommended
by the World Wide Web Consortium (W3C), to model
meta-data about the resources of the web. - RDF can be written in XML
- The eXtended Markup Language (XML) is accepted as
THE emerging standard for data interchange on the
Web. - XML allows authors to create their own markup
(e.g. ltAUTHORgt), which seems to carry some
semantics. However, from a computational
perspective tags like ltAUTHORgt carries as much
semantics as a tag like ltH1gt - What is needed??
24DAMLOIL
- The DARPA Agent Markup Language (DAML) (start
August 2000) language tools to facilitate the
concept of the Semantic Web. - Example DAML beer ontology in RDF
- The Ontology Inference Layer OIL is a proposal
for a web-based representation inference layer
for ontologies, combining - modelling primitives from frame-based languages
- with the formal semantics and reasoning services
provided by description logics.
25The ontology spectrum
Strong semantic
Modal Logic First Order Logic
Is
disjoint subclass w. transitivity
property
Local Domain Theory
Description Logic DAMLOIL,OWL UML
Conceptual Model
Is subclass of
RDF/S XTM Extended ER
Thesaurus
Has narrower meaning than
ER
Schema
Taxonomy
Is subclassification of
Relational Model
Weak semantic
26Conclusion Knowledge Reasoning
- 322-283 BC Aristotle comprehensive taxonomies,
emphasizing classification categorization - Still hot topic
- IEEE Standard Upper Ontology Working Group
- 2004-02-10 The OWL Web Ontology Language W3C
Candidate Recommendation endorsed - Example OWL airport ontology in RDF
- RDF, XML
- Semantic Web (Tim Berners-Lee 2001)
- DARPA Agent Markup Language (DAML)
- Ontology Inference Layer OIL
- However e.g., Ted Nelson is against this
(hierarchical) movement!
27Homework 5 - part 1
- Read the memory refreshing presentations on PL
and FOL (last course). What are the major
differences between these basic logics? - Find ontologies for some subject that interests
you give a small sample of the upper, as well
as the lower ontology (graphically or
hierarchically). - Find other examples of ontological languages
besides OIL and DAMLOIL, OWL. Give at least 2
examples based on FOL, and 2 on XML. - Who is Ted Nelson?
28Homework 5 part 2
- 5. Step 8,9 of the project
- STEP 8 Integration of software. Integrate
software, check it out. - STEP 9 Make an appointment for the interim
presentation. Dates will be announced on the
course site. You only need to demo your system
and talk about any aspects you want. No
powerpoint presentation. Time per group (1min
setup, 10-15min presentation, 4-9 min QA). These
presentations will not be public. Choose the
presentation date time according to the stage
of your project. The location will be announced
on the course site.
29Outline
- Introduction IS
- Intelligent agents
- Search
- Knowledge and reasoning
- Planning
- Uncertainty
- Learning
- Hybrid systems
30V. Planning
31V. Planning
- V.1. Planning generalities
- V.1.A. Search vs. Planning
- V.1.B. STRIPS operators
- V.2.C. Partial Order Planning
- V.2. Planning in the real world
- V.2.A. Conditional Planning
- V.2.B. Monitoring and Replanning
- V.2.C. Continuous Planning
- V.2.D. Multi-agent planning
32V.1. Planning generalities
- V.1.A. Search vs. Planning
- V.1.B. STRIPS operators
- V.2.C. Partial Order Planning
33V.1.A. Search vs. Planning
34Search vs. Planning Ex.
- Task get milk, bananas, and a cordless drill
- Standard search
35Problem decomposition
- Deliver n packages
- O(n!) worst case
- O((n/k)!k) if pb decomposable in k equal parts
- most problems partially decomposable
36V.1.B. STRIPS operators
37STRIPS (71)
- Restricted language ? efficient algorithm
- Represents states, goals and actions
- State literals ground and function-free
- not allowed At(x,y) At(Father(Fred),Sydney)
- Goal partially specified state conjunction of
positive ground literals - e.g., Rich ? Famous ? At(P2,Tahiti)
- Action precondition effect
- Precondition conjunction of positive literals
- Effect conjunction of literals
- e.g.,
- ACTION Buy(x)
- PRECONDITION At(p), Sells(p,x)
- EFFECT Have(x)
- Close world assumption!
- However many details omitted
38V.2.C. Partial Order Planning (POP)
39POP
- Least commitment strategy
- Obvious, important decisions first
- POP partially ordered collection of steps, w.
- Start step (initial state effect)
- Finish step (goal description precondition)
- Causal links (outcome one step precond. other)
- Temporal ordering
- Open condition precondition of a step not yet
causally linked - Precondition achieved
- it is effect of earlier step AND
- no (possibly intervening) step undoes it
- Plan complete every precondition achieved/ closed
40Planning process
- Operators on partial plans
- Add a link from existing action to open condition
- Add a step to fulfill open condition
- Order one step (w. rsp. to another to remove
possible conflicts) - Incomplete/ vague plans ??
- ? complete, correct plans
- ( backtrack if open condition unachievable or
conflict unsolvable)
41POP algorithm
42POP alg. cont.
43Clobbering
- Clobbering is a step that potentially destroys
the condition achieved by a causal link. - E.g., Go(Home) clobbers At(Supermarket)
- Solution promotion or demotion
44Clobbering promotion/ demotion
- Demotion put before
- Go(Supermarket)
- Promotion put after
- Buy(Milk)
45Example POP
46Example POP
47Example POP
48POP proprieties
- sound, complete systematic (no repetitions)
- Nondeterministic backtracks at choice point of
failure - Choice Sadd to achieve Sneed
- Choice demotion/ promotion clobberer
- Extensions disjunction, universals, negation,
conditionals - Efficient w. good heuristic what for?
- Good for pbs. w. loosely related sub-goals
49Ex. blocks world
50Ex. blocks world - cont.
- ACTION PutOn(x,y)
- PRECONDITION Clear(x), On(x,z), Clear(y)
- EFFECT On(x,y),Clear(y),On(x,z), Clear(z)
- ACTION PutOnTable(x)
- PRECONDITION Clear(x), On(x,z)
- EFFECT On(x,Table), On(x,z), Clear(z)
51Ex. blocks world - cont.
52Ex. blocks world - cont.
53Ex. blocks world - cont.
54Ex. blocks world - cont.
55Homework 5 part 3
- 6. The monkey-and-bananas problem is faced by a
monkey in a lab with some bananas hanging out of
reach from the ceiling. - A box is available that will enable the monkey to
reach the bananas if he climbs on it. - Initially, the monkey is at A, the bananas at B,
and the box at C. The monkey and box have the
same height Low, but if the monkey climbs on the
box it will have height High, the same as the
bananas. - The actions available for the monkey include Go
from one place to another, Push an object from
one place to another, ClimbUp onto or ClimbDown
from an object, and Grasp or UnGrasp an object.
Grasping results in holding the object if the
monkey and object are in the same place at the
same height. - Write down the initial state description.
- Write down STRIPS-style definitions of the six
actions. - Suppose the monkey wants to fool the scientists,
who are off to tea, by grabbing the bananas, but
leaving the box in its original place. Write this
as a general goal (i.e., not assuming that the
box is necessarily at C) in the language of
situation calculus. Can this goal be solved by a
STRIPS-style system? (Hint check also comments
on STRIPS slide and POP)
56Hierarchical task network planning (HTN)
- Generalization of POP
- Higher level actions, to be decomposed into lower
level actions - more expressive than STRIPS
- Idea problem reduction decompose tasks into
subtasks, handle constraints, resolve
interactions if necessary, backtrack try other
decompositions - More info
- HTNpaper.pdf
- a presentation on HTN 2003-9-18-htn.ppt
57V.2. Planning in the real world
58Time, schedules, resources
- Critical Path Method (CPM)
- Path a linearly ordered sequence of actions
beginning w. Start and ending w. Finish. - Critical path path with longest duration.
- ES(action) earliest possible start time of
action - LS(action) latest possible start time of action
- Slack LS-ES
59Computing CPM
- ES(start) 0
- ES(B) maxAltB ES(A) Duration(A)
- LS(Finish) ES(Finish)
- LS(A) minAltB LS(B) - Duration(A)
- Time complexity O(Nb),
- Where
- N- number of actions,
- b- max branching factor into or out of an action
60V.2. Planning in the real world
- V.2.A. Conditional Planning
- V.2.B. Monitoring and Replanning
- V.2.C. Continuous Planning
- V.2.D. Multi-agent planning