Title: Knowledge Engineering for Automated Planning
1Knowledge Engineering for Automated Planning
- Lee McCluskey
- With acknowledgement to
- Ron Simpson
2 Abstract
- Algorithms for automated planning have become
significantly more powerful in recent years, but
the industrial take up of the technology has been
slow. One reason for this has been the difficulty
of modelling problem areas with sufficient rigour
to allow for their automated solution. - The tutorial will provide attendees with
- an insight into the range of potential
applications of the technology - an idea of the level of difficulty in deploying
the technology - Information on where to find out more and how to
obtain free software
3 Abstract
- The tutorial will cover
- a brief introduction to automated planning from
an AI perspective (AI Planning) - a review of the scope and power of the currently
available automated planning systems. - the languages used for domain problem
specification and the associated knowledge
engineering issues. - the development of example domain models using
dedicated knowledge engineering tools in GIPO. - practical demonstrations!
4Introduction
5Introduction Resources
- Mainly because of PLANET (EC F5 NoE in Planning)
there are heaps of resources to back up this
tutorial - Applications of AI Planning website
- http//vitalstatistix.nicve.salford.ac.uk/planet2
/ - Free Planners, Schedulers and Domain Models
- http//scom.hud.ac.uk/planet/repository/
- General PLANET website containing Summer School
Notes on many aspects of AI Planning, and
Planning Curriculum - http//www.planet-noe.org/
6Introduction Resources
- Free downloadable software GIPO - to engineer
planning domain models - http//scom.hud.ac.uk/planform/gipo/
- KE for Planning ROADMAP
- http//scom.hud.ac.uk/planet/home/
- The notes will be on my website
- http//scom.hud.ac.uk/scomtlm
7Introduction What is AI Planning?
- The scope of AI Planning is the synthesis
(generation) and execution of PLANS. That is, AI
Planners reason with actions and generate plans. - Scheduling is the allocation of resources to
plans of action taking into account various
constraints generally considered an easier
subpart of the Planning process - Planning is considered more of a knowledge-based
pursuit than scheduling
8Introduction MAIN ASSUMPTION
- The MAIN ASSUMPTION of virtually all work in AI
Planning is that there should be a logical
separation between - The Planning Engine
- The Domain Model
Planning System
Planning Engine
APPLICATION DOMAIN
Domain Model
9Introduction
- Implications of assumption
- It tends to made AI Planning a different subject
to eg planning and scheduling in manufacturing - planning engines AND domain models can be
developed, tested, debugged, validated
independently - the model of the particular
application of planning is developed in relative
isolation to the planning engine - domain models may be useful for more purposes
that simply automated planning functions
10Introduction
- Negative consequences of assumption ..
- Domain model representation is influenced by
what planners an handle - Consequent inefficiency in planning systems -
akin to compilation rather than hand coding
in software - Much research work has been carried out in
developing planning engines, pushed along by the
International Planning Competition (AIPS98,
AIPS00, AIPS02, ICAPS04) BUT methods and tools
to help develop the domain models have had
relatively little attention
11Introduction Applications of AI Planning
- See web site http//vitalstatistix.nicve.salford.a
c.uk/planet2/ - Aerospace e.g.
- Autonomous control of spacecraft - the NASA
Remote Agent experiment - Vicar planner applied to automated image
processing - Satellite mission planning and scheduling
(European Meteostat) - Planning and Scheduling of Spacecraft Assembly
12Introduction Applications of AI Planning
- Military e.g.
- Planning for military air campaigns
- DARPA/Rome Planning Initiative - A military
scheduling project
13Introduction Applications of AI Planning
- See web site
- http//vitalstatistix.nicve.salford.ac.uk/planet2/
- Industrial / Government / Control e.g.
- Planning in a forest fire simulation system -
- .. disaster recovery in general
- Brewery production-line scheduling
- Generation of control programmes for industrial
plant - Oil Spill Response Planning
- Ship Building using shipyard scheduling
optimisation systems - Aircraft crew scheduling
- Chemical Plant control
14Introduction Applications of AI Planning
- Other Current and Future Application areas
- Other areas in Control
- Workflow/Workforce
- Air Traffic
- Project planning
- Transport Logistics
- Web Agents,
- Games Software
- Physical Robots, Autonomous Vehicles
15Basic Concepts in AI Planning
16Basic Concepts in AI Planning
- Basic concepts in AI Planning are
- Operators, Objects, States, Goals, Planning
Problem, Plans - To illustrate them we will use a famous benchmark
domain the change tyre world
17Basic Concepts in AI Planning
- A state represents a world or snapshot within the
domain. Objects have States the conjunction of
all objects states make up a world state - wrench_in(wrench1,boot)
- wheel_in(wheel1,boot),pumped_up(wheel1)
- wheel_on(wheel2,hub1),flat(wheel2)
- pump_in(pump1,boot)
- tight(nuts1,hub0)
- have_jack(jack1)
- on_ground(hub1),fastened(hub1)
- closed(boot)
18Basic Concepts in AI Planning
- An operator represents an action within the
application. Operators change state. - operator(putaway_wheel(C,W),
- prevail
- se(container,C,open(C)),
- necessary
- sc(wheel,W,have_wheel(W)gtwheel_in(W,
C)), - conditional
- )
- A Domain model consists of a set of operators
-
19Basic Concepts in AI Planning
- Goals are conditions on states
- wheel_on(wheel1,hub1)
20Basic Concepts in AI Planning
- A Planning Problem is a triplet
- (Initial World State, Goal, Domain Model)
- Plans are collections of (instantiated, ordered)
operators that solve planning problems
21Basic Concepts in AI Planning
- Other concepts in AI Planning are
- Tasks, Events, Resources, Time
- - Tasks are compound actions to be executed (eg
make a cup of tea) - Events change the states of objects but happen
exactly when their pre-conditions are true - Resources are quantities used up by actions -
usually represented by numeric variables
22Basic Concepts in AI Planning
- How do AI planners generate plans?
- well there are MANY techniques ..
- Genarally they SEARCH through some representation
of the planning problem!
23Current State of AI Planning
24Current State of AI Planning
- Research in AI planning has produced very good
results in the last 10 15 years largely due
to - The International Planning Competition
- Acceptance of a standard communication language
called PDDL for domain models and domain problems - More industrial involvement NASA US military
25OLD State of AI Planning
- In the 80s / early 90s.. Most planners could
solve simple problems with domain models
consisting of - Actions modelled as instantaneous, deterministic
operators with infinite resources. - Actions pre-conditions and effects were
propositions - States set of propositions under the CWA
- Goal set of propositions.
- Metrics for planners
- time to solve problem ie generate plan
- size (no of operators) in sequential plan
26Current State of AI Planning
- Now Planners can solve more complex problems
with domain models consisting of .. - Durative operators time is explicit
- Resources
- Non-deterministic operators
- Operators with complex/conditional effects
- Partially observed states
- More metrics considered e.g. makespan and
multi-objective achievement - MOST IMPORTANT they are downloadable!
27Current State of AI Planning
- PDDL is the common communication language. Main
variants of PDDL..
PDDL 1 1998 first IPC
2002 - Added Duration and Numerical Quatities
PDDL 2.1
2003 - Added timed initial facts, derived
predicates
PDDL 2.2
PDDL
2002 - Added Processes, Events, cts time
28Current State of AI Planning
- Now many very effective techniques in use in
plan generation.. - (see http//scom.hud.ac.uk/planet/repository/ )
- Generate and search through a plan graph
(Graphplan, STAN) - Do best-first, forward, state space search with
very good weak heuristics (FF, HSP) - Compile planning problem into a large set of
clauses and solve with a satisfiability engine
(Blackbox) - Compile planning problem into a compact storage
form such as Binary Decision Diagrams (MIPS)
29Current State of AI Planning
- Summary - Good News
- Plan generation algorithms are much more
efficient than 10 years ago, and can work
efficiently in more expressive problems domains - But there is Bad News
- Technology transfer there is much to do in
making the technology generally available and
usable - Model development domain model authors use
planners themselves to try to develop and debug a
domain model. Planners have not generally been
designed for this purpose..
30Knowledge Engineering and Domain Model Capture
31Knowledge Engineering
- Knowledge Acquisition / Engineering is a huge
area in AI related to Knowledge-based Systems
(KBS) - Old idea of 'knowledge transfer', where
constructing a KBS amounted to extracting the
knowledge from experts and encoding it within an
expert system 'shell (20 years ago!)
Application expertise
transfer
Procedural expert knowledge
32Knowledge Engineering
- Now KBS emphasises the building of a deep causal
model prior to an operational system. - This domain model has to embody not just the
procedural expert knowledge but the environment
in which this knowledge was utilised. - Several modelling frameworks have been developed
(e.g. CommonKads which is based on the use of a
series of models during domain capture, each
dealing with different aspects of the domain.) - These support the process of model acquisition
and validation, and are underpinned by an overall
method of development.
33Knowledge Engineering for AI Planning Definition
- Knowledge Engineering (KE) in AI Planning is the
process that deals with - acquisition,validation and maintenance of
planning domain models, and - the selection and optimization of appropriate
planning machinery to work on them. - Hence, knowledge engineering processes support
the planning process they comprise all of the
off-line, knowledge-based aspects of planning
that are to do with the application being built. - (definition of Roadmap http//scom.hud.ac.uk/pla
net/home/)
34Knowledge Engineering for AI Planning
35Knowledge Engineering for AI Planning
- KE for KBS Is generally not the same as KE for
planning.. - The knowledge elicited in planning is largely
knowledge about actions and how objects are
effected by actions. This knowledge has to be
adequate to allow efficient automated reasoning
and plan construction. - The ultimate use of the planning domain model is
to be part of a system involved in the
synthetic'' task of plan construction (not for
solving diagnostic or classification problems as
in typical KBS)
36Knowledge Engineering for AI Planning
Terminology
- Domain is the application area
- Domain model is a formal model (theory) of the
application area - Acquisition is the process of producing a domain
model of the application area - Modelling is the area of using the model to
predict behaviour in the application area
37Knowledge Engineering for AI Planning
Terminology
Symbolic World
DOMAIN APPLICATION AREA
Acquisition
Domain Model
Domain Model Language
Predict
Modelling
38Knowledge Engineering for AI Planning Validation
- Validation of a model is the process that
promotes its quality in terms of internal and
external criteria by the identification and
removal of errors in the model. - Internal criteria includes properties such as
syntactic correctness and logical consistency in
general these properties can be proved formally
and are not too problematic. - External criteria includes properties such as
accuracy, correctness and completeness. Given
that the sources of the model will not often be a
mathematical object, these properties can never
be proved correct (in the same sense that a
requirements specification can never be proved
correct). - Note the distinction between validation of a
domain model and validation of a planning system.
The former supports the latter, and occurs at a
much earlier stage in system development.
39Domain Model Languages for AI Planning
- A DML should
- Be associated with a method.
- Be tool supported
- Be expressive and customizable
- Support the operational aspects of the model
- Have a clear syntax and semantics
- Be structured
40PDDL
- PDDL is the standard communication language for
domain models but - has no associated method for building models
- has little structure for helping in model
building - has little in the way of static tools to help in
de-bugging
41OCLh
- OCLh is a language developed precisely for
helping with the BUILDING of domain models - It is similar in some respects to PDDL but-
- It has structure using object classes and state
abstractions - It has a tools environment called GIPO which
supports a model building method
42Planning Domain Engineering with GIPO
43GIPO - rationale
- Planning Domain Models are hard to design, write,
debug, maintain - even for experts. The process
of encoding is laborious. Bugs are of various
types can lurk in models for a long time. -
- As planners and planning applications become
larger, the problems of engineering planning
domain models become more acute. There is a need
to research into engineering environments and
explore their synergy with general purpose
planners.
Application
Domain Model
Acquisition is Very hard!!
44GIPO - rationale
- The two main planning systems used in anger are
- O-Plan (Edinburgh University)
- SIPE (Stanford Research Institute)
- Both have very expressive domain models
languages. - To make an application efficient, the user must
encode appropriate heuristics. - To be able to use them one has to be a planning
expert, modelling expert and an application
expert. - Even then, developing models is a painstaking
process.
45GIPO what is it?
- GIPO (Graphical Interface for Planning with
Objects) is an experimental GUI and tools
environment for building planning domain models. - It is written mainly in Java, with some embedded
tools in Prolog, and is under continuous
development. - It is a product of PLANFORM, a UK EPSRC-funded
research project, written at The University of
Huddersfield UK. Website http//scom.hud.ac.uk/p
lanform - Our long term aim is make the technology more
usable and available!
46GIPO versions
GIPO 1.1
Generally available For Flat models (ECP01)
GIPO
GIPO 1.2
Not on release For models with cts time,
events and processes (PlanSig03)
Not on release Incorporating automated induction
of Operators (AIPS02)
GIPO 2
Generally available For hierarchical
models (ICAPS03)
47GIPO -functions
- GIPO allows a user to create new domain models or
import and change old ones via a GUI. It features - on-line tutorial and OCL manual
- Tools for initial model acquisition
- Tools for model validation
- Planning engines
- 3rd party Planning engines can be easily bolted
on to GIPO 1 as it outputs PDDL 1.2, and can
accept generated plans from them.
48GIPO main tools
- syntax and semantic checks for individual
components, and between components, of a model - From Trivial checks on names and sorts
- To complex checks on the structure of
hierarchically defined operators - a plan stepper
- a plan animator
- a random task generator (GIPO 1 only)
- an operator induction method (GIPO 1.2 only)
49GIPO simple method
- Identify objects and object classes (sorts)
- Define predicates
- Define typical object states
- Define operators
- Debug and validate using plan stepper, planner
and animator - Method in more detail was given in
- T.L. McCluskey and J.M. Porteous Engineering and
Compiling Planning Domain Models to Promote
Validity and Efficiency. Artificial Intelligence
Vol. 95(1), pages 1 - 65, 1997.
50Future releases GIPO
- GIPO supports models that contain
- Actions
- Events
- Processes
- Continuously varying values (Time)
51GIPO Air Traffic Control Example
All Symbols are clickable and give object
information
plane flying through a block represented by a
process
52Air Traffic Control Example
Safety Violation Event
53Conclusion
- AI Planning is a maturing technology
- AI Planning technology needs to made more usable
and available - The main assumption in AI Planning is that there
should be a logical separation between the
planning engine and the domain model.
Particularly important is the engineering of the
domain model if this has bugs then the
application is doomed - GIPO is an experimental GUI for building and
validating planning domain models. It is a first
step in making planning technology more usable.