MultiAgent Planning

Using an Abductive

Event Calculus

Christoph G Jung Klaus Fischer Alastair Burt

Graduiertenkol legKognitionswissenschaftUniversitat des Saarlandes

Acknowledgements

Wewould like to thank Prof Dr Jorg Siekmann for sup ervising the development

of the planning system that is describ ed in this rep ort

We appreciate the work of Prof Dr Rob ert Kowalski and his group at the

Imp erial College London They created the original formulation of the Event

Calculus and were the rst to apply it to planning The immediate inspiration for

our approach however has b een the work of Lo de Missiaen Maurice Bruyno oghe

and Marc Denecker from the KU Leuven Besides their planning system CHICA

they have also develop ed the foundations of SLDNFA the basic proof procedure

used in our implementation EVE

Further acknowledgements are due to the Programming Systems Lab of the

DFKI GmbH and its head Prof Dr Gert Smolka for the design and the implemen

tation of the wonderful Oz calculus the c onstraintbased implementation platform

of EVE The group esp ecially Christian Schulte were always ready to give as

sistance Without Christians backing and the discussions ab out constraintbased

programming and encapsulatedsearch EVE would have never come to life and

what would have Adam said to that

Gero Vierke has b een a valuable help by pro ofreading this rep ort

Christoph G Jung would also like to thank the Graduiertenkol leg Kognition

swissenschaft at the Universitat des Saarlandes for their unique supp ort

Contents

Preface

Intro duction

Planning

EVEs Architecture

Theory of Time and Action the Event Calculus

Requirements

The

The Event Calculus byKowalski Shanahan

The Event Calculus by Missiaen

The Simple Event Calculus of EVE

The Extended Event Calculus of EVE

Remarks

Summary

Theorem Proving with Ab duction SLDNFA

Resolution SLD

Negation As Failure SLDNF

Constructive Negation

SLDCNF

SLDNF

Ecient Negation in SLDNF

Ab duction SLDA

Negation and Ab duction

SLDNFA

SLDCNFA

SLDNFA

Remarks

Summary

The Event Calculus under SLDNFA

Planning by Theorem Proving

Plan Analysis and Evaluation

Plan Synthesis and Mo dication

Ab ductive Predicates and their Maintenance

Treatment of Negations

SLDRule Choice Points and Heuristics

Execution of the Simple Event Calculus of EVE

Execution of the Extended Event Calculus of EVE

Summary

SLDNFA by Constraint

The Oz calculus

Resolution in Oz

Negation As Failure in Oz

Constructive Negation in Oz

Ab duction in Oz

Remarks

Summary

The ConstraintBased Event Calculus

MetaProgramming

Heuristics

Ob jectOriented Ab duction

wledge Base Interface The default Ab ducibles and the Kno

Summary

Ob jectOriented Representation

Representation of Prop erties

The Planning Service Class EVE

The Event Class UrEvent

The Default Ab ducibles

The Knowledge Base Ob ject

Summary

EVE in the MultiAgentBlocksworld Domain

EVE in a MultiAgent System

The InteRRaP Architecture

EVE within the Lo cal Planning Layer

EVE in the Loading Do ck Domain

Summary

Related Work

Planning with a logical framework

Situation CalculusBased Systems

Planning using Temp oral

Event CalculusBased Systems

Pro cedural Nonlinear Planning

Plan Graph Analysis

MultiAgent Planning

Summary

Future Research

Planning in a MultiAgent Architecture

Extensions to the Event Calculus

Maintenance

Events with Duration

ContextDep endent Conditions

in Planning

Sensing Actions

Hierarchical Planning

Generic Resources

Heuristics

Ab duction constraint logic programming

Summary

Conclusion

A EVE Installation

A Dep endencies and Compilation

A A Counting Example

A Summary

B Axiomatisation of the MultiAgentBlockworld

C Axiomatisation of the Loading Do ck Scenario

List of Figures

References

Index

Preface

Since its early b eginnings Articial Intelligence research in the eld of planning

has had to cop e with the The rst logicbased systems

using the Situation Calculus showed that this theory of time and action has

not b een able to solve the frame problem eciently b ecause at least in its original

formulation it is restricted to a linear form of planning

Later approaches however have shown that a theory originally designed for

calculating database up dates and narrative understanding the Event Calculus

is capable of improving on these disapp ointing results promising expressive

nonlinear temp oral reasoning and thus nonlinear planning

In this rep ort werstfocusontheclausebased evolution from the Situa tion

Calculus to the Event Calculus and derive two axiomatisations of

the Event Calculus that are suitable for nonlinear planning using a common

action representation based around preconditions and postconditions Section

The development is guided by the exploration of soundness and completeness issues

with resp ect to strong nonlinear plans as solutions

The theorem proof pro cedure Section that underlies the theories of time

and action has to supply resolution and negation as failure in order

to analyse and evaluate plans Plan synthesis and modication can be achieved

through a formhypothetical reasoning intro duced by the abduction principle

We therefore use a new pro of pro cedure SLDNFA derived from a description

in that correctly merges the ab ove three inference techniques with an extension

based on constructive negation Its completeness concentrates on a least commit

ment class of hypotheses and solution substitutions with clause programs restricted to

allowonly nite domain variables within negated goals The main problems that this

algorithm is mainly faced with include the high interference b etween nonmonotonic

negation and ab duction In addition we demonstrate howtoimprove the treatment

of negation in SLDNFA for most calculi so that the nite domain requirement

can be dropp ed This holds in particular for pro ofs with the axiomatisations of

Event Calculus we use We investigate this matter closely with resp ect to the

capabilities of SLDNFA in Section

Based on the implementation platform Oz ahigherorder constraintbased

programming language oering many features suchasconcurrency abstraction en

capsulatedsearch and object orientationweshowhow to realize the SLDNFA

pro cedure by syntactical transformation functions Section that turn clausebased

programs into constraints The selection rule is hereby handed out to the reduc

tion strategy of Oz and is can b e inuenced by many constructs of the language

Treatment of disjunctive choicepoints dep ends on the driver pro cedure that guides

the encapsulated search pro cess Again transformation techniques that guide the

dynamic creation of choice p oints from within the computation spaces giveusthe

power to implement dierent heuristics We exemplary show such a mechanism

within the abduction step

A discussion of some sp ecial issues of our implementation EVE follows in

Sections and EVE represents a generic planning mo dule written in Oz that can

b e used in varietyofArticialIntelligence architectures Ob jectoriented techniques

help to mo del the necessary concepts in planning and furthermore provide com

fortable extensions like objectorientedabduction and an improved constraintbased

t embedding of translation of the Event Calculus Furthermore the concurren

the temp oral reasoning pro cess is investigated

After a rst evaluation of the EVE system in the multiagentblocksworld do

main Section we explore its prototypical application within the agent archi

tecture InteRRaP Section Multiagent systems are usually found in domains

that have real need for strong nonlinear planning services as oered by EVEThe

layered architecture InteRRaP deals with temp oral reasoning on several levels

of abstraction but the fo cus of this section is the evaluation of EVE in the lo cal

planning layer We use the loading do ck scenario the main researchenvironmentof

InteRRaP to discuss this initial integration

A comparison b etween EVE and related planning approaches with resp ect to

eciency and expressiveness Section follows and is continued with the pre

sentation of the future research esp ecially in the eld of distributed multiagent

planning Besides the architectural considerations within multiagentsystemswe

describ e p ossible extensions to the Event Calculusanapproachbased generic

resourc es and hierarchical planning through plan abstraction Section Further

more some ideas that try to bring the notion of ab duction and constraintbased

logical programming more closely together are describ ed A conclusion in Section

summarises the overall contribution of our work and an app endix gives a short

installation guide Section A and presents the axiomatisations of the scenarios we

used Sections B and C

Intro duction

Logic

Logic can be perhaps best dened as a class of truth languages Ma jor syntacti

cal units the formulae denote represent truth values and from these values we

construct an equivalence semantics jj Whereas classical logic restricts to the com

mon truth values true and false there exist to daymany extensions allowing

dierent conceptions of truth fourvalued logic fuzzy logic etc

Prime syntactical elements of a logical language are propositions that act like

statements uttered by humans and logical connectives eg conjunction dis

junction equivalence implication negation etc The semantics of

the connectives is reasonably dened by in terms of the metalogic level eg

F F jjF j F

   

What makes logic so attractive from a computational p oint of view is that once

given a procedure that investigates the truth of a formula proof this do es not

only yield a way of programming but also some machinery that allows to mak e

inferences close to human reasoning It is not obvious to assume the existence of

such algorithms and much research has b een sp ent to nally obtain the encouraging

result that truth within the prop ositional and rstorder logic framework is com

putationally observable j Dep ending on the expressivity of logical languages

however restrictions to this statementlikeon decidabilityareunavoidable

Provable formulae are called theorems of the appropriate pro of algorithm A way

to classify theorem pro of pro cedures is via soundness and completeness Soundness

ie correctness guarantees that a formula conrmed bytheproofscheme is indeed a

valid ie true formula j Completeness is only reached if every valid formula

is also a theorem j In contrast to validity one sp eaks of an inconsistencyif

aformula denotes

The logic b est explored so far is rstorder logic or predicate logic Entities mem

b ers of a denoted domain or universe set are describ ed by atoms basic entities

terms functions over entities and variables representatives for entities The al

ready intro duced prop ositions are expressed by predicates that represent relations

over entities Finally the combination of prop ositions with the logical connectives

forms the class of rstorder logic formulae A sp ecial class of connectives remains to

explain universal and existential quantiers Quantication allows extended

formulae involving variables and intro duces the abbreviations F F that describ e

the quantication of all free variables of the sub formula F ie variables that are

not in the scope any sub formula of some quantier regarding F alone

The universe and an appropriate interpretation of the atoms into the members

of the universe the terms into the functions over the universe and the predicates

into the relations over the universe build a structure A structure is linking syntax

formulae to semantics truth values by dening solutions of a formula as the

set of replacements of variables with entities that render the formula true If the

solution set of a formula covers all p ossible replacements the structure is said to b e

a model of the formula A formula is called satisable if there exists a structure such

that the solutions are not empty Given a set of closed formulae ie containing no

free variables one sp eaks of a theory It can also b e equivalently describ ed bythe

behaviour of its solutions in all structures

Sound and complete pro of pro cedures for rstorder logic have b een presented

The computational pow er is equivalent to the Turing Machine concept Undecid

ability results from the Halting Problem therefore carry over to predicate logic

In this rep ort we use a normalised clause syntax Figure uses BackusNaur

Form to describ e it derived from the completion form to present the cal

culi calculusabstract computation ow to describ e the pro of pro cedures and

variables V X Y

constants A a b

a

terms s t AsAV

predicates P Asst

conjunctions K I K I P

goals D E D E V K D E D E V K

V K

clauses C V AV D C V AV D

D D

a

s is the typ e of tuples over typ e s Dep ending on the context of s this could also denote

concatenation conjunction or even a set

Figure Normalised Clauses C C

to dene transformation functions on Clause programs are conjunctions over C C

with each clause having a dierent head predicate left part of the equivalence

Variables never o ccur free they have to reside in the scop e of some quantier Un

dened predicates are represented by clauses with as the body rightpartofthe

equivalence In general one assumes that the set of the atom function and

predicate symb ols is innite

With negation C clause syntax is nevertheless as expressive as rstorder logic

since equivalence transformations exist These transformations are rewritings

of formulae that preserve their semantics and thus form an imp ortant part of

pro of algorithms Pro cedures that are designed to work sp ecically with clause

programs require a sp ecial form of query b ecause they decide ab out the truth

of P G P j G for a given program P also called theory and a goal

G D Examples are SLD resolution and SLDNF including negation

treatment Extending the principles to hypothetical reasoning SLDNFA even

V

allows the generation of fact clauses Ab V AV Xs such that



XV

P Ab j G

To obtain the functionality of programming languages that compute output val

ues pro of pro cedures are usually not conned to verifying the existence of entities

which satisfy a goal These algorithms also return information ab out the form of

the entities that satisfy the goal G An imp ortant concept is equality on the syn

tactic the predicate aswellasonthesemantic level Theorem proving handles

the equality semantics via substitutions replacements of variables with terms and

unicationaway of pro ducing unifying substitutions that render the given terms

S and t equal The orthogonality of substitution and equality can b e seen from the

fact that for each satisable conjunction of equality terms there exists at least one

substitution which when applied to the formula turns it into a conjunction of triv

V

ial equalities s sFurthermore each substitution represents p er se a formula

V V

Xs its application to F is equivalent to the conjunction F Xs

Soundness and completeness can now be extended to the answer substitution

set This set is in general innite but many of the answer substitutions share a

common structure Thus the intro duction of the most general unier MGU that

forms a base for the answer substitution space of a unication improves the com

putational result without losing completeness provided that the pro of pro cedure is

fair ie it regularly expands comp eting parts intro duced by disjunctive choice and

conjunctive selection of the pro of Only minimal structurally dierent solutions are

generated with the MGU

To describ e a denotational semantics of rstorder logic in a uniform wayformu

lae are asso ciated with an appropriate transition function over ordered structures

Fixp oints of the function turn out to b e the mo dels of the formula and the notions

of monotonicity and nonmonotonicity are derived from the transition function to

the appropriate connectives and reasoning principles

Mo dern approaches try to integrate the logical paradigm into all sorts of compu

tational tasks instead of leaving it as a playground for mathematicians and logicians

Eciency and exibility is mainly gained by restrictions to a logical sub language

or a sp ecial domain One such approach is the use of constraint logic systemswhere

the basic formulae are logical constraints



Of course this section is not intended to fully intro duce the interested reader

into the world or b etter universe of logic that has b een develop ed over years

It only presents the key concepts that are used throughout this rep ort and motivate

an imp ortant part of the approac h that is used in EVEFor a complete overview

ab out rstorder logic and its realisation through automation maybeagood

choice A p ersp ective on constraint logical programming and its declarative seman

tics can b e found in This pap er also extends the unication pro cess to rational

trees and develops an appropriate abstract machine that covers most of its con

cepts These concepts are also the base for the Oz calculus the constraintbased

implementation platform of EVE

Planning

Computational researchin planning or general problem solving GPS started in

the late s Since then it has grown to a rather large discipline in Articial

Intel ligence research GPS systems aim to arrange parts of agiven resource spec

ication into a plan that meets a given goal Figure With to days knowledge

in complexity theory it is clear that solving this problem of problem solving is



necessarily NPhard and thus exponential ly worse Such a general approach will



therefore only be able to work eciently in certain classes of planning domains

The more general the algorithm the more eciency has to be incorp orated from

additional domainsp ecic knowledge so called heuristics to guide the search for

the solution plan These guidelines are a general to ol b orrowed from graph theory

on the cost of the already and help to nd optimal paths in a search tree based

collected paths and an underestimation of the cost to the nearest goal leaf

Whereas scheduling problems fo cus on p ossibly optimal temp oral co ordination

of the given resources common planning systems are faced with a more general

formulation born in meansend analysis research Starting with the concept of a

state or situation usually represented in logic eg clausebased as in Figure a

plan consists of the collection and arrangementof actions or events The types of the

events are also dened in logic in terms of conditions that each instance places onto

and thus accurately as the description of several expressions is vague b ecause of some lacking

details



It is straightforward to reduce the travel ling salesman task to a planning problem



There are several expressions such as domain mo del soundness completeness goal etc

that app ear in this rep ort in several slightly dierent meanings due to the logical foundation of

planning Indeed in the approachofEVE see Section that has a planning theory on top of

a theorem pro of layer there is even a strong dep endency b etween their meaninings The actual

meaning however should b e clear from the resp ectivecontext hypothetical world real world

Resource specification abstraction (initial state and actions) initial state goal initial expression plan

Synthesis/ Execution Modification affects

result plan result abstraction result

subsumption ! state state

Figure The Task of Plan Generation

the state representation if it is executed Solution plans for the planning problem

are those that turn the start situation into some situation that is satisfying the given

logical goal expression The resource sp ecication in the planning case is given by

acombination of the start situation and the collection of the allowed action typ es



which build the planning domain description Pureplan synthesisorplanning from

scratchasshown in Figure starts with an empty plan description modication

receives an input plan to complete and is computationally just as complex

This is not surprising as NPhard exp onentially worse problems do not allowthe

assumption that each solution for a subgoal is extendable to solve the whole task

Situations are often represented bya know ledge base KB whose prime logical

elements are called facts propositions or properties analogue to logical terminology

Based on the prop ositional syntax used in the KB the conditions of event typ es

can now b e distinguished into preconditions prop erties that havetobe subsumed

ie implicated by the situation at execution time to yield success of the execution

and postconditions or eects prop erties that havechanged ie they are deleted or

retracted to obtain the result situation of execution To gain expressivity action

typ es can carry roles that are parameters of their conditions Besides establishing

atyp e hierarchy from the typ e with the least to the typ e with the most sp ecied

roles roles further extend a plan to sp ecify their instantiations Also the goals

are dened in terms of the prop ositions from the KB which makes the success of

planning dep endent on subsumption Examples of a situation an action typ e a goal

and a plan are given in Figure

A nite representation can only handle nitely many details The result of this

fact comnbined with the complexity of the real world is called the qualication

problem which states that for each solution plan there are still uncountably many

exceptions that may lead to failure of its execution

Planning systems can be classied in several ways First soundness and com

pleteness with resp ect to solution plans are an imp ortant means of classication

Soundness guarantees in this case that the generated solution plans are correct with

resp ect to the goal and the chosen execution mo del Completeness is only guaran

teed if the planning pro cedure is capable of generating all solution plans for the

given goal that are sound It dep ends on the cost here the relative amountofex

ecution eort of the events whether solution plans are optimal If no such cost

information is available the plan with the least numb er of steps is of course the



As you will see in section this is a weak distinction Dep ending on the p ersp ectiveofdierent

theories there are intersections b etween the notions of a plan the start situation and the domain

description

Situation standingp freep

freep reachpp

reachpp

Action Typ e gotoFromTo

Preconditions standingFrom freeTo

reachFromTo

Postconditions added standingTo freeFrom

Postconditions retracted standingFrom freeTo

Goal standingp

goto(p1,p2) goto(p3,p4)

Plan

Figure Situation Action Typ e Goal and Plan

goto(agent1,p1,p2)

goto(agent2,p3,p4)

Figure Nonlinear MultiAgentPlan

prime candidate for the optimum

Another distinction is intro duced by the kind of treatment of the goal Systems

that broadly expand the start situation by applying actions and in this way try

to reach the goal are called forward planning systems Other approaches prune the

state space by a goaldriven expansion backward planning Both cases are unied

if one cho oses the space of plans rather than the space of states as the base for the

search The choice between forward and backward planning is then a question of

heuristics

The concept of time also divides planning approaches into several classes

Whereas plans with a serial execution concept are called linear there are application

domains suchasmultiagent domains see Section in whichitisconvenientto

have nonlinear plans see Figure with concurrent or even paral lel actions Nonlin

earityisobviously more general than linearityandaswe will explain in Section

it can b e mo delled by incomplete knowledge ab out the temp oral ordering of events

A further advantage of nonlinear to linear planning is the reduced search space

of plans Each nonlinear plan is a representativeof its linearisations completion

to a total temp oral order and the planning pro cess tries to keep the number of

temp oral restrictions as small as p ossible The opp ortunities for conicts b etween

nonlinear branches however are increased It dep ends on the appropriate planning

domain whether a linear or a nonlinear approach will b e the b etter choice

Sound nonlinear plans could b e characterised byhaving at least one sound lin

earisation weak nonlinearity Strong nonlinearitygoeseven further and demands

that all p ossible linearisations of a correct nonlinear solution b e sound in the linear

meaning

Adaption of human abstraction metho ds leads to hierarchical extensions Plan

ning problem solvers that supp ort such metho ds do not only allow actions as prim

itives for plans They also allow whole plan structures as events as presented in goto(p1,p3) goto(p3,p5)

goto(p1,p2) goto(p2,p3) goto(p3,p4) goto(p4,p5)

Figure Hierarchical Plan

hypothetical world real world

Resource specification abstraction (initial state and actions) initial state goal expression Plan

Analysis/ Execution Evaluation affects

result abstraction result

subsumption ? state state

Figure The Task of Plan Analysis

Figure This can b e accomplished either by a concept of plan abstraction as Sec

tion explains or by a planning pro cess that is carried out in several stages

according to goal hierarchy situation abstraction

Finally planning pro cedures dier in the programming paradigm they use Early

systems often relied on pro cedural algorithms that are implementable in most pro

gramming languages The approach of logic programming however is to use a logic

itself as the basis for a declarative programming language It therefore requires

some theorem pro of pro cedure as an interpreter but key concepts suchasuni

cation are already dened and the resulting framework tends to b e more exible

and extendable With EVEs approach it is even p ossible to obtain plan analysis

and evaluation see Figure from the same underlying framework Together with

modication these tasks cannot b e solved with most xed pro cedural approaches

without much rewriting eort

EVEs Architecture

From a computational p oint of view the architecture of the planning mo dule Figure

describ ed in this rep ort EVE can b e conceptually divided into three layers due

to its logical approach A theory of time and action the Event Calculus resides

on the top lev el layer and is designed to handle incomplete temp oral knowledge

and thus reasoning ab out nonlinear plans see Section

Since EVE provides twoversions of the calculus with dierent computational

costs simple and extended their execution pro of with an underlying theo

rem proving pro cedure layer is parametrisable in several ways This layer

supp orts resolution negation and ab duction in order to obtain plan analysis

as well as synthesis see Sections and In particular the nontrivial de

p endency of soundnesscompleteness of the theory layer with resp ect to solu

to goals solution substitutions tion plans and of the pro of layer with resp ect

and hyp otheses will be investigated in Section Finally the implementation

base layer for these two upp er levels is represented by the Oz calculus Theory of time and action 1 eventtime precondition effect EVE’s event calculus (smpl/ext)

EVE Theorem prover 2

negation as failure resolutionconstructive negation abduction EVE’s SLDNFA+ (smpl/ext) Programming Language 3

constraints concurrency search

OOP logical and functional programming Oz

The Oz Calculus

Figure Computational Architecture of EVE

realised in EVE as a higherorder constraintbased abstract machine supp ort

ing concurrency object orientationandencapsulatedsearch

As our approach has b een to use as many logical resources from this constraint

calculus as p ossible layer is totally subsumed in the result of the sound trans

formation functions Section that link the layers and There are furthermore

many features such as ob ject orientation that improve customisation and the em

b edding of EVE into various applications Sections and

initiatespickupAgentBlockTerm

TermholdingAgentBlock

terminatespickupAgentBlockTerm

TermhandemptyAgent TermontableBlock

preconditionpickupAgentBlockTerm

TermhandemptyAgent TermontableBlock

Figure Action Typ e DenitionPlanning Domain Axiomatisation

Theory of Time and Action the Event Calcu

lus

We rst present the basic prop erties that a theory of time and action has to pro

vide to allow reasoning over collections of actions and thus b e suitable for planning

purp oses Starting with the wellknown Situation Calculusit then progresses

chronologicallyguidedbytheinvestigation soundness and completeness issues to

describ e twoversions of the Event Calculus that are suited for nonlinear plan

ning The logical syntax employed is a slightly lo oser but still equivalent one for

clause programs of Figure The axioms presented rely furthermore on some pre

    

dened terms in inx notation nil and predicates member

to incorp orate lists and boolean arguments

Requirements

The following considerations describ e the basic skills that a theory of time and

action has to preserve

Representation of prop erty situation action typ es actions and

time A theory suitable for logical planning has to dene the concepts of prop

erties situations action typ es actions as their instances and time Whereas

prop erties and action typ es are immediately dened in terms of logic thus

forming the planning domain axiomatisation see Figure the representa

tion of situation and time is not necessarily explicit A plan consists of action

instance choices and their temp oral order

Sound and possibly complete reasoning over plans Assisted from a

theorem pro of pro cedure the used theory T should b e able to correctly with

resp ect to its execution mo del calculate the overall eects E of a given plan

P in the planning domain D

T D P E

Given some sp ecial eect as a goal it should b e furthermore able to accept

as many as p ossible plans that establish this eect

Nonmonotonicity State transition caused by action execution is nonmono

tonic b ecause prop erties can be added as well as retracted Techniques to

circumvent inconsistent representations are necessary Closely related is the

task of dividing the prop erties into the ones that change and the ones that re

main untouched the socalled frame problem this is manageable using

techniques for nonmonotonic reasoning



These are sp ecial atoms that representaworst case ag see Section They havetobe

distinguished from the ary predicates and



This is a sp ecial unary predicate to invert the value of a worst case argument It has to b e

distinguished from the connective

Incomplete temp oral knowledge Nonlinearity can b e mo delled by partial

temp oral order and thus wehave incomplete knowledge Whenever there is no

temp oral relation b etween two actions they should b e executable in any order

With strong nonlinearity they are even ideally allowed to interleaveeachother

intro ducing concurrency or parallelism A nonlinear theory of time and action

has to cop e with this lack of information and nevertheless guarantee soundness

with resp ect to its execution mo del Worst case assumptions therefore play

an imp ortant role

Sound and p ossibly complete hyp othetical reasoning The solution

plan P for goal E has to b e constructed as a hyp othetical result of a pro of

starting from some initial P with P P

 

T D P E

 P

Again the treatment of incomplete knowledge is required since P is derived

incrementally and pro of steps that were taken when P is partially constructed

may later have to b e retracted Solutions should furthermore cover a reason

able range of correct plans

Knowledge base Finally a KB containing the start situation to the planning

problem has to b e interfaced Integration of the prop ositions collected there

dep ends on the planning theory and the planning domain representation

The Situation Calculus

The Situation Calculus has b een one of the rst paradigms in planning to solve

the frame problem correctly Since its original formulation had some drawbacks

with resp ect to the representation we present a revised prop osal from that is

more elegant and allows b etter comparison with the theories wepresent later Fur

thermore the axiomatisations are in accordance with the concept of preconditions

b eing a function on action typ es within the planning domain description

The basic idea of the Situation Calculus Figure is the representa

tion of explicit situations S and their prop erties P through the holds predicate

holdsPSFollowing the action typ e denition scheme from the b eginning of this

section explicit events are asso ciated with a typ e act Only time is left as b e

ing dened implicitly by the order of the situations Reasoning ab out prop erties is

therefore situationdriven If a situation S subsumes the preconditions of the typ e

Ty of an event E the application of E to the situation will succeed and pro duce a

result situation resultSE

The explicit situation representation p erforms the nonmonotonic state transition

by coupling the prop ositions with the situation terms The solution to the frame

problem the frame axiom is expressed using negation to decide ab out prop erty

propagation from situation to situation Figure Negation can even simplify the

denition of the precondition check within the fails axiom

This formulation however is not capable of dealing with incomplete temp oral

knowledge Holes in the plan structure ie undened intermediate situations pre

ventany reasoning ab out following states Plan analysis as well as plan synthesis are

therefore restricted to linear planning using a linearity assumption This assump

tion p ostulates that conjunctive goals havetobesolved in a sequence of complete

subgoal solutions Optimal plans however require interleaved subgoal treatment

as in the case of the famous Sussman Anomaly

An interface to a knowledge base is easily provided as an equivalence to the start

situation

PSE holdsPresultSE

TyholdsPS actETy terminatesTyP

TyactETy initiatesTyP failsES

SE failsES

PdTy actETy preconditionPdTy holdsPdS

Figure The Situation Calculus

start end

situation positive property propagation

pr fx

action negative property retraction

Figure Propagation of Prop erties in the Situation Calculus

Althoughitisnotalways obvious the Situation Calculus is presentinmany

planning approaches including STRIPS Typical characteristics of these systems

are their solution to the frame problem and the linearity assumption Even linear

regression techniques that describ e situation classes rather than concrete situations

in backward planning b elong to these systems

The Event Calculus by Kowalski Shanahan

A far more exible approach to the frame problem is provided by a theory originally

designed for maintenance of temp oral databases and narrative understanding the

Event Calculus An adaption of the theory to the planning problem and the

commonly used representation of actions is presented in Figure

The fo cus is no longer on an explicit representation of situations but on action

typ e instances that is the actions or events intro duced by happensFurthermore

there are terms describing points in time startendwith resp ect to these

events and a predicate denoting their temp oral relation before Within this

this rep ort the simplied assumption of events having ideally no duration is used

startEendE which is a common assumption throughout the literature

The intro duction of time p oints supp orts the task of mo delling the change of

state Figure that is computed by a search for p ossible initiators of prop erties

and a more general solution to the frame problem the persistence axiom represented

in terms of the clipped relation Again negation is a key technique that allows

us to formulate the following idea in a logical background

A prop erty holds true at a certain time p oint Tp if it is intro duced by

PTp holdsPTp

ETy happensE actETy

initiatesTyP beforeendEITp

failsE clippedPendETp

E failsE

TyP actETy preconditionTyP

holdsPstartE

TpTpP clippedPTpTp

ETy happensE actETy

terminatesTyP failsE

inendETpTp

TpTpTp inTpTpTp

beforeTpTp beforeTpTp

Figure The Event Calculus by Shanahan

event

initial event prec fx event

event properties that hold

clipped

Figure Propagation of Prop erties in the Event Calculus

some successful event E known to happ en b efore Tp and if it is not

terminated by some other successful eventbetween endE and Tp

Compared with the Situation Calculus this is an equivalent approach to

linear planning However p ersistence further extends the original frame axiom by

reasoning ab out incomplete temp oral knowledge and thus partially ordered events

in nonlinear planning

But this version of the p ersistence axiom has a problem with strong nonlinearity

It recognises only those p ersistence destroyers that are provable to b e inside in

the time interval within which the prop ertymust b e preserved Further completions

of the temp oral order could thus add further such destroyers The solution plans are

therefore characterised as b eing extendible to a correct linear plan in at least one

way weak nonlinearity Strong nonlinearity as it is required in EVEs in tended

application domains see Section only accepts those plans that are correct in all

p ossible temp oral extensions Figure

When pro ceeding from a situationbased to an eventbased representation the

Figure Strong Nonlinear Incorrectness

PTp holdsPTp

ETy happensE actETy

initiatesTyP beforeendETp

failsE clippedPendETp

E failsE

PTy actETy preconditionTyP

holdsPstartE

TpTpP clippedPTpTp

ECTyC happensEC actECTyC

terminatesTyCP failsEC

outendECTpTp

TpTpTp outTpTpTp

beforeTpTp beforeTpTp TpTp

Figure Event Calculus by Missiaen

interface to a knowledge base is no longer straightforward The metaphor of events

can nevertheless be kept b ecause of a sp ecial initial action asso ciated with a



sp ecial typ e initial that is able to initiate all prop erties contained in the KB

The Event Calculus by Missiaen

A reformulation of the p ersistence axiom is given in Again negation plays an

imp ortant role in the sound treatment of incomplete temp oral knowledge

A prop erty holds true at a certain time p oint Tp if it is intro duced by

some successful event E known to happ en b efore Tp and if it is not

terminated by some other successful event that is not provable to be

outside the interval sp ecied by endE and Tp

Persistence destroyers are no longer events provable to reside inside the ap

propriate time interval They are rather dened as not being provable to happ en

outside out the given range Figure The reasoning ranges therefore over

all p ossible linearisations of the current incomplete plan A certain event is not

able to destroy the p ersistence of its own preconditions thus the assumed identity

of startEendE is only approximately true The denition of out handles

this fact by op erating on an interval whichisopentoitsright e2

e1

Figure Nontermination

Figure A Not Strong Nonlinear Solution

Reasoning ab out nonlinear structures is now sound even for the stronger notion

of nonlinearity but is faced with a termination problem that is shown in Figure

Both events e e are mutual destroyers of each others preconditions A pro of of

 

failse thus dep ends on failse and vice versa causing an innite lo op

 

within the computation The situation of two interacting and concurrent actions

can o ccur b oth in plan analysis and plan synthesis tasks Initial attempts to solve

the problem tried to recognise and linearise the events involved This requires some

p erio dical check together with a decision ab out which linearisation to take

The solutions that we prop ose for EVE try to put this knowledge into the

calculus itself thus providing a natural treatment In each case however the sound

result for strong nonlinearit yisachieved through a loss of some solutions Figure

In this example each linearisation of the plan is correct but the prop erty

do es not provably hold at the end of the plan It is common in the literature to

exclude such cases from the class of strong nonlinear solutions A characterisation of

this class of solutions is yet to b e formulated but it seems like they require several

identical event streams These sp ecial cases are not likely to b e very imp ortantin

practical planning domains

PTp holdstruePTp

EITyI happensEI actEITyI

initiatesTyIP beforeendEITp

failsEI clippedtruePendEITp

PTp holdsfalsePTp

ETTyT happensET actETTyT

terminatesTyTP beforeendETTp

failsET clippedfalsePendETTp

E failsE

TyPD actETy

pospreconditionTyPD holdstruePDstartE

negpreconditionTyPD holdfalsePDstartE

TpTpP clippedtruePTpTp

ECTyC happensEC actECTyC

terminatesTyCP outendECTpTp

TpTpP clippedfalsePTpTp

ECTyC happensEC actECTyC

initiatesTyCP outendECTpTp

TpTpTp outTpTpTp

beforeTpTp beforeTpTp TpTp

Figure The Simple Event Calculus of EVE

The Simple Event Calculus of EVE

We rst presentavery simple change to the Event Calculus from Section to

avoid nontermination It is based on the investigation that actions that are allowed

to fail should not necessarily app ear while planning from scratch Whenever the

planner intro duces some event Ethereisalways the intention to establish a certain

goal that afterwards dep ends on the success of EFurthermore if the plan execution

mechanism do es not involveany precondition check and always tries to execute some

p ortion of the action until it gets a failure rep ort back the failed events cannot just

be ignored b ecause some of their eects could have taken place Solution plans

therefore should b e restricted resp ectively

To incorp orate these considerations into the calculus it is necessary to imple

mentaworst case assumption ab out the b ehaviour of actions It is certainly obvious

tro duce any prop erty the planner likes that a failed action is not guaranteed to in

to have installed However it is still able to serve as a p ossible destroyer of per

sistence Our redenition of the p ersistence axiom therefore omits the destroyer

success check This strategy is reasonable as analysis evaluation appropriately re

stricts the accepted class of plans and synthesis mo dication tries to push even

failed events out of a p ossible destroyer role In the case of Figure a linearisation

takes place in order to derive the success of e or e

 

Figure presents the derived calculus together with the additional handling of

negative prop erties that are now dealt with symmetrically to the positive ones Pre

conditions can b e distinguished into p ositive preconditions pospreconditions

that should hold holdstrue at the start time of execution and negative precon

ditions negpreconditions that should not hold holdsfalsetoprovethe

success Negative prop erties can even b e accessed in the start eventknowledge base

Knowledge bases that contain purely p ositive facts can b e accessed via negation as

failure

As Section discusses our formulation is even suited to simplify complicated

parts of a pro of pro cedure that otherwise runs into problems caused by nonmono

tonicity Applicable domains however are restricted to those that do not rely on

disablement of actions eg cooperative domains and planning from scratch tasks

The Extended Event Calculus of EVE

A restriction to co op erative planning or planning from scratch as in the case of

EVEs simple calculus is not always wanted eg in negotiation planning or gen

erally nonco op erative domains Since it could be of use to intentionally render

the preconditions of an action unsatised in order to get rid of the unwanted ef

fects of this action a success check within the clipped axiom would still be

needed With this supp ort the calculus is able either to render unwanted events

unexecutable or at least to recognise their failure

As wehave already mentioned the innitelo op situations should b e recognised

and solved within the calculus itself A detection is easy to accomplish by the

addition of a list parameter L to fails holdsand clipped This parameter

collects the events in whose nested success check the current pro of branch is residing

If fails is recognising events that already contained in L this will indicate the

innitelo op situation

What is the appropriate action on detection of a lo op The worst case assump

tion from our simpler approach has to b e slightly mo died in order to let the ax

iomatisation do the work If one intro duces a parameter W that indicates the worst

 

case either to b e the success W or the failure W of the current fails

 

call the pro of of the clause could just b ehave accordingly Since



each negation sign inverts the w orst case the parameter also swaps its value

W see Figure

The initial values for these two new parameters are obvious L is nil as the

calculus has a priori not selected any nested fails goal The initial worst case

W turns out to b e the failure of eachevent that should install awanted prop erty



W No matter how the lo op situation lo oks like it will nowforce the calculus

to recognise a p ersistence inconsistency and therefore initiate a renementonthe

current temp oral order of events

Remarks

Due to the dierent computational exp ense of the twoversions of the Event Cal

culusthe EVE implementation includes b oth and allows the user to switch be

tween them Dep ending on the domain requirements the user can freely cho ose the

resources he is willing to sp end Together with the parametrisable pro of pro cedure at

the next layer the EVE mo dule b ecomes very exible with resp ect to its resource

demands Further eciency is gained by heuristics to prune the spawned search

space and guide the execution of the calculus Since these are linked tightly to the

theorem proving algorithm they are describ ed in more detail in the appropriate

Sections and

The representation of time and action within EVE relies on the ideal assumption

of events having no duration As so on as duration must b e mo delled a conict with

the notion of strong nonlinearity arises This is caused by the nonexistence of

denite limits on the lifetime of pre and p ostconditions Furthermore additional

prop erties that arise as an event is expanded to sub events at a deep er abstraction

level forming the the socalled during conditions have to be considered Section

discusses some of the questions related to this issue

Amongst the improvements that ease the customisation of the temp oral reason

ing pro cess is the ability to mo del contextdependent action typ es with dep enden



The execution layer checks the preconditions

PTpLW holdstruePTpLW

EITyI happensEI actEIAI

initiatesAIP beforeendEITp

 

failsEIL W clippedtruePendEITpPL W

PTpLW holdsfalsePTpLW

ETAT happensET actETAT

terminatesATP beforeendETTp

 

failsETL W clippedfalsePendETTpPL W

ELW failsELW



memberEL W

PDA memberEL actEA



pospreconditionAPD holdstruePDstartEEL W

PDA memberEL actEA



negpreconditionAPD holdsfalsePDstartEEL W

TpTpPLW clippedtruePTpTpLW

ECAC happensEC actECAC



terminatesACP failsECECL WoutendECTpTp

TpTpPLW clippedfalsePTpTpLW

ECAC happensEC actECAC



initiatesACP failsECECL WoutendECTpTp

TpTpTp outTpTpTp

beforeTpTp beforeTpTp TpTp

Figure The Extended Event Calculus of EVE

cies b etween conditions These can b e transformed in a rst approachinto several

noncontextdep endent typ es Because additional actions of course increase the

branching factor of the resulting planning search space some dep endencies would

b e b etter describ ed by role constraints see Sections and A Further research

will try to incorp orate some of the more sophisticated mechanisms to deal with

contextdep endencies in the Event Calculus Section

Summary

In this section wehave outlined the general techniques a theory of time and action

has to provide to be suitable for nonlinear temp oral reasoning After intro ducing

the well known Situation Calculus its inabilityto cop e with the frame prob

lem in nonlinear settings was shown The Event Calculushowever solves this

problem with the concept of p ersistence Although designed for database up dates

it is as well suited for plan representation purp oses The original formulation from

has revealed some disadvantages in the eld of strong concurrency that have

been improved on by The p ossibility of innite reduction in this approach

the main fo cus of this rep ort is handled prop osing two derivates of the Event

Calculus The rst one which is particularly simple to implement is esp ecially

suited for co op erative domains and planning from scratch It incorp orates a worst

case assumption ab out the action execution mechanism The second alternativeis

not restricted to any sp ecial domain It thus regards failed events as irrelevantand

includes the critical failure checks for p ersistence destroyers Termination however

can still b e guaranteed bymutual dep endency detection and an appropriate worst



If Pre holds at the start of the action then Post will hold at the end If Pre then



Post



One action with Pre Post the other action with Pre Post

 

case assumption In EVE b oth metho ds can b e switched whichleaves the decision

ab out the resource consumption tradeo to the user In each case completeness of

the solution plans is slightly restricted but remains sucient all practical planning

applications

Theorem Proving with Ab duction SLDNFA

Given a calculus eg the Event Calculus in the clause syntax of Figure

its interpretation requires an underlying theorem proving mechanism Whereas for

clauses C without negation it suces to use pure resolution negation and the hy

p othetical reasoning b ehind abduction demand more sophisticated pro cedures This

section intro duces the necessary conceptual background presents several algorithms

and discusses their soundness and completeness with resp ect to solution substitu

tionshyp otheses to nally enable the handling of clauses C with negation with

ab ductive inference

Resolution SLD

The concept of resolution go es backto Itisarefutation pro cedure that derives

a theorem T by showing that T is unsatisable SLD is a sp ecialisation of this

principle by dealing with rstorder clauses instead of arbitrary formulae Given a

C C and a goal G D j clause program C C C C

 n P  n

j D it consists of the construction of a transformation G G G G

 sld  sld m

A pro of of G succeeds by reducing it to G and deriving an appropriate

m

substitution for the existentially quantied variables of D such that C j G

P

C j G

P

The interesting part is the resolution step see Figure that is resp onsible for

constructing each stage of the transformation G G Based on the observa

x sld y

tion

G j G

y x C y

P

i n G j G

y x C y

i

the resolution step tries to resolve a selected subgoal G of G with a clause

xj x

variant C W B W D In usual clausebased systems this leads to

iv v v v

unication the unify function of the clause head B and G to pro duce the most

xj

general unier and G fG G D G G g Since the

y y y x xj  v xj  xm

normalised syntax that wechose realises unication with the equality predicate

the unier is in this case only a variable replacement in the clause variant Variants

returned by the variant function are unique variable renamings that intro duce

new names not clashing with already intro duced symb ols They are therefore used

to eliminate the quantiers existential in the goal and universal in clauses in

a sound manner

If the notion of a goal set is used it always means a conjunction of its members

and builds the base structure for resolution Disjunctions are handled by nondeter

ministic choice the cho ose function to obtain several purely conjunctive pro of

stages that consist of a goal set and a substitution Whenever a resolution step has

b een computed the resolution pro cedure must decide which of all still comp eting

stages resulting from dierent disjunctive branches to expand further with the

next resolution step Let us call this decision the choice rule

Selection of the appropriate subgoal to resolve next can however b e determin

select istic The rule that decides ab out this selection is the selection rule the

function From its name follows the abbreviation SLD Linear resolution with a



Selection rule for Denite Clauses

Note that the use of cho ose to nd the right clause in the program with whichto

resolve next is just a simplication Since there exists exactly one clause whose head

is able to match the selected goal rememb er the unique denition of normalised

clauses a deterministic comparison is also able to nd it In our completion

syntax it is disjunction that intro duces several denitions for the same predicate

Better Selection rule driven Linear resolution for Denite Clauses

Equality and truth values have a sp ecial status Equality could b e axiomatised

as a set of clauses eg CET Clarks equality theory equivalent to the unication

calculus A b etter solution however is its immediate integration into the pro of pro

cedure that anyway has to provide some unication scheme A selected st subgoal

therefore triggers the builtin unication pro cedure unify and is replaced by the

implications of the returned by the unier Treatmentof and is straightforward

due to the conjunctivesemantics of the goal set the fail function removes the

current pro of stage from the already collected stages and the choice rule has to nd

another candidate to continue the pro of

The soundness of the resolution principle with resp ect to tautologies and solution



substitutions follows from the correctness of the resolution step

m 

G G j

m    C

P

G j

m    C

P



j jj

C

P

C G j C j G

P P

Completeness can only b e guranteed if the choice rule is fair This is also a require

ment of all the following pro of pro cedures As already mentioned the use of the

most general unier improves the pro of pro cedure without aecting completeness

Negation As Failure SLDNF

Clauses C without negation form only a subset of rstorder logic To regain the

full expressivity it is necessary to intro duce the negation op erator C This

op eration turns out to be nonmonotonic the denotational semantics is not as

simple as in the SLD case A way to incorp orate it into clause resolution is through

negation as failure NF that relies on a closed world assumption and thus the

completion of a program

Whenever the selection rule cho oses a negated subgoal the truth of this subgoal

can b e demonstrated by the failure of a sub ordinate resolution pro of on the p ositive

version of the goal When applied to SLD the resulting algorithm is called SLDNF

Figure

However goals with variables remaining in the scop e of some quantier give

rise to several correctness and completeness questions As they are not instantiated

they are treated as b eing universally quantied by the nested pro of and can never

obtain anyvalue Dep ending on the selection rule one can exp ect incorrect solutions

as shown in Figure The double negation starts two nested pro of attempts with

variable X The innermost succeeds b ecause there are two p ossible substitutions Xa

Xb for qX to derive the goal On the next higherlevel this result is inverted

to a failure Finally the top level pro of succeeds and is even able to unify Xc

this is of course an incorrect result With another selection rule that selects Xc

b efore nq the same query leads correctly to a failure

A common restriction to guarantee coincidence of the pro of pro cedure with the

semantics of negation is therefore to allow only expansion of ground ie completely

instantiated negated goals In our description this test is done by F K But



V

now the completeness is restricted as seen in Figure Selection of the negated

is here the combination of substitutions



With our clause notation using a constructive pro of lo oks identical since the resolution step

acts as a equivalence transformation Usually clauses are dened using back implication and

only admit the refutation approachinwhich the resolution step only computes an implication

G sldstepG C

y y x P

G fG G g

x x xo

G selectG G

xj x xo

if G D E then

xj

id

y

G fG G cho oseD E G G g

y y x xj  xj  xo

elseif G K I then

xj

id

y

G fG G KIG G g

y y x xj  xj  xo

elseif G VK then

xj

id

y

G fG G variant K V G G g

y y x xj  xj  xo

elseif G then

xj

fail

elseif G then

xj

id

y

G fG G G G g

y y x xj  xj  xo

elseif G st then

xj

unifys t

y

G fG G G G g

y y x xj  xj  xo

elseif G As then

xj

C fC C g

P  n

C cho oseC C

i  n

W B W D variant C W

v v v i

unifyG BW

y xj v

G fG G D G G g

y y x xj  v xj  xo

end

Figure The SLD Step

G sldnfstepG C

y y x P

G fG G g

x x xo

G selectG G

xj x xo

if

see the appropriate SLD cases

elseif G VK then

xj

a

if F K then



V

if sldnfVKC then

P

fail

else

id

y

G fG G G G g

y y x xj  xj  xo

else

fail

end

a

F K are the free variables of K F K F K n V

V

Figure The SLDNF Step

X qX Xa Xb

X nqX qX

X rX nqX

XrX Xc

Figure Insoundness of Nonground NF

X qX Xa Xb

X nqX qX

XnqX Xc

Figure Incompleteness of Ground NF

goal could happ en b efore the unication Xc and therefore fail the of groundness

requirement A further obstacle with resp ect to completeness is the inability of

providing a fair choice rule since the toplevel pro of has to wait until the sub ordinate

negation as failure attempt delivers a result

Constructive Negation

Although SLDNF is sucienttointerpret the Event Calculus as a clause pro

gram its completeness has to be improved in order to build the base for the hy

p othetical reasoning that is intro duced in Section This can b e obtained bythe

technique of constructive negation

The basic idea is the extension of the equality maintenance system represented by

substitution and unication to cop e even with inequalities X s and disjunctive

choice due to disunication symmetrical pro cedure disunify to unify to derive

s t Substitution application to a formula is no longer straightforward Whereas

pure equality is obtained by the appropriate variable replacements inequalityhas

to somehow annotate the formula with its implications fF jj X s g Finally

j j

unication must b e able to retain this information for an extended consistency check

as so on as a substitution renders the annotation inconsistent ie the appropriate

equations are satisable for all substitutions the pro cedure fails

SLDCNF

SLDCNF Figure uses these extended mechanisms to resolveeven nonground

negations Correctness is established by the collection of all relevant information

from the nested pro of the conjunctiveinversion of all solution substitutions

y

S



and by further maintenance in the equality system The overall soundness

y

with a consistent solution substitution is obtained by the following lemma

Lemma Malcevs Lemma Given an innite number of atom and function

V

symbols each formula X t is satisable

i

Pro of by induction over the sub formulae and by the innite number of closed

terms that can b e assigned to eachvariable

Sp ecial cases such as the one in Figure no longer dep end on any selection

rule b ecause the groundness restriction is removed Construction of the complete

solution substitution space is not p ossible b ecause s t has in general innitely

many solutions whose enumeration is not practical Thus even a fair choice rule can

no longer guarantee completeness b ecause of the dep endency of the toplevel pro of

on every solution of the sub ordinate negation pro of

SLDNF

The lack fairness intro duced by the nested pro of schemes and the rather com

plex handling of the substitution formulae are reason to present another pro cedure

G sldcnfstepG C

y y x P

G fG G g

x x xo

G selectG G

xj x xo

if

see the appropriate SLD cases

elseif G VK then

xj

id

y

S

 

for sldcnfVKC

P y y

G fG G G G g

y y x xj  xj  xo

end

Figure The SLDCNF Step

VAV D jj V A V D

D E jj D E

VK jj V K

K I jj K I

jj

jj

Figure The De Morgans Laws

SLDNF Figure This algorithm provides an interleaved pro of of negated and

p ositive goals The basic idea for handling negated goals is via equivalence trans

formations based on De Morgans laws Figure If the pro cedure is nally able

to construct the negation normal form that lifts the negation signs to the deep est

level of primitive predicates truth values and equality the result will b e sound as

well as complete The application of the De Morgans laws is trivial except for two

cases

First there is the p ossibility that a substitution renders b oth sub formulae

K and I of a negated conjunction K I equivalent to the simple

translation into K I has several equivalent solutions which needlessly increases

the p ossibilities for backtracking cho osing another branchatachoice p oint The

K I which is still equivalenttoK I b etter approachistocho ose K

but pro duces real disjoint sub formulae

Second the result from De Morgans laws for the negated existentially quanti

ed conjunctions VK with K K V pro duces universal quantication The

pro cedure is not able to cop e with such formulae in innite domains A nite domain

assumption F ab out the lo cal variables of the negated goal delivers the necessary

background theory

fidoX jj V s V s F

 n



XV

fidoX K V VKV jjV K V jj V

F



V X

jj K s K s

F  n

The example in Figure shows the functionality of SLDNF but for sim

plicity the derivation always takes the right choice and we present the results of

several steps in one line Summarising the foregoing explanations it can b e stated

that a fair SLDNF is sound and complete for programs that provide a nite do

main assumption for the variables involved in negated goals A generalisation of the

nite domain assumption to all variables however is not sound b ecause Malcevs

lemma do es no carry over to this case

Ecient Negation in SLDNF

In general SLDNF VK branches exp onentially with the size of the domain

and number of variables But much of the search space is immediately pruned in



most calculi by the expression K K V itself A b etter starting p ointforthe

translation is therefore to distinguish parts K V in which global variables are

g

involved and K V in which only elements of V app ear Restricting the instan

l

V

tiations s s for V to the solutions of V fidoX K V delivers



 n l

XV

K s as the result of the transformation K V couldeven de K s

g n l g 

scrib e some nite domain and therefore suce to ground V ie the nite domain

assumption can b e totally removed

It is not necessary to restrict this improvement to the conjunctive level of K

alone Nested limited expansion of K can further enlarge K and thus the solution

l

space of the lo cal variables But there has to be a sound manner to deal with

disjunctions and negations to obtain lo cal and global sub formulae K and K

l g

develops this technique to its limit by describing a general framework for sound

rewriting rules on arbitrary expansion depths delivering a contour of K

Ab duction SLDA

Abduction has b een prop osed as being a quite dierent inference principle to de

duction It extends the deductive facilities byproviding hyp othetical reasoning that

is esp ecially used in diagnostic systems medical diagnosis fault diagnosis etc

Compared to resolution it aims to nd a set of axioms Ab fV AV

V

Xs g also called facts that enable the program C to imply the goal



P

XV

C Ab j G The easiest wayto extend the resolution step with clauses C to

P

generate this set is to allow the selected goal to serveasan abducibleassumption

hypothesis This is of course not desirable for any literal With no additional struc

tural information the space of p ossible hyp otheses for a certain observation is to o

large to be practically enumerable One therefore takes assumptions from a pre

dened set the abductive predicates selected by the ab ductive function in our

algorithms Once assumptions are collected further goals are also provable by

unication with those already ab duced facts The additional mechanism to the res

olution step is called the abduction step and the actual set of collected ab ducibles

is called abduction set abduction state or residue

An imp ortant question is the treatment of uninstantiated variables in the goal

to ab duce If one treats the result of such an ab duction step as a clause by adding

it to the program C the variables would b e universally quantied which is to o

P

strong In order to preserve correctness either skolem terms have to be inserted

which requires an extended unication algorithm or the assumptions have to be

separated from C and variables are only allowed to app ear quantied as in the

P

pro cedure presented in Figure

What ab out the semantics of the ab ductive predicates Each domain tends to

put certain restrictions on the denoted relations eg reexivity symmetry tran

sitivity or sp ecial structured arguments This is ensured in the pro of pro cedure



K denotes a function that pro duces an expression from its arguments

G sldnf stepG C

y y x P

G fG G g

x x xo

G selectG G

xj x xo

if

see the appropriate SLD cases

elseif G D E then

xj

id

y

G fG G D E G G g

y y x xj  xj  xo

elseif G K I then

xj

id

y

G fG G cho oseK K I G G g

y y x xj  xj  xo

elseif G VK then

xj

id

y

G fG G G G g

y y x xj  xj  xo

forW K variant VK

v v

V

fidoXgC sldnf f



P

XW

v

S

y y

S

G G K

y y y v

elseif G then

xj

id

y

G fG G G G g

y y x xj  xj  xo

elseif G then

xj

fail

elseif G st then

xj

disunifys t

y

G fG G G G g

y y x xj  xj  xo

elseif G As then

xj

C fC C g

P  n

C cho oseC C

i  n

W B W D variant C W

v v v i

unifyG BW

y xj v

G fG G D G G g

y y x xj  v xj  xo

end

Figure The SLDNF Step

a

G fqX Xcg query



C fX qX Y rXY program

P

XY rXY Xa Yag

FiDo X Xa Xc nite domain for negations

G fY rXY Xcg negative resolution



G frXa rXc Xcg FiDo negation



G fXa aa Xc ca Xcg negative resolution



negative conjunction

G fXc ca Xc jj X ag choice disunication



G fXc jj X ag choice disunication



G f jj c ag unication success

a

The underlined goals are chosen by the selection rule for the next expansion step

Figure Example Pro of with SLDNF

G Ab sldastepG Ab C

y y y x x P

G fG G g

x x xo

G selectG G

xj x xo

if G D E then

xj

id

y

G fG G cho oseD E G G g

y y x xj  xj  xo

Ab Ab

y y x

analogue to the appropriate SLD cases

elseif G As then

xj

if ab ductive As then

Ab fAb Ab g

x  q

Ab cho oseAb Ab

k  q

unifyG Ab

y xj k

G fG G G G g

y y x xj  xj  xo

Ab Ab

y y x

or

S

Ab maintainAb G

y y x xj

G fG G G G g

y y x xj  xj  xo

or

C fC C g

P  n

analogue to the appropriate SLD case

end

Figure The SLDA Step

through maintenance maintain of the ab ducibles It is resp onsible for unica

tion consistency checking and the computation of an appropriate completion of the

ab duction set Maintenance can also b e a further source of choice p oints

In a similar way to resolution the soundness of the solution assumptions is

proved by the following invariant

G G j

y y x C Ab

P y

For the whole ab duction pro cess can the b e then stated

m 

C Ab j G

P m

Completeness however is not as easy As we hav e already mentioned it is

inadvisable to take the whole hyp otheses spaces as the base for completeness Thus

we state a least commitment completeness given a fair choice rule that eliminates

the innitely many p ossibilities that do not contribute to the goal in anyway

 

Ab C Ab j G Ab Ab j Ab C G

P P sldaAb

Lo oking at the op erational semantics of ab duction a closed world assumption

is no longer p ossible Incorp orating b oth ab duction and negation is therefore not



trivial as the twointerfere highly

Negation and Ab duction

SLDNFA

At rst sight it may not seem to o dicult to bring the results of the former pro of

principles together One has just to add an ab duction step to SLDNF to obtain

SLDNFA Figure How ever the intro duction of new assumptions has to be

disabled when the pro of is in the negativemodeM aswe are only collecting

p ositive facts

An imp ortant observation follows from investigating the search spaces in the

negativemode Additional ab ducibles could increase these pro of trees and render

previous NF pro ofs incorrect qX qX To circumvent this and to obtain

a sound pro cedure it is necessary to collect the already proved negations N

x

As so on as new assumptions are added in p ositive mo de the members of N have

x

to b e proved again reprove under the current ab duction state More reasonable

behaviour would b e obtained with a selection rule that delays negations until the

ab duction steps are done Again as with SLDNF SLDNFA has limited complete

ness b ecause of the groundness restriction and problems with fairness Furthermore

nested negations do not reenable the collection of new hyp otheses thus not all rel

evant assumptions are generated

SLDCNFA

The same approachworks for extending SLDCNF with ab ductive features to SLD

CNFA Figure Nested negative pro ofs happ en on a static ab duction state and

a consistency check after additional assumptions has to b e carried out to derivefur

ther equalityinequality information Completeness is restricted b ecause the nested

pro of scheme cannot guarantee fairness and the ab duction state is frozen within

sub ordinate pro ofs



Unication indeed is the base of the ab duction step The problems of nonground negation

thus are a sp ecial case of the general interference of negation and ab duction

G N Ab sldnfastepG N Ab C M

y y y y x x x P

G fG G g

x x xo

G selectG G

xj x xo

if G D E then

xj

id

y

G fG G cho oseD E G G g

y y x xj  xj  xo

Ab Ab

y y x

N N

y y x

analogue to the appropriate SLD cases

elseif G As then

xj

if ab ductive As then

analogue to the SLDA case

or

if M then

S

Ab maintainAb G

y y x xj

G fG G G G g

y y x xj  xj  xo

N N

y y x

reprove N Ab C

y y P

or

C fC C g

P  n

analogue to the appropriate SLD case

elseif G VK then

xj

if F K then



V

if sldnfaV KAb C then

x P

fail

else

id

y

G fG G G G g

y y x xj  xj  xy

S

N N fG g

y y x xj

Ab Ab

y y x

else

fail

end

Figure The SLDNFA Step

G N Ab sldcnfastepG N Ab M

y y y y x x x P

G fG G g

x x xo

G selectG G

xj x xo

see the appropriate SLDNFA cases

elseif G As then

xj

if ab ductive As then

seetheappropriate SLDNFA case

if M then

see the appropriate SLDNFA case

reprove N Ab C

y y y P

see the appropriate SLDNFA case

elseif G VK then

xj

id

y

S

 

for sldcnfaVKAb C

x P y y

G fG G G G g

y y x xj  xj  xo

Ab Ab

y y x

S

N N fG g

y y x xj

end

Figure The SLDCNFA Step

SLDNFA

Neither SLDNFA nor SLDCNFA can guarantee completeness of the ab ducibles

due to the frozen ab duction state in nested pro ofs and the lack of fairness Toim

prove this situation we need to intro duce further assumptions in nested negation

pro ofs The interleaved pro of metho d of SLDNF provides a b etter base to include

this into SLDNFA Figure The treatment of p ositive goals handles the addi

tion of new assumptions On the negative side requests ab out the ab duction state

that is ab out negative abductive goals require constructive negation Since the pro

cedure is even able to memorise the structure of the pro of trees a correctness check

following several ab duction steps can b e carried out more easily Only branches that

involve accessing the ab ducibles need to b e revisited instead of reconstructing the

whole tree from scratch Selection rules that prefer p ositive goals to negated ones

further reduce the numb er of restructuring tasks

be sound and SLDNFA is derived from a description that is proved to

complete with resp ect to the least commitment solutions typical in the ab duction

literature The soundness result also holds for SLDNFA whereas overall com

pleteness requires the nite domain assumption from Section and fairness

A more ecient treatment of negation as in SLDNF is also p ossible in the

ab ductive case but with some sp ecial considerations Those parts of the goal that

migrate into the nite domain enumeration are restricted not to change the ab

duction state Ab ductive parts should reside outside and thus contribute to the

constructive result of the negated goal pro of

G N Ab sldnfa stepG N Ab C

y y y y x x x P

analogue to the appropriate SLDA cases

elseif G As then

xj

if ab ductiveAs then

analogue to the appropriate SLDA case

Ab Ab

y y x

N N

y y x

or

S

Ab maintainAb G

y y x xj

G fG G G G g

y y x xj  xj  xo

N N

y y x

Ab reprove N Ab C

y y y y P

or

C fC C g

P  n

analogue to the appropriate SLDNF cases

elseif G VK then

xj

id

y

G fG G G G g

y y x xj  xj  xo

forW K variant VK

v v

V

f g sldnfa fidoXAb C



x P

XV

S

y y

S

G G K

y y y v

S

N N G

y y x xj

analogue to the appropriate SLDNF cases

elseif G As then

xj

if ab ductiveAs then

id

y

S

forAb Ab disunifyG Ab

k x xj k y y

G fG G G G g

y y x xj  xj  xo

Ab Ab

y y x

N N

y y x

or

C fC C g

P  n

analogue to the appropriate SLDNF cases

end

Figure The SLDNFA Step

Remarks

That the complexity of theorem proving problem is NPhard tells us that there

will b e no general nonscalar improvement in the pro of pro cedures applicable to all

queries A ma jor reduction of the amountofsearch can therefore only b e obtained

with inputdep endent guide rules heuristics

Whereas in the resolution case heuristics are equivalent to dynamic control of

choice p oints ab duction needs a similar but extended notion A general strategy

is to rst check the goal for unication with already assumed hyp otheses and only

later consider adding to the ab duction set Ob eying this principle a pro of will

derive minimal ab duction sets which in turn usually reduces the pro of complexity

Furthermore the order of goal comparison within the current ab duction state should

be dep endent on the program and is often the ma jor key to eciency as in the

case of the Event Calculus see section There are also environments that

require further choice in the maintenance of the ab duction set which should b e also

b e amenable to heuristic guidance

A close insp ection of the control ow through the ab duction steps can also b e

arewarding activity Dep ending on the kind of calculus and the relations denoted

by the ab ductive predicates the resource hungry consistency check of negated goals

is not always necessary EVEs Event Calculi are examples of this and some of

those checks may b e left out see Section

Summary

From resolution negation as failure constructive negation and ab duction wehave

derived in this section a sound pro of pro cedure SLDNFA which is complete at

least for the case of nite universe negation fair choice rules and least commitment

of hyp otheses After the presenting of the expansion steps of all the algorithms

we discussed in detail the imp ortant practical problems that all these pro cedures

are faced with b esides the theoretical questions of soundness and completeness

Although SLDNFA is generally restricted to nite universe negation we have

demonstrated a more ecient handling of negation for most calculi

The Event Calculus under SLDNFA

The SLDNFA pro cedure presented ab ove that supp orts resolution negation and

ab duction can b e used for the interpretation pro of with the Event Calculus

in order to solve the planning problems describ ed in Section The following

discussion fo cusses on the basic questions arise bringing the clause program and the

theorem pro of pro cedure together

Planning by Theorem Proving

Plan Analysis and Evaluation

From the ab ove results regarding theorem proving together with our formulations

of the Event Calculus EC the realisation of plan analysis and evaluation using

resolution and negation in SLDNF would seem to be easy Given an axioma

tisation of the planning domain DOM describing preconditions and eects of the

existing action typ es via posprecondition negprecondition initiates

able to compute the overall prop erties that plan and terminates one is now

Plan consisting of happens actand before establishes at a certain p oint

in time

Plan Dom EC Goal

SLDNF

Goal holdsPT

A query with an uninstantiated prop erty P requests the answer substitutions

that give a complete overview of the implicit situation at time point T Partially

instantiated prop erties P are evaluation requests ie one would liketoknow whether

there is an instantiation of prop erty term that holds at time point T Section

describ es how to intro duce a socalled dummy event that represents the o verall

end of each plan and usually is used to bind T to get the overall eects

Due to the threelevel architecture using a theory of time and action and a theo

rem pro of pro cedure the soundness and completeness results dep end on a combina

tion of the individual requirements of each of those layers Whereas the concept of a

solution plan is determined by the plan execution mo del on which the appropriate

version of the Event Calculus relies the nite domain assumption for negations

on the SLDNF level imp oses limits at a more theoretical level see Section

Regarding the axiomatisation of the calculus nite domain negation requires a nite

numb er of action typ es their conditions and the plan steps and thus nite plans

Finally fair handling of choice p oints Section is also required to establish plan

and prop erty soundnesscompleteness at the top layer

Plan Synthesis and Mo dication

The harder problem of plan synthesis and mo dication can be achieved with an

ab ductive pro of pro cedure

Dom EC Plan Goal

i

SLDNFA P lan

a

Goal holdsP T holdsP T holdsP T

    n n

S

T o construct a complete plan Plan Plan Plan from an initial ab duction

i a

set Plan one has to intro duce ab ductive predicates that are able to extend the

i

plan Plan Section The choice rule has to b e extended supp orting ecient

a

ab duction and maintenance of hyp otheses Section Finally a closer insp ection

of the nonmonotonic interference within the pro of reveals several opp ortunities for

customising SLDNFA to save unnecessary computation Sections and

Dep ending on the number of predened assumptions the planning task re

sides somewhere between pure plan synthesis Plan and plan mo dication

i

Plan This is only approximately exact as the start event that describ es

i

the initial situation should be intro duced in either case by the planning domain

denition and the initial ab duction set Section

Bearing in mind the statements ab out SLDNFA from Section the require

ments of Section for fairness nite plans nitely many action typ es and

nitely man y conditions also hold in the case of plan synthesis The following equa

tion can b e established for the overall planning pro cedure

Plan Dom EC Goal

SLDNF

 

Plan Plan j Plan Dom EC Goal

SLDNFA P lan

On the one hand this guarantees soundness with resp ect to the solutions of the



appropriate Event Calculus version Plan Plan On the other hand

the least commitment of the ab duction principle leads to a sp ecial form of plan

completeness Each reasonable extension to an ab duced plan that do es not destroy

its sp ecial structure with resp ect to the goal can also form a solution This is no

restriction since in general these extensions that are not relevant for obtaining the

goal anyway As in the general setting dropping least commitment requirementonly

leads to unwanted solutions

Ab ductiv e Predicates and their Maintenance

Enabling ab ductive facilities within the logical execution of the Event Calcu

lus requires some considerations with regard to ab ductive predicates and their

semantics As we mentioned ab ove a plan in the Event Calculus consists of the

predicates happens actand beforeThus they also serve as ab ducibles

for plan synthesis purp oses

happensa unary predicate requires no sp ecial maintenance It do es not

need to be restricted in any way Due to the denition of the calculus it

contains either unique event constants or terms involving only existentially

quantied variables

ent as its primary argumentintro duced with act is restricted to havea ev

happens and a term that describ es an action typ e with its roles as its

second argument The denoted relation should is functional ie eachevent

is only allowed to have one action typ e asso ciated with it Note that act

should not b e resp onsible for intro ducing a concrete typ e for an event This

is achieved by later unications eg in a postcondition axiom with the

existentially quantied typ e as an argument see Section

before has time p oints related to existing events as both of its argu

ments The denoted relation is antisymmetric and transitive The best way

to maintain this predicate is by the calculation of the transitive closure

and failure on the detection of inconsistent assumptions A default fact

that has to be included for each event E intro duced by happensE is be

forestartEendE

Furthermore the initial situation is incorp orated into the planning prob

lem by representing it as an event The domain Dom is resp onsible for



dening a sp ecial action typ e initial that always succeeds b ecause of

empty preconditions and initiates the appropriate facts The ab duction set

is initialised with some default event and the facts happensinitial



actinitialinitial beforestartinitialendinitial As so on as

happensE is ab duced ab duction maintenance is extended by a further default

fact beforeendinitialstartE

A similar metho d can b e used to intro duce an explicit time p oint for the implicit

end of the plan that is commonly needed to request information ab out the over



all eects The appropriate dummyevent and its action typ e are called endend

The typ e needs neither preconditions nor eects as it only serves as an argument

for start in holds Again the maintenance of before requires a default

assumption for eachintro duced event E beforeendEstartend

Treatment of Negations

Sections and demonstrated how to improvethe treatment of negation in

order to save search space while enumerating a nite domain over lo cal variables

The Event Calculus is a p erfect example whichprovides the ability to put some

subgoals into the enumeration part of SLDNF and SLDNFA Thiseven works

for all p ossibly negated goals with lo cal variables for simplicity we have chosen

to present them b efore the next resolution step o ccurs and exp oses the quantied

expression

failsEThelocalvariable Ty is uniquely determined by actETy P is

memb er of the preconditions of Ty act as well as precondition can b e

moved into the enumeration part if nitely many action typ es and nitely

many conditions are preserved

clippedPTpTp EC as the destroyer of p ersistence can only b e an al

ready ab duced event happensE spawns the appropriate searchspace and

migrates into the nite domain enumeration assuming that there are nitely

many plan steps The other goals terminates fails and out

should remain in the global part of the goal b ecause they either involve global

variables or are able to intro duce new hyp otheses

holdsPTp E as the destroyer of P is member of the ab duced events

The transformation and the corresp onding requirements are similar to the

preceding case

SLDRule Choice Points and Heuristics

Though fairness of the choice rule is sucient to obtain sound and relatively com

plete planning pro cedures from the combination of the Event Calculus and

SLDNFA eciency with resp ect to p erformance and optimal solutions is only

established if the choice and selection rules are further restricted

As it can b e seen from the formulation of the Event Calculus and the def

inition of its ab ductive predicates expanding the calculus in a depthrst manner

in b oth the selection and choice rules is easy to implement and well suited to the

problem Instantiations o ccur in a reasonable fashion according to the selection rule

esp ecially for negated subgoals The complex treatment of negation and the main

tenance of the ab duction set are simple There are however some opp ortunities to

vary the pure depthrst approach to guarantee fairness and incorp orate heuristics

One imp ortant place to explore fair b ehaviour is the treatment of recursion due

to failsBoth the simple as well as the extended Event Calculus of EVE

are designed to ensure termination on a static ab duction set But if ab duction is

switched on a depthrst metho d for selection as well choice yields innite com

putations dep ending on the particular planning domain axiomatisation and goal

eg in the case of several actions that serveasmutual precondition initiators This

is of course not fair and certainly do es not pro duce a complete solution plan set

The iterative deepening approach which p ostulates a pro of depth limit that is

increased after covering the complete search space at a certain depth is most ap

propriate here Compared to the usual b ounding measure of absolute pro of depth

ab duction in the case of the Event Calculus allows an even smarter b ound the

numberofyet ab duced events by happens Besides fairness and thus complete

ness relative to the denition of EVEs calculi this measure is also resp onsible for



yielding optimal plans with the fewest steps Even with minimal and maximal

limits EVE is able to implement correct solution management

Heuristic knowledge however must also b e applied at imp ortantchoice p oints

and the ab ductive steps Whereas plan analysis alwa ys tries to explore all the ex

isting pro of paths to get an overview ab out an implicit situation and thus demands

no extensive use of heuristics synthesis is faced with the far more complex task of

generating the right action at the right place and requires the b est p ossible guidance

in order to reach its solution fast and eciently

The Event Calculus incorp orates three dierent places to inuence depth

rst choice towards a more ecient b ehaviour

Choice between a new ab ducible and a match with the already

collected assumptions a general rule is to rst check existing hyp otheses

Since complexity increases with additional hyp otheses the ab duction step has

to resp ect this order extended least commitment

Choice of ab ducibles to match the goal with Finding a goalinitiating

event is best done by accessing the start situation and the already present

events rst The solution plans stay minimal b ecause it will b e not necessary

to havea largenumber of events b eside the knowledge base but only if the

environment is suitable

Choice of action typ e asso ciations Cho osing a typ e for a certain eventis

b est not done until there are certain prop erty requirements eg postcon



dition In this case the disjunctions intro duced by the domain axioma

tisation are a factor that can b e inuenced by domaindep endent heuristics

Considerations here involve exploration of more abstract dep endencies in the

conditions of actions than the calculus alone is able nd by complex execution

The heuristics are preferences or lters on action typ es with resp ect to the

actual goal and the ab duction state As EVE do es not provide any explicit

cost sp ecication in the actions itself these guidelines havetotake accountof

weight of the actions implicitly

Execution of the Simple Event Calculus of EVE

Omitting the success check in the p ersistence axiom Figure has b esides guar

anteeing termination a further side eect on the b ehaviour of the pro of pro cedure

The basic prop erties of the axioms that are involved in this observation can be

stated as follows

clipped no longer dep ends on a fails subgoal



the currentversion of EVE do es not provide explicit sp ecication of the cost of actions see

Section for a discussion



In fact this renders the planning pro cedure goaldriven and is thus an instance of backward

planning

fails therefore only o ccurs in the negativemodeasasubgoalof holds

holds Nested negated holds subgoals within fails turn positive

again and preserve the invariant

clipped also only app ears negated by the same invariant

holds and fails as already proved goals will stay correct as long as their

clipped subgoals remain so

clipped as a negated goal can only intro duce out as a p ositive subgoal

This leads to a lemma that reveals the p ositive eect of EVEs simple theory of

time and action on the pro of pro cedure

Lemma Any SLDrule in SLDNFA with a fair treatment of choice points

that prefers fails selection to clipped wil l by executing the simple Event

Calculus of EVE and without any consistency check of already elaboratednegated

goals result in a planning procedure that is sound with respect to the worst case

assumption about failed events and strong nonlinearity Completeness is restricted

to least commitment nite plans nitely many action types and nitely many action

typeconditions

Pro of As completeness is not aected by omitting the rep eated consistency pro ofs

of negated goals we are fo cussing on soundness Assume that a pro of of the pro

cedure succeeded and regard the collected negated goals whose expansion involves

the ab duction state other negated goals are not aected by later ab duction steps

and remain correct These are only of typ e fails and clipped Observation

shows that general soundness only dep ends on the correctness of the clipped

parts As so on as some negated clipped goal is selected there is no p ossibility

of selecting any further fails goals later This is due to observation and the

restriction on selection rule From this stage on additional ab ductions inserted into

the ab duction state can therefore only b e of typ e before due to and and thus

only extend the knowledge ab out the transitive antisymmetric ordering of events

No further events are intro duced into the solution plan Supp ose nowencoun ter a

negated clipped goal to b e proved any further extension of the temp oral relation

between the known events will not destroythis p ersistence anymore since out

has already considered all p ossible destroyers of the wanted prop ertyby reasoning

over all p ossible linearisations

This planning pro cedure delivers an algorithm also found in traditional ap

proaches to nonlinear planning one rst expands the plan to match goals and

preconditions later one nds conicts and resolves them The advantage of the

logicbased version however is the additional capability to realise plan analysis

evaluation and mo dication gained by the exibility of theorem proving Axiomati

sations are furthermore much easier to extend than xed pro cedural approac hes

the intended research with resp ect to event duration and conditions Section

is an example for this

Execution of the Extended Event Calculus of EVE

The basic prop erty that allows a simplied pro of pro cedure in the case of EVEs

simple calculus the indep endence of clipped from fails do es not hold in the

extended version Possible p ositive o ccurrences of fails and clipped goals

trigger ab duction steps that intentionally destroy some p ersistence Correctness of

already proved negated goals is therefore not selfevident the consistency check

is required o ccur

Close investigation of the general b ehaviour now reveals ineciencyEvents E

that are recognised as initiators for a prop erty P to hold could destroy another

p ersistence PE The attempt to yield PE via failure of E spawns a searchspace

that is condemned to fail a priori as the p ersistence from E to P dep ends on the

success of E Unrestricted ab duction therefore leads to unnecessary computation If

the pro of pro cedure could predict the events E that will form the basis of p ersistence

checks it would at least b e p ossible to disable ab duction in p ositive failsE goals

Only events that are not in use p erhaps within a mo dication task are tried for

failure in this case

If the recognition of failure is alone sucient ab duction could be generally

disabled within the expansion of p ositive fails goals A similar situation as in

the simple calculus version arises

holds and negated fails goals as already proved stay correct as long as

the negated clipped subgoals remain so

clipped can only intro duce ab ductions by its out subgoal

Lemma Any SLDrule in SLDNFA with fair treatment of choicepoints that

prefers negated fails selection to negated clipped wil l by executing the ex

tended Event Calculus of EVE without any consistency check of elaborated

negated goals and restricting additional abductions not to happen within the sub

goals of positive fails result in a sound plan procedure with respect to strong

nonlinearity Completeness is restricted to least commitment nite plans nitely

many action types nitely many action typeconditions and only the recognition of

failed events

Pro of The argumentis similar to that in the simple calculus case b ecause of

Positive fails and thus clipped goals can only o ccur during elab oration of

negated clipped after all the negated fails goals are expanded Due to the

restricted ab duction then there is no p ossibility of intro ducing new events

Only the before relation can b e further sp ecied and will not destroy the proved

clipped negations and their subgoals b ecause of the treatment of incomplete

temp oral knowledge by out in the p ersistence axiom

Completeness is of course restricted to pure event failure recognition More so

lution plans can only be reached with the general ab duction pro cedure Another

approach dealing with the improvementof the problems of p ersistence is mainte

nance See Section for its denition and p ersp ectives

Summary

Execution of the Event Calculus with SLDNFA demands certain customisa

tion of the ab duction step and the SLDrules eg the denition of ab ductive predi

cates fairness by depthrst expansion and iterative deep ening extended least com

mitment and reasonable defaults Besides incorp orating domaindep endent heuris

tics EVEs sp ecial versions of the calculus furthermore allow simplication of the

pro of pro cedure with resp ect to interference b etween ab duction and negation Based

on the treatmentofevent failure the results are planning pro cedures with dierent

classes of solution plan

SLDNFA by Constraint Logic Programming

EVEs integration of layer the Event Calculus and the SLDNFA pro ce

dure into its implementation platform Oz is more sophisticated than just building

the theorem pro of pro cedure and relevant data structures scratch Wehave instead

chosen to tie this logical framework closely to the higherorder constraintbased

setting of the Oz calculus This is realised through transformation functions that

convert clausebased logic programs suchastheEvent Calculus into constraint

expressions such that when interpreted with the machinery of the Oz calculus

they pro duce a sound SLDNFA pro of pro cedure that is complete for nite uni

verse negation and fair treatmentofchoice p oints This section intro duces the basic

language constructs with their informal semantics and then incrementally describ es

how the pro of principles underlying SLDNFA are preserved in the translation

The Oz calculus

A new generation of programming languages have b een develop ed in the last decade

These constraint logic programming CLP languages mainly fo cus on bringing

logical approaches to the rest of the programming world by combining stateofthe

art paradigms into its framework without lo osing the great expressivity of logic

An example of such a constraint language is Oz develop ed at the Programming

System Lab at the Universitat des Saarlandes headed by Gert Smolka The

corresp onding constraint machine DFKI Oz

explores the whole CLP suite

ecient rational unication st

records lists numbers etc are supp orted

conjunction E E

 

conditional if G then E else E fi

 

local variables local V in E end

computation spaces a hierarchyof constraint stores allows information

inheritance from ro ot to leaves

ask no inconsistent state of the toplevel computation space

abstraction predicates procA V E end



and extends it with features still uncommon in logic languages

concurrencythreads susp ensionresume of computations

declarative as well as functional programming style funjjproc cel ls

mo del state

ob ject orientation state and metho ds Object methodV

Finallyiteven intro duces handling of

disjunctions or E E ro on the top level restricted to real dis

 

joint decidable situations as w ell as in

encapsulatedsearchprovides a variety of search strategies Disjunctive

constraints are applied by cloning the appropriate computation space and

distributing the sub constraints to the siblings Firstclass computation

spaces make the results manageable from the upp er level

Besides the CLP systems having a clean logical semantics making them suitable

for program verication the following delib erations represent reasons to use Oz as

the implementation base for EVE

Strong nonlinear planning is only of use if the linearisation happ ens as late

as p ossible in the execution scheme if necessary at all Concurrency supp orts

simple and natural execution mechanisms in this resp ect

The constraintbased platform do es not require exp ensive implementation of

logical data structures as the translation functions b elowshow

Concurrent comp eting planning tasks give the system more exible reactive

behaviour

Ob ject orientation is the basic key for structured mo dular programming In

EVEit serves to mo del a transparent representation of actions plans and

planning services

The agent mo del InteRRaP which provides EVEs main application

Section has b een p orted to Oz Such agentoriented and reactive

approaches require

the mo dularityofobjectorientation

the reactiv eness of concurrencyand

fair and controllable resource scheduling

Resolution in Oz

As just presented the Oz calculus already provides treatment of conjunctions at

the top level disjunctions by encapsulated search and even CET RAT equality

Thus the transformation from C clauses into Ozconstraints is straightforward See



the translation scheme T in Figure



Wehave already mentioned that wewould like to takeasmuchadvantage of the

host language as p ossible Clauses are therefore directly translated into appropri

ate Ozabstractions by replacing conjunctions disjunctions and equality assertions

by their immediate constraintbased equivalent Universal quantication of clauses

is implicitly represented by the concept of abstraction each application of an ab

straction the constraintbased replacement of the resolution step pro duces fresh

parameters local pro duces a variant of its scop e Because encapsulated searchre

quires the use of unary queries in order to propagate solutions back to the top level

weallowfreevariables F D in the b o dy of a query These are implicitly existen

tially quantied and mapp ed to the ro ot variable Sol A depthrst allsolutions

pro of of the resulting Oz program can then b e computed by applying the predened

abstraction Solvealleager

ForAll Solvealleager Query

proc solvedSol Browse Sol end

Of course a translated version is more restricted than the general SLD case the

selection rule and choice p oint preference dep end on the order in which Oz treats

new conjunctions and disjunctions Hence the execution of conjunctions can b e re



garded as b eing concurrent with preference given to a depthrst userpredened



For each translation function T on typ e s there exists a homomorphous extension T with

is is

T s T sand the sequencingconjunctive op eration on s

ss

is is



This holds true for the reduction strategy of Oz x As the current developmentversion of

the abstract machine adopts a sequential strategy with threading on demand the b ehaviour of

the translated calculi changes accordingly

T T X X

V V

T T a a

A A

T T As T A T s

s s A s

T A T A

s A

T V T V

s V

T T As A T s

P P s

T st T sT t

P s s

T true

P

T false

P

T T K I T K T I

K K K K

T P T P

K P

T T D E or T D

D D D

T E

D

ro

T VK local T V in

D V

T K

K

end

T T

 C

T VAV D declare



procA T V

V

T D

D

end

T D declare



procQuery Sol

T F D

V

in

SolT F D

V

T D

D

end

Figure Translation Scheme T Resolution



T T D E or T D

  

D D D

T E



D

ro

T VK local T V in



V

D

T K

K

end

T VK Solveonedepth



D

proc

T V in

V

T K

K

end

failed

T T





C

T VAV D declare



procA T V

V

T D



 D

end

T D declare



procQuery Sol

T F D

V

in

SolT F D

V

T D



D

end

Figure T Negation As Failure



order Disjunctions create choice p oints which are expanded as the driver pro cedure

for the search pro cess Solvealleager in the example ab ove constructs the lo cal

computation spaces

In spite of the loss of global control we have gained a lot ecient rational

unication concurrency and the p ossibility of including the full computational

power of Oz into the problem sp ecication Wearenow able to use logical as well

as functional approaches even conditional expressions and therefore suspensions

are allowed a metho d to reestablish inuence over the data ow in the calculus

Negation As Failure in Oz

Following the list pro of pro cedures in Section the next extension is to deal with

fo cus rstorder formulae in general by the intro duction of negation Let us rst

on the notion of negation as failure and SLDNFAs in most implementations a

negated goal pro of recursively calls the pro of pro cedure and inverts the success

failure result In scheme T Figure we have accomplished this behaviour by



starting another encapsulated search within the current one The application of

Solveonedepth Q failed only succeeds if the nested depthrst and one

solution pro of of the abstraction Q fails Note that the symbol in Figure rep

resents the return value of the actual proc expression b ound to the abstraction to

negate pro duces an anonymous fresh variable

The groundness restriction is implicitly realized bythe Oz co de as the Solve

Combinatorthe basic predicate that underlies eachsearch pro cedure returns in

the case of a nonground negated call a stable computation space S stableS

signfying that the information within the space hierarchy is not sucient to guar

antee correct distribution Thus the unication with failed will fail

Constructive Negation in Oz

First attempts to circumvent the groundness condition on negations by just delaying

them until the end of the p ositive pro of did not succeed b ecause of the concurrent



environment Whether a variable will ever be instantiated cannot be predicted

in the Oz calculus Furthermore when going over to ab duction a switchbetween

p ositive and negative goals has to be done without central control This pro of

mo de information and the corresp onding implications have to handled lo cally by

the translation pro cess

To avoid the completeness problems of pure negation as failure we prop ose

the use of constructive negation as in SLDNF The best wayto handle this in

constraintbased technique is by compiling two logically inverted versions of each

clause Allowing the negation normal form requires the translation to intro duce

inequality constraints

Within Oz which regards constraints as actors on a blackb oard inequality

maintenance follows from unication if XY then false else true fiAssoon

as the guard XY is entailed the conditional could re thus rendering the current

computation space inconsistentfalse Disentailment just removes the actor from

the blackb oard true which is correct since the Oz calculus only allows further

monotonic extensions to the computation space

In translating the negation normal form we apply De Morgans as describ ed in

Section Thus for the sp ecial cases K I b ecomes K K I to pro duce

disjoint solutions The translation also intro duces the nite domain assumption F

to handle universal quantication see Section

The only task that nested encapsulated search still has to p erform is enumer

ation of the nite domain over the lo cal variables s s These substitutions

 n

are applied to K and build the new conjunctive goal to be further expanded

Scheme T Figures uses this technique given an appropriate unary Oz





abstraction FiDo for the domain enumeration

The more ecient treatment of negation that we prop ose for SLDNF Section

can b e also applied to the translation scheme T The parts of the negated



that only dep end on the lo cal variables V K could b e moved into the goal VK

l

nested encapsulated search that enumerates the nite domain The general lo ok

ahead technique mentioned in Section however is not p ossible b ecause this

requires full access to the content of abstractions Without this meta programming

supp ort our eort is only able to p erform a much simpler precomputation during

translation

Ab duction in Oz

Wenow describ e the fullyedged SLDNFA translation The rst extension to the

framework presented so far is the basic functionality of the ab duction step included

in the MetaAbduction predicate Figure to which the general requests will b e

mapp ed to using term expressions Rememb er that the separation of clauses from

the ab duction set has the advantage of avoiding skolemisation and allows us to

This would b e equivalent to a selection rule that prefers p ositivetonegative goals



Wechose this rather canine name b ecause FD was already taken by predened pro cedures in

Oz

T T





C

T VAV D declare



proc A T V M

V

case M of positive then

T D



D

negative then



T D



D

end

end

T D declare



proc Query Sol

T F D

V

in

SolT F D

V

T D



D

end

Figure T Constructive Negation



T T As A T s positive

s

P P

T st T sT t

s s

P

T true

P

false T

P

T T K I T K T I

K K K K

T P T P

K P

T T D E or T D

  

D D D

T E



D

ro

VK local T V in T

V



D

T K

K

end

T VK ForAll



D

Solvealleager

proc T V

V

FiDo T X



V

XV

end

proc solvedS

T V S in

V



T K

K

end

Constructive Negation Figure T



 

T T As A T s negative

s

P P



T st if T sT t

s s

P

then false

else true fi



T false

P



true T

P

  

T T K I or T K

K K K



T K T I

K K

ro

 

P P T T

P K

   

E D T D E T T T

   

D D D D



T VK ForAll



D

Solvealleager

proc T V

V

FiDo T X



V

XV

end

proc solvedS

T V S in

V



T K

K

end



T VK local T V in

V



D

K T

K

end



Figure T Constructive Negation



procMemberDisj Term List

case List of HeadTail

then or TermHead

MemberDisj Term Tail ro

else false

end

end

procMetaAbduction Term Mode AI AO

case Mode

of positive then

or MemberDisj Term AI

AOAI

Maintain TermAI AO ro

negative then

ForAll AI proc A

if TermA then false

else true fi

end

AIAO

end

end

Figure The MetaAbduction Predicate

rely totally on existential quantication The Maintain predicate is resp onsible for

the ab duction maintenance as well as the check for ab ducibility of goals this is

a simplication of the ab duction pro cedures in Sections and a bit The

Addition of new assumptions has to b e restricted to the positive mo de

The full constructive translation scheme extending T with ab duction capabili



ties and implementing the full SLDNFA including the mapping of the ab duction

step to the MetaAbduction predicate is given by T see Figures A sp e



cial technique however remains to b e describ ed the consistency check of negated

goals with resp ect to ab ductionnegation interference As the structure of the pro of

is not collected and thus no ecientcheckis p ossible negated goals are rst col

lected as abstractions and delayed as long as possible to decrease the amount of

checking Whereas a delay with resp ect to variable assignments is not p ossible for

reasons given ab ove the propagation of the ab ducibles creates some linearisation in

the calculus and allows a delay with resp ect to accesses to the ab duction set The

result is several pro of stages that are managed by the driver function in Figure

Stableness of the ab ducibles and the collected negated goals signies success

The techniques for ecient negation of T are also applicable to T but follow

 

the considerations of Section Whenever there are subgoals that involv e only

lo cal variables but contribute to the ab duction result they have to reside in the

global part of the translation

Remarks

As can be seen from the translation schemes the selection rule and the choice

point preferences dep end on the constraint solving mechanisms By intro ducing

ab ductive control ow the userpredened order of the applications is for the most

part resp onsible for the conjunctive b ehaviour of ab ductive predicates That this is

not entirely the case is due to the concurrent setting a susp ension only o ccurs if

a decision ab out disentailment has to b e delayed Such susp ensions can however

T T





C

T VAV D procA T V M NC AI AO

 V

case M of positive then

or

MetaAbduction T aV M AI AO

s

NCnil

T D NC AI AO



D

ro

negative then

A

in

MetaAbduction T aV M AI A

s



T D NC A AO



D

end

end

T D procQuery Sol NC AI AO



T F D in

V

SolT F D

V

T D NC AI AO



D

end

Figure T Ab duction



b e made explicit using conditionals checking for determinance if Det Var then

Exp fi indexDet The susp ension o ccurs until the appropriate variable Var is b ound

and the conditional will then free the delayed constraint Exp

Closely related to synchronisation is the question of heuristics The xed con



straint solver rule is not suited for dynamic choice point preference The only

place where the ab duction scheme T is in general able to directly inuence any



choice order is in the MetaAbduction predicate

As minimality of the ab ducibles is one condition required of ab duction the

addition of new ab ducibles has b een placed in the second disjunctivechoice after

unication with already assumed literals This is of course can only b e guaranteed

if exactly this disjunction is solved in a depthrst manner which dep ends on the

encapsulated searchdriver used

Some control from within the lo cal computation spaces inuences the order of

unication with curren thyp otheses It works by reordering the appropriate ab duc

tion state represented in our schemes by a list b efore applying MemberDisj Real

pruning of the search space is obtained by omitting some of these assumptions

This is of course only sound in positive mo de The metho d could b e extended to

arbitrary imp ortantchoice p oints that can b e guided by accessible data structures

to install a broad opp ortunity for heuristics

Recent research however has revealed some quite close relations b etween con

straint logic programming and the concept of ab duction Section tries to explain

the main ideas that could lead to improved translation functions



The encapsulated search is of course inuenced bythedriver function but there is no intro

sp ection into the computation spaces from the upp er level or at least what introsp ection there is

is very exp ensive

T T As N AI AO A T s positive N AI AO

s

P P

T st N AI AO T sT t Nnil AIAO

s s

P

T N AI AO true Nnil AIAO

P

T N AI AO false Nnil AIAO

P

T T K I N AI AO local A N N in

K K

T K N AI A T I N A AO

K K

Append N N N

end

T P N AI AO T P N AI AO

K P

T T D E N AI AO or T D N AI AO

  

D D D

T E N AI AO



D

ro

T VKN AI AO local T V in

V



D

K N AI AO T

K

end

T VKN AI AO Nproc N A A



D

NMap

Solvealleager

proc T V

V

FiDo T X



V

XV

end

fun solvedS

proc N AI AO

T V S in

V



T K N AI AO

K

end

end

AA

end AIAO

Figure T Ab duction



 

T T As N AI AO A T s negative N AI AO

s

P P



T st N AI AO if T sT t

s s

P

then false

else true fi

Nnil AIAO



T N AI AO false Nnil AIAO

P



T N AI AO true Nnil AIAO

P

  

T T K I N AI AO or T K N AI AO

K K K

A N N in



T K N AI A T I N A AO

K K

Append N N N

ro

 

T P N AI AO T P N AI AO

K P

 

T T D E N AI AO local A N N in

 

D D

 

T D N AI A T E N A AO

 

D D

Append N N N

end



T VKN AI AO Nproc N A A



D

NMap

Solvealleager

proc T V

V

FiDo T X



V

mboxX V

end

fun solvedS

proc N AI AO

T V S in

V



T K N AI AO

K

end

AA

end AIAO



T VKN AI AO local T V in

V



D

T K N AI AO

K

end



Figure T Ab duction



procDriver X Q AI AO

A N

in

Q X N AI A

Expand N A A

end

procExpand N AI AO

NO A

in

FoldL N

proc NA N NA

N negative N A A

NAppend N N

end

NAI NOA

if NON AA then

AOAI

else

Expand NO A A

fi

end

Figure Driver for Scheme T



Summary

With the implementation platform Oz that is highly suited to nonlinear declar

ative planning within multiagent domains we have shown that it is p ossible to

realize theorem proving facilities in a constraintbased setting providing abstrac

tion and encapsulated search The translation schemes presented cover not only

basic resolution and negation principles but also ab duction They solve soundness

and completeness problems in SLDresolution SLDNF and SLDNFA using a

lo cal rewriting approachthatallows execution bythe Oz abstract machine without

any further control General heuristics that serve as dynamic guides to the choice

rule are not immediately aected by these transformation schemes The ab duction

step however can b e controlled in several ways and serves as an example of how

to inuence the search pro cess from within the computation spaces

The ConstraintBased Event Calculus

The search pro cedure underlying EVE is not just the result of a plain transfor

mation like those presented in Section Besides additional techniques to inuence

the behaviour of the calculus it is necessary to handle the ob ject representation

provided by EVE see Section

MetaProgramming

In Section we p ointed out that meta programming facilities in CLP are necessary

to achieve ecient negation pro ofswith or without the nite domain restriction But

there is another reason to use an extended treatment of constraint it is p ossible to

control choices made in constraint solving

In EVE a rst attempt towards structuring of conjunctions was implemented

Again the basic technique is abstraction and the idea is based on collecting and

delaying negated subgoals in T



procClause Vars PosSubGoals NegSubGoals CriticalNegSubGoals A

PosSubGoalsMetaSubGo al VarsMetaSubGoali Varsnil

NegSubGoalsMetaSubGoalj Varsnil

CriticalNegSubGoalsMetaSubGoalk Varsnil

end

funMetaClause Vars

proc A

Clause Vars AI AO

end

end

Instead of directly exp osing subgoals to the underlying constraint calculus this

new scheme abstracts them using metalevel pro cedures MetaClause A are addi

tional parameters including the ab duction state propagation Besides p ositiveand

negative subgoals a more ab ductionaware technique also marks the negations that

may b e aected by further ab duction steps CriticalNegSubGoals those involv

ing negative ab ductive goals and separates them from other goals that either are

not aected by ab duction or that are subgoals of such marked abstractions and are

therefore considered while checking the parents for correctness An extended driver

pro cedure with the ability to select the next goal to solveisnow necessary for the

execution Researchtowards sp ecial purp ose complete meta programming facilities

is not the main aim of EVE since in anyevent the underlying Oz system can b e

relied up on to incorparate the latest techniques in constraint logic programming

Heuristics

The control over the conjunction elab oration by using abstractions as just pre

sented enables the incorp oration of selection rules As stated in Section how

ever an approximate depthrst approach for selection and choice in a b ounded

search is fully sucient for the purp oses of the Event Calculus Exceptions are

the choice p oints that are intro duced by ab duction and the domain description that

could b e used to incorp orate heuristics

Whenever the ab duction state or the content of the domain sp ecication is

accessed Eve allows these guiding pro cedures to help The approach is implemented

within the search pro cess since introsp ection into computation spaces from the

upp er level is exp ensive Thus heuristics turn out to b e listrestructuring pro cedures input state methods addEvent() setEvent() setBefore() Abduction getAllEvents() Step getEvent() getAllAfter()

output state

Figure Ob jectOriented Ab duction

that are propagated into the search for planning The lists constructed in this way

later servetospawn some p ortion of the search tree the default heuristic is thus

the identity pro cedure Deleting elements from lists results in pruning of the search

space To enable reasonably informed planning contextual information suchasthe

lo cation of the choice p oint the ab duction state the current goal and the state of

the knowledge base are passed to the heuristic pro cedures

Ob jectOriented Ab duction

The capability of EVEs constraint platform Oz of bringing logic programming

and ob ject orientation together also inuences the implementation of the ab duction

step in EVE A listbased representation of ab ducibles is not only hard to maintain

and inexible as an interface to the mo dule given a reasonable ob ject system as

EVE provides Section this would also require translating between list and

ob ject based representations as data is passed b etween the toplevel interface the

ve an ob ject planning service and the temp oral reasoning calculus Why not ha

replacing the set of ab ducibles

That is indeed the EVE approach Propagation of the ab duction state is re

placed by propagation of ob ject state Instead of accessing the maintenance pro

cedure via terms the ab duction step is mapp ed to appropriate metho d calls The

metho ds automatically handle ab duction maintenance including the default ax

ioms Section in a far more ecientwayeg Maintain beforestartE

endEAI AO is replaced by AI setBeforestartE endEWe call

this technique objectorientedabduction Figure

Since ob jects are conceptually global entities their use in encapsulated search

and thus lo cal computation spaces is problematical Metho ds in general change

this global state Problems naturally arise when comp eting branches of the search

tree try to mo dify this state To handle this rather than propagating an ob jects

name the p ointer to the global structure it is the ob jects state that is propagated

as intermediate ab duction results As so on as access to the ob ject is necessarythe

encapsulated calculus has to instantiate a lo cal copy with which it can interact and

whose internals can be read out again to serve as the next ab duction state The

necessary state accessing metho ds that the internal data structures havetoprovide

are getState and setState see Section

The default Ab ducibles and the Knowledge Base Inter

face

Due to the sp ecial behaviour of the initial and end events with resp ect to the

action data structures to b e describ ed later their conditions have to b e preserved

within the Event Calculus Whereas end only serves for the description of time



points and thus the conditions of its typ e are emptytheinitial situations p ost

conditions are mapp ed to the generic knowledge base interface

In addition EVE assumes that the knowledge base is an ob ject that provides a



metho d to disjunctively it is an equivalentto initiatesinitial P matchits

contents with a prop erty term getfactdisjP Again this encounters the problem

of ob ject communication within search Since there is no p ossibility of distinguishing

statechanging from statepreserving metho ds the initial state should be frozen

and thus not changed during planning the state propagation technique of ob ject

oriented ab duction has to b e applied again The state accessing metho ds therefore

also have to b e supp orted by the knowledge base ob ject Furthermore a dynamic

knowledge base can b e made much more ab ductionaware Hyp othetical reasoning

ab out the start situation as requested by approaches discussed in Section

b ecomes p ossible



EVE replaces terminatesinitial by a constructive negation access to the

p ositive facts in the KB This has the advantage of avoiding explicit termination

actions to install a holdsfalse If there is much information from the start

situation and the access to the knowledge base has not b een improved for partial

instantiations on the prop erties it is necessary to have a switch to disenable this

feature

Summary

EVE extends the clausebased translation approach with a novel meta

programming approach to achieve additional control over the computation ow

Furthermore the incorp oration of heuristic pro cedures that have inuence on the

imp ortantchoice p oints in the Event Calculus was presented The extended the

orem proving facilities are supplemented by the notion of ob jectoriented ab duction

that resolves conceptual discrepancies b etween ob ject orientation and encapsulated

search and provides a generic knowledge base interface

Ob jectOriented Representation

In order for the computational layers to be usable the rather crude representa

tion must b e given a userfriendly customisable interactiveinterface that provides

access to the toplevel as well as in the system internals The ob jectoriented princi

ples realized in Oz one of the rst logic languages to supp ort OOP ob jectoriented

programming play an imp ortant role in this resp ect and form the base for EVEs

service class and the hierarchy of plans and actions

Representation of Prop erties

The Oz universe do es is not restricted to atoms and nite terms as in pure clause

based logic The full range of rational trees records numb ers tuples lists are

predened and handled ecientlyItwould thus b e unwise to restrict ourselves to

the pure rstorder term syntax

A prop erty denoting that entity robo is holding entity blocka can thus b e more

clearly dened as holdingagentrobo objectblocka In fact EVE allows any

Oz term expression to b e used as a prop ert y description and relies on the builtin

unication semantics eg lists do not b ehavelike sets

The Planning Service Class EVE

Using a planner in a concurrentenvironment should not b e restricted to interfacing

a single precompiled mo dule that is lo cked during pro cessing In the case of EVE

there exists a sp ecial class Eve Figure predening the state and metho ds needed

to build a concrete planner instance by inheritance Such an ob ject plays the role of

a planning mo dule by accepting service calls via metho d application that request

plan analysis analysis synthesis synthesis evaluation evaluation

or mo dication modification Some information in those calls has to b e pre

served in order to p erform the requested task eg Term solution generation

is done asynchronously by instantiation of the appropriate arguments eg Plan

The metho d next is resp onsible for generating a further solution plan for the

previously sp ecied synthesismo dication problem

If the accessed ob ject is busy BusyTrue the environment always has the

choice of halting halt continuing continue or abandoning stopthe

computation concurrently in progress It is also possible to construct another in

stance of Eve and request a search concurrent to the former one

Tointerface an external knowledge base ob ject the user has to register it set

KnowledgeBase The compatibilitywiththe Event Calculushowever places

sp ecial requirements on the KB ob ject that are explained in detail in Sections

and

Finally the service class includes manyways to inuence the search pro cess in

order to b e exible

The typ es of the domain events that are allowed to b e ab duced in synthesis

and mo dication are registered with setAllowedActionTypes

The overall number of events that are allowed to b e ab duced during the plan

ning pro cess is restricted by an upp er and a lower bound to get a fair and

thus relatively complete planning pro cedure see Section These limits are

iteratively increased as the searchgoeson for further solutions their initial

values however can b e set with setActionBounds

ersion Event Another parametrisation to the search is a sp ecication of the v

Calculus to b e used The tradeos in terms of computational exp ense and external interface internal interface User class EVE Interaction analysis(!Plan ?Terms ?Busy) evaluation(!Plan !Terms ?Sol ?Busy) synthesis(!Terms ?Plan ?Busy) modification(!Term !IP ?OP ?Busy) Event next(?Plan ?Busy) Knowledge Calculus halt() in Base continue() stop() encapsulated setAllowedActionTypes(!Alist) search setActionBounds(!Min !Max) setKnowledgeBase(!KB) Action setHeuristic(!HProc) Types, etc. setDebug(!DebugLevel)

setExpense(!Expense)

Figure the Plan Service Class Eve

expressivity are describ ed in Section setExpense switches b etween the

dierent axiomatisations and pro of pro cedures

the simple Event Calculus with the simplied pro of pro cedure see

Section and

the extended Event Calculus with the simplied pro of pro cedure see

Section and

the extended Event Calculus with the full pro of pro cedure see Sec

tion

Heuristics are incorp orated as pro cedures see Section and intro duced to

Eve with setHeuristic

Since there are many traps and pitfalls in designing planning domains we

intend to integrate a userfriendly debugging to ol into the Eve class that in

teracts with the Oz Solver a graphical search debugger implemented in the

latest Oz version For the moment the debugging consists only of control

and ab duction ow information whose level of detail can be selected with

setDebugLevel

The Event Class UrEvent

The planning facilities themselves as well as the event action and plan data struc

tures and their typ es are realized as ob jects in EVE Their functionalityisconcen

trated in a generic class UrEvent Figure whose services can b e distinguished

by the following functionality

First there are denition metho ds that allow the mo delling of new actions

and typ es The basic step is the intro duction of roles that serve as param

eters to the event ob ject Because of their unique name eg Event ad

dRolesrolesagent one can refer to those roles in the condition def

inition section

Event addConditionsnegprecondition external interfaceclass UrEvent internal interface addRoles(!RoleRecord) User Child getRole(!Role ?Value) Interaction addConstraints(!ConstrList) Events addConditions(!CondType !CondList) getConditions(!CondType ?CondList) setExecution(!ExecProc !ExecParam) execute(!SuccessProc) Event Execution executestop() Calculus addEvent(?Event) Procedure getAllEvents(?EventList) setEvent(!Event !ActionObject) getEvent(!Event ?ActionObject) setBefore(!EventBefore !EventAfter) Parent getAllAfter(!Event) GUI Event display() setState(!State)

getState(?State)

Figure The EventClassUrEvent

busysubjectevevaragent

Sub expressions matching the pattern evevarRole are replaced by

the appropriate value of role Role Besides their app earance in condi

tions these expressions can also be used to describ e the parameters to the

execution pro cedure setExecution that is registered and triggered in

the case of primitive action execution The case of plans is more complex as

each plan contains several sub steps intro duced with addEvent and asso

ciated with a certain action typ e via setEventFurthermore the temp o

ral relation between these children is rened by setBefore To map the

roles of a plan to those of its child events there exists a sp ecial metho d

setRoleMap P r ol e E v ent E R ol e that is resp onsible

for unifying the value of P role to the sub event E v ent s value of

role ERole Finally the expressivity of the ob ject system is increased by

placing constraining pro cedures via addConstraints on the dierent roles

Constraining pro cedures receive the complete role descriptions including their

values and are thus able to construct arbitrary Oz constraints around them

These can b e used to demand domaintyp e restrictions like nite domains

etc or even do arithmetic see Section A

The second typ e of metho d calls allows interaction with the already dened

actions and plans Whatever information the user has put into a denition is

of course accessible again getRole getConditions getAllEvents

getEvent getAllAfter getEvent Undetermined values that are

published in this way can then b e instantiated A graphical overview of the

internal ob ject structure is obtained with the display metho d see Figure

Perhaps the most imp ortantinteraction however consists of execution

of actions or nonlinear plans In the case of primitive actions execute will

just trigger a registered pro cedure that rep orts its success The nonlinear plan

execution scheme of EVEhowever takes advantage from the concurrent en

vironment All child events ready to execute are triggered via execute and

advised to give their success results back As so on as such a substructure

sends a p ositive reaction the next p ossible execution stage is computed and

Figure A display Result

triggered until all children have b een successfully executed In the case of a

failure rep ort the early achievement of requested goals or an interruption of

execution by the user executestop a symmetrical recursive application

of executestop is started to notify the still active sub events Linearisation

thus takes place if necessary at all on the deep est level within the execution

scheme

Additionally there is the need for reading and writing the overall state

of an ob ject if it is interfaced or even changed during search as explained in

section The resp ective metho ds are called getState and setState

and are only of internal use Of course the state propagation also covers the

sub event representation in nonlinear plans Instead of pointing to a child

ob ject the plan rather contains its state The metho ds that handle the as

so ciation of sub events setEvent getEvent resp ect this requirement

as they are also based on state access Furthermore the execution scheme

requires additional instantiations of child events

From the uniform description of plans and actions it can be seen that EVE

follows a hierarchical approach with the only distinction b etween the two b eing at

the execution level However to inherit this sp ecic execution feature there are two

sub classes of UrEvent available UrAction and UrPlan

The interactive denition of events and the treatment of roles needs an extended

inheritance mechanism The straightforward mapping of typ es to classes and in

stances to ob jects do es not work b ecause of EVEs need for interactive denition

Therefore the inheritance pro cedure is able to treat anyevent ob ject likeitsown

typ e Instead of just relying on the defaults given by an appropriate class denition

EveCreate has in addition to handle the implanting into the descendantofthe

current ob ject state that is dep endenton recent interactive metho d applications

Uninstantiated inherited roles however havetobe decoupled from the values to UrEvent

UrPlan UrAction

Unload Grasp Agent Truck Agent Box

Grasp rob2 Box

Unload subevent Grasp

rob2truck1 rob2 boxa

Figure An Example Event Hierarchy

prec fx prec fx INterface Knowledge Base

initial end

Figure The Default Ab ductiveState

which they are b ound in the ancestor to provide a reasonable inheritance scheme

An example hierarchyisgiven in Figure

The Default Ab ducibles

In the axiomatisation of the Event Calculus we discussed the intro duction of

initial and end events to implicitly represent situations Figure Ubiquitous

in the planning problem they are default sub events for memb ers of class UrEvent

The Event Calculi Section and the UrEvents builtin rules handle their

conditions and the default assumptions mentioned in Section

The Knowledge Base Ob ject

EVE exp ects the knowledge base that represents the initial planning state also to

be an ob ject To guarantee a functional interface b etween such arbitrary mo dules

and the translated Event Calculus a few guidelines havetobefollowed They

are shown in Figure

Whenever the initial event is chosen during execution of the Event Cal

of accessing the content of the propagated knowledge culus the problem arises



base using the prop erty syntax initiatesinitial Term A mapping from

prop erties to KBs contents has to b e done This is of course up to the user as it

dep ends on the internal structure of his KB The metho d getfactdisj is resp on

sible for incorp orating the necessary transition disjunctively due to the b ehaviour

of intended initiates semantics external interface internal interface class KnowledgeBase Event getState(?State) Calculus User setState(!State) Interaction getfactdisj(!Term) Eve ... arbitrary services ...

Object

Figure An EVECompatible Knowledge Base

The same considerations concerning ob jects in encapsulated search in the action

case arise again with resp ect to the knowledge base interface Section State

related metho ds are necessary and are also called getState and setState

Summary

This section discussed the current ob jectbased representation its internal structure

and services and its interface to user mo dules the knowledge base and the pre

viously describ ed logical layers of the planning pro cess We presented the planning

service class and the event class whose ob ject system builds a base for interactiv

ity resource control and exible hierarchical plan representation Furthermore the

requirements on a knowledge base to b e compatible with EVE were explained Robo1 Robo2

B

A C

Figure the MultiAgentBlocksworld

EVE in the MultiAgent Blo cksworld Domain

One of the rst ever scenarios for rob ot problem solving and thus planning was the

blo cksworld Dierentblocks arranged on a desk must b e rearranged by a rob ot

that is able to grasp exactly one of them Relations of the blo cks are describ ed bythe

terms ontable clear and on whereas the situation descriptions involving

the rob ot are handempty and holding Given a start situation and a goal

description the planning task consists of cho osing appropriate sequenced instances

of the p ossible actions of the rob ot

If the rob ot hand is empty and a certain blo ck is standing on the table the

rob ot can Pickup the blo ck

If the rob ot hand is empty and a certain blo ck is standing on top of another

one the rob ot can Unstack the rst blo ck from the second one

If the rob ot hand carries a certain blo ck the rob ot can Drop the blo ckonthe

table

If the rob ot hand carries a certain blo ck the rob ot is able to Stack it onto

some other one

An imp ortantcharacteristic of this timehonoured scenario is the p ossibilityof

goal in teraction when actions interfere with one another Some researchers even

regard the problems of the blo cksworld as b eing more complicated than common

realworld tasks To demonstrate the nonlinear facilities of EVE we extend the

domain byallowing several rob ots to b e involved Figure

The concrete axiomatisation of the domain can b e found in Section B Belowwe

list the ma jor ndings of our work applying EVE to the test problems of the multi

agentblocksworld More detailed p erformance b enchmarks and the investigation of

the search pro cesses with the latest Oz debugging to ols will b e the fo cus of future

research

Synthesis mo dication analysis and evaluation are as sound and complete as

exp ected by the theoretical considerations

Nonlinear functionality is used Whenever it is reasonable several agents are

engaged in activity at the same time

The solution plans in synthesismo dication are enumerated according to the

numb er of steps they contain Assuming uniform action execution costs the

optimal plan is found

Solution management is handled reasonably by the b ounded search no

solutions are presented twice

If situations are symmetric to several agents there will b e also symmetrical

solution plans

Interesting problems like the Sussman Anomaly of which there are twoversions

in the multiagent blo cksworld can b e solved with sp eed

The search space has however a high branching factor and thus explo des early

dep ending on the numb er of ab ductions allowed The pure uninformed depth

rst approachtakes far to o long to b e useful for hard practical applications

EVE in a MultiAgent System

Distributed Articial Intel ligence DAI is an area within AI that is growing in

p opularity This is probably due to the common trend in computer science of divid

ing complex problem solving into several indep endent tasks Distributed Problem

Solving that have to interact in order to build a globally correct solution The

sp ecial contribution of DAI is now to mo del these autonomous problemsolving

capabilities as cognitiveentities the agents that interact with their environment

p ossibly including a human user and each other The result are the MultiAgent

Systems MAS that esp ecially demand cooperative and thus communicative fa

cilities from their elements in order to acquire the emergent functionality for the

toplevel problem solution

The corresp onding agentarchitectures therefore require the integrationofmost

of the rather separate research questions of AI in order to mo del a cognitively

complete scheme This is esp ecially of the task of merging reactivity the ability

to make fast decisions fast based on new p erceptual data and deliberation the

p ossibility of ob eying more abstract goals and developing longterm perspectives

seems to be functionality that resides on for acting Whereas reactive b ehaviour

an unconscious level in cognitive systems routine tasks that can b e understo o d

as pro cedural knowledge delib eration poses problem sp ecications that b elong

to decision theory and planning Finally co op eration and communication seem to

complicate these questions byallowing so cial comp etence and the abilitytoexchange

b eliefs ab out multiagent plans

One ma jor factor in the developmentof EVE has always b een its integration

into a MAS EVEs nonlinear execution mo del and the exible domainindep endent

implementation make our planning system most suitable for that purp ose Our

future research activities will therefore fo cus on the integration of EVE into the

InteRRaP agent architecture develop ed within the CoMMAMAPS pro ject and the

exploration of their interplay In this section we briey present the key concepts of

InteRRaP and explain a rst approach to placing the planning mo dule within the

socalled lo cal planning layer of the agentarchitecture First evaluation results from

the loading dock scenario reveal the exibility of the new agents and show some of

the critical questions that arise when bringing reactivity and delib eration together

The InteRRaP Architecture

The ma jor paradigm used in the pragmatic InteRRaP agent architecture is

thatofalayered architecture for integrating reactivity and delib eration Figure

Eachlayer intro duces an extended abstraction level to the reasoning that happ ens

on its lower comp onents

the Behaviour Based Layer BBL is resp onsible for p erforming routine tasks in

a pro cedural manner Its pro cesses are called patterns of b ehaviour and they

ob ey the inputoutput functional scheme that guarantees a reactive system

the Lo cal Planning Layer LPL intro duces the notion of longterm goals and

has the ability to develop intentions plans that inuence the BBLs short

term b ehaviour in order to match these goals

the Co op erative Planning Layer CPL represents the so cial comp etence of the

agent It extends the agentcentred p ersp ectiveofthe LPL with the ability

of reasoning ab out other agents state of mind communicating ab out own

tentions and developing joint activities in Hierarchical Agent Control Unit Agent KB Cooperative SG PS Planning Layer Social Model CPL

Local SG PS Planning Mental Model Layer LPL Behaviour- World Model based SG PS Layer

BBL k n o w l e d g e a b s t r a c t i o n o i t c a r t s b a e g d e l w o n k Sensors Communication Actors

w o r l d i n t e r f a c e ( W I F )

E N V I R O N M E N T

Legend: information access control flow SG: situation recognition / goal activation

PS: planning, scheduling, execution

Figure The InteRRaP Architecture

SGi+1 PSi+1

(SIT, GOAL) COMMIT SGi PSi

OPsCOM- SIT MIT

KB OP goal

(SIT, GOAL)

situation

selection

execution

activation recognition scheduling

COMMIT (SIT, GOAL)

SGi-1 PSi-1

information flow main control flow additional control flows

Figure A Layer within InteRRaP

The agent mo del is supplemented with a hierarchical knowledge base KBthat

provides the agents b eliefs in several layersp ecic abstraction levels and the world

interface WIF the linking mo dule b etween the agent and its environment

The structure of eachlayer reveals some common design principles Figure

In particular the separation of functionalityinto the Situation Recognition Goal

Activation SG and Planning Scheduling PS and researchinto their interaction

have b een an imp ortant topic within the development of this architecture The

SG p erforms the task of receiving layersp ecic signals that indicate a situation

change and derive new goals from their integration These are nowusedtotrigger

or recongure the PS pro cess to develop or change the intentional structure within

the layer and therefore guide its execution Raising signals is of course restricted to

happ en only b etween a neighb ouring layers They consist of a part that is related

to the situation change and a part that carries information ab out goal activ ation

In the following we will see how EVE ts into this framework byintegrating it into

the LPL The implementation was carried out within the ALADIN system a

concrete InteRRaP skeleton that is also written in Oz is as BBL at the that textual base h pro cess KB ts to the e already men wledge attempt v tiated kno eha the tegration er y in t will register the LPL within La pro cess W t has b een extended according to Situation initial PS of hanges c wing places are instan Recognised patterns include con within the of this to Planning ation requests These patterns are initialised output Local PlanningLayer out BBL KB EVE the t reacts y left es Lo cal er in Figure suggests a planning mo dule within PS y Execution Report SG Activate Goal tak tal mo del of the agen b een the w p ossible to create clones of it within the searc Figure registered KB trolled b Situation

has Recognition ation er has to b e a part of the Recognition y

wn in Figure TheGoal follo CPL Activ

within Activation with the men pro cess ts but con y install/execute/stop/report er and explicit goal activ the synthesize/modify/stop y its ell as messages from the thesis or mo dication are new Situation w la on creation of the agen Goal information of desires execution results from commitmen tap KB SG ue ts eplan EVE that pro cess tin of the planning mo dule Initialisation of the agen the Section It is no planning pro cess within the Plan &Action pro cess b forms propagates Library activ PS con a new plan hematically sho ated As so on y ts comp onen PS to sc tioned As the design of thethe generic lo cal la planning la and new y k to the initiator commitmen Execute BBLBehaviour plan KB the the e as en bac Instance Recognition EVE Active Plan e plan As the curren prop erties activ terfaces the from e plan is empt of the PS Itin tro duced to Results e queued goals is activ tation e plan are giv is in BBL calls it the goal queue is empt called ted represen is e execution and planning new goals are queued s v On demand it will execute a plan service syn EVE e the conjunctiv SG is presen metho d terlea in t results from the e goals Initially t to the rest of the agen e plan is executed If the activ mo dule see Section builds the heart of the appropriate metho d to execution EVE expressed h do es not in solution plan its trolling the planning mo dule and the activ pro cess til the activ ork Success or failure of the activ and w of the resp ectiv It is concurren as a mapp ed a single con ning service to solv the commitmen proac un goals PS the

until either a solution has b een generated or the service call is interrupted

By lo oking up plan prop osals in the plan library predened plans can

b e stored indexed according to their intended goals and serve as a base

for mo dication

the plan action library contains the abstracted b ehaviours that serve

as commitments from LPL to BBL as well as a library of predened

singleagent plans that are designed for the agents domain The plans are

indexed with their intended goals All the entries use the ob jectoriented

representation of Section The execution metho d of primitive actions

is supplied with an interface to pro duce commitments to the BBL

the active plan is the single plan whose execution is in progress at the

moment Its execution follows the pro cedure describ ed in Section and

the primitives trigger commitments for the BBL

As the description of loading do ck agents in Section shows this approach

works well as a straightforward basis for evaluation but it also reveals some exten

sions that are necessary in the architecture as well as in the planning system

The frozen knowledge base during planning prevents the planning pro cess

from being reactive A dynamic environment or even behaviours that are

initiated by the BBL may render the agents situation dierent from the one

represented in the planning pro cess Solution plans that refer to the situation

that was valid when the service was called could be incorrect at execution

time A reactive planning pro cess that is able to guide the planning pro cess

according to external signals Section should replace the rather isolated

planning mo dule

The false linearity assumption claims that conjunctive goals can b e reached

by sequencing their resp ective partial solutions By not interrupting the acti

vated plan and queueing goals our lo cal planning layer uses this assumption

however A b etter scheme of interleaving execution and planning has to be

found to get rid of this strong restriction Section

Co op erative facilities are ignored in mo delling only the LPLFuture investi

gations must showhow the CPL could b e constructed to include some tem

p oral reasoning based on EVE There will b e also a need for having several

situationindep endent planning pro cesses at the LPL that pro duce multi

agent plans in order to develop and communicate these intentions

The Event Calculus and our current EVE system do es not take proba

bility cost and utility measures into account These are however imp ortant

guidelines for rational agent design Our goal is to incorp orate these notions

either into a nonlinear planning pro cess or into the concept of a layer Sections

and

EVE in the Loading Do ck Domain

As MAS are esp ecially suited to managing complex but structured systems suchas

information networks and trac the loading dock scenario Figure provides an

appropriate test b ed for agent architectures likeInteRRaP and multiagent planning

mo dules like EVE It is basically an extension of the more abstract blo cksworld task

to a more practical problem and furthermore intro duces issues such as largescale

distribution rob otics and co op eration The environment is is comprised of a closed

region the loading do ck that consists of discrete elds Instead of blo cks the ob jects

to rearrange are boxes characterised by certain colours Also the shelves indicate

Figure The Loading Do ck Scenario

with their colour the typ e of b ox that is allowed to b e stored here The only other

place b oxescanbeplacedonisthetruck The entities that are mo delled via agents

are forklifts Sp ecial parking areas mark the usual p ositions of agents without tasks

Besides the restriction to the maximal load of one box and a limited p erception

range the agents have the ability to execute the the following actions

Walk Ahead If the eld in frontof the agent is free ie no forklift truck

shelf or b ox is blo cking the way the agent can move from its actual p osition

to the eld in front without changing its orientation

Turn Left Turn Right An agentalways has the abilitytochange its orienta

tion in steps of degrees The p osition however remains the same

Grasp If the agent is not carrying any box it is able to move its gripp ers

down to the truck or shelf eld ahead close them and lift them up again If

there was a b oxinfront the agent will now b e carrying it

Drop This will cause the agenttomove its gripp ers down to the emptytruck

or shelf eld ahead and to op en them The gripp ers are moved up again

afterwards If the agentwas carrying a b ox it will now b e stored on the eld

ahead

Of course this is not the kind of granularity that is inherenttothe LPLThere

are some routine BBL b ehaviours that provide b etter abstractions for acting

GotoRect Is a b ehaviour that moves the agent from its currentpositiontoa

place within the sp ecied area

Turn Rep eated execution of degree turns allows the denition of a be

haviour that changes the orientation towards a dened direction

SearchBox This routine will explore a shelf or the truck to identify a certain

box The agentwillbeplacedinfrontofthebox if this pattern succeeds

SearchPlace Complementary to SearchBox this pro cedure lo oks for a free

space on the truck or a shelf

Tasks of the form load the truck with a green boxorunload one blue box from

the truck can now be posed to the agent so ciety and are negotiated between the

agents Eventually one agent takes temp orary resp onsibility for fullling such an

atomic task Since the BBL is not able to solve it with its shortterm p ersp ective

the LPL is resp onsible for adopting it as a goal From our axiomatisation Section

C it can b e seen that within this rst evaluation we do not handle all the questions

that this scenario p oses the agent However our idealised mo del reveals the following

imp ortant considerations

Planning the ab ove tasks within the loading do ck domain works very well

The b ehaviours provide a robust execution base for the generated solutions

Execution failure due to the abstracted problem description in planning is

handled adequately

The explicit reasoning at the LPL is far more exible than the former metho d

of predening a complete plan library The tasks of the forklifts could b e easily

enlarged by new ones without changing much within the domain axiomatisa

tion

Since each action within the agent requires the same resources the planning

pro cess turns out to b e a purely linear one

Since path planning is a rather sp ecial issue we chose not to use only the

primitives within the planning layer GotoArea is used to navigate to a certain

p osition which is not always p ossible but works in many situations

We did not mo del incomplete knowledge due to the limited p erception Section

shows some way of intro ducing assumptions to cop e with this during

planning time The next p oint deals with gathering information at execution

time

Sensing actions like SearchBox and SearchPlace cannot be handled by the

current Event Calculus Section will presentsometechniques to cop e

with their semantics

Co op eration of agents is ignored for the moment Future work will try to

explore the usabilityof planning for this extended problem as well Section

Nonlinear facilities will play an imp ortantrolewithin

Summary

With our integration of the planning system EVE into the InteRRaP agentarchi

tecture wehave succeeded in bringing the exibility and delib eration of planning

into the promising research of DAI As our evaluation of the agents within the

loading do ck scenario shows there are a lot of architectural and algorithmic ques

tions still to b e answered in the merging of explicit temp oral reasoning with reactive

facilities

Related Work

Let us now compare the features of EVE with some wellknown related planning

systems in common use The main criteria for our comparison are eciency the

application domain expressivity and exibility

Planning with a logical framework

Situation CalculusBased Systems

Situation Calculus based planning systems can b e divided into logical and pro

cedural approaches However it is theoretically p ossible to build the most p owerful

logical instance SIT using the clause formulation of Section under SLDNF

the axiomatisation do es not need any ab duction In comparison to SIT EVE is

sup erior due to its b etter handling of the frame problem which consequently endows

EVE with nonlinear and a far more exible handling of plans

Situation Calculusbased systems are restricted to the expressivityof SIT

STRIPS for example is unable to solve problems such as the register swapping

problem whereas the solutions of EVEs planning pro cedure are sound as well as

complete see Section Sub optimality caused by the linearity assumption that is

inherent to the Situation Calculus is not a problem for EVE

Planning using Temp oral Logics

There are attempts such as the PHI planner in that use mo dal logics with

a temp oral intervalbased interpretation for temp oral reasoning purp oses The

p ossibleworlds semantics Kripke structures delivers a notion of situation as well

as situation transition due to action execution bythereachabilityrelation In con

junction with a representational solution for the frame problem lo cal variables

with changing values p ersituation mo dal logics allow one to realise the planning

pro cess through deduction alone the PHI planner uses a mo died S calculus

Beneath the incorp oration of tactical theorem proving that is also resp onsible

for guiding the actual planning pro cess the plan op erators in PHI also provide a

more extensive framework than EVE Conditionals and lo ops are standard to ols

with which to build up the plan structures

Since plans corresp ond to paths within a Kripke structure they are however

condemned to b e linear As in the case of the Situation Calculusbased systems

this is a ma jor drawbackin solving multiagent planning problems Furthermore

the mo dication of existing plans to t certain goals requires more eort than the

a priori nonlinear approach of EVE Interleaving of partial plans to the overall

solution is only p ossible bya twostage pro cess

The thesis describ es an integration of the PHI planning system into the agent

architecture InteRRaP A comparison to our work that is presented in Section

reveals signicantoverlap mo delling of the loading do ck intro duction of assump

tions to deal with incomplete knowledge error handling as well as fundamental

dierences deduction vs ab duction reactivityof the planning pro cess resource

The choice of EVE as the standard reasoning comp onent for management etc

InteRRaP has thus b een conrmed

Event CalculusBased Systems

A similar Event Calculusbased system to EVE is CHICA served as a mo del

for EVE CHICA has some sp ecial concepts suchaslocalised planning a wayof

dividing not mutually dep ending actions typ es and prop erties and search space

reduction strategies maintenance see Section Lo calised planning has b een

recognised as not being an appropriate technique in common domains Whereas

the adoption of search space reduction is planned for the future EVE relies on its

sp ecial improvements to the calculus to get a reasonable b ehaviour even men

tions some not identiable nontermination situations that have o ccured in their

implementation We strongly susp ect the undecidable mutual destroyer situations

that are describ ed in Section and handled byourversions of the Event Calcu

lus to b e resp onsible for this phenomenon Furthermore the advantages of the Oz

platform over the base of CHICA include concurrency ob jectoriented

features and the ecient handling of constraints

Pro cedural Nonlinear Planning

Conventional nonlinear planning approaches are most often based on pro cedural

descriptions as those in Their computation tends to b e divided into expansion

insertion of new actions to install the current goal and conict resolution check

for conicts and linearisation to solve them stages EVEs b ehaviour dep ending on

the version of Event Calculus used is v ery similar as wehave outlined in Sections

and Extended functionalityhowever is gained by the logical approachof

the Event Calculus and the exible background of theorem proving

There are however a lot of improvements to these partialorder approaches to

achieve more practical planning contextdep endencies treatment of sensing ac

tions probabilistic planning etc Although EVE cannot provide such expressive

op erations weaim to integrate these notions into our logical framework Section

Plan Graph Analysis

A new kind of semilinear plan algorithms based on plan graph analysis is actually

b eating the records b ecause of astonishing results in well known domains GRAPH

PLAN for example is a forward planning approach that uses a sp ecial situation

representation that even allows semilinearity As the actions are organised in sev

eral stages that are internally concurrently but linear with resp ect to one another

this is a ma jor restriction for multiagent domains Furthermore dep ending on

the domain forw ard planning and situation representation lead to an exp onential

explosion of the search pro cess multiagent environments in particular seem

encounter this problem Besides the approach is not as it stands able to allow

general plan mo dication b ecause of the incremental from scratch b ehaviour that

is necessary to build the sp ecial situation representation

MultiAgent Planning

Previous considerations related to multiagent systems showed that decision making

is a key functionality of the cognitiveentities wewould like to mo del Muchwork

has of course been put into the integration of planning into the agentoriented

programming framework

One way to lo ok at the problem is the b ottomup p ersp ective of rob otics Since

reactivity is the main criterion there most approaches tend to adopt Op erations

Research metho ds and are based on InputOutput feedback lo ops More sophisti

cated researchnow tries to build hierarchies of abstractions on top of these rather

simple pro cedural b ehaviours W e argue that somewhere within this evolution of

abstraction the right place to integrate planning is found The layered architecture

of Section reects these considerations Articles like and seem to share

this opinion

Another topdown p ersp ective however likes to lo ok at MAS as distributed

problem solvers The toplevel solution for some complex task has to b e puz

zled together by the individual agent delib eration Here the ma jor question is the

interaction b etween lo calised strategies with regard to the toplevel goal Enabling

a co op erativelayer within our architecture InteRRaP now merges these twoper

sp ectives into a unied framework

Finally there is some research from decision theory which continues to deliver

metatheories ab out agent so cieties as well as decision guidelines for rationalityA

fact that is often left out within the other two approaches is the imp ortance of

probability for only partially informed systems We therefore strongly recommend

the incorp oration of probability and utilityinto the agent architecture andor the

temp oral reasoning pro cesses

A sp ecial usage of the Event Calculus with resp ect to rob otics is reasoning

ab out sensor data The symmetrical treatment of past and future allo ws one

to unify plan recognitionobservation explanation and plan synthesisintention for

mation Although this provides some interesting background a general ab duction

based agent is far more exp ensive with resp ect to a deductive but truthmaintaining

one A mixture of b oth inference mechanism would seem to oer a go o d compromise

Summary

This section has shown that EVE derives muchadvantage from the Event Cal

culus on the one hand and its exible architecture and representation on the other

Wehave demonstrated that our framework is extendible to general multiagentdo

mains and that it builds up a reasonable base for further extensions which we

hop e will provide a unique combination of expressive planning decisiontheoretic

reasoning and supp ort for reactivity upper layer(s)

layer raised signal control raise signal

change activation theory syntax

domain axiomatization

concurrent, continuous inference processes

lower layer(s)

Figure A Layer of an AgentArchitecture

Future Research

The main reason to cho ose the nonlinear Event Calculus as the reasoning strat

egy for EVE is the intended application in multiagent systems Future research

will mainly fo cus on extending the current framework to t its b ehaviour into the

requirements of this environment We therefore rst outline some considerations

regarding the ongoing integration of EVE into InteRRaP and later explain how

the reasoning mechanism can b e extended to capture many reasonable extensions

from practical planning Finallywe will discuss some attempts to nd tailormade

heuristics in several planning domains and giveanideaofhow ab duction and con

straint logic programming can b e unied in a much more elegantway to pro duce

new translation functions from clause syntax into constraints

Planning in a MultiAgent Architecture

Section has intro duced the fundamental concepts of our underlying agentarchi

tecture and a prototypical in tegration of the EVE planning mo dule An imp ortant

extension to the architecture that was implicitly employed there is the notion of

concurrency b etween individual layers Hence the planning pro cess itself is lo osely

linked to the LPL and its computation is done concurrently to the rest of the agent

Communication b etween the dierent functionalities can now b e describ ed as signal

sending Wewould like to adopt this view for the whole architecture by mo delling

all the computational facilities within an agentarchitecture as concurrent pro cesses

with signal sending and receiving functionality Figure This provides a very

broad basis for reactive systems although the maintenance of consistency has to b e

insp ected more closely

Following this picture the planning pro cess has to develop its signal handling

abilities Possible signals include the creation of a new planning task resource man

agement information and further changes in the agents environment Normally

planning tasks are treated in isolation from a dynamically changing environment

The correctness of their results thus dep ends on the static information at the start

e planning scheme should b e able to guide its of the computation A far more reactiv

searchwith the supplementary information from the signals it receives Although

this could mean throwing away large parts of the already explored searchtreedue

to some assumption that could not b e hold we argue that this will not happ en in all

domains and only in sp ecial situations whichwould render the result of conventional

systems incorrect The Event Calculus in particular should allow for mecha

nisms to supp ort reactivity b ecause the notion of ab duction and events together

with constraint programming techniques delivers enough information to deal with

incoming changes in the environment see Section

A question that we did not elab orate within our initial approach of bringing

planning and agentoriented programming together is the decision making on the

co op erativelayer Of course the use of plan structures could b e adopted here but

they have to be carefully divided into proto cols nondeterministic so cial rules of

communication and strategies decision functions that turn a proto col into a deter

ministic intention to execute The primitive actions on this level include sp eech acts

as well as synchronisation actions that wait for incoming communication Both con

tain the ob jectlevel plan structures of the LPL enriched with multiagent facilities

as parameters We prop ose that reasoning on the proto colstrategy level happ ens

on the CPL and is guided by decisiontheoretic considerations The ob jectlevel

plan structures are generated mo died and analysed at the LPL p ossibly with

the help of the generic resources approach of Section Therefore the lo cal plan

ning pro cesses are able to b e congured with certain contextual information that

allows them to switchbetween multiagent and singleagent planning

Execution of multiagent plans requires the incorp oration of translation func

tions that turn the multiagent plan into a set of ob jectlevel singleagent plans

including the necessary synchronisation and errorhandling mechanisms intro

duces such a function for linear settings Wewould like to extend these schemes to

nonlinear plan structures with an extended errorhandling mechanism

The symmetrical treatmentofpastandfuturebytheEvent Calculus even

provides a unied framework for realising plan recognition and plan generation

also used to presents an impressive example of how our approach could be

reason ab out incoming sensor data It is a question of eciency whether the whole

architecture should b e based on a global ab ductive pro cedure or b e built within

a deductive framework with nonmonotonic features to catch inconsistencies We

think that a combination of deduction on the architectural level and ab duction

within the planning pro cesses is the most promising approach

Extensions to the Event Calculus

Maintenance

Since the translation of the Event Calculus in EVE has turned out to spawn

huge search spaces to handle interaction of events see Section there are sev

eral p ossibilities for guiding the control ow more accurately Besides heuristics

Section there is also a approach within the calculus that uses the notion of

maintenance instead of p ersistence A problem with p ersistence is that it in

sists that prop ertyofinterest hold throughout a certain time interval Maintenance

however allows the prop erty to be terminated within the interval as long as it is

reestablished later Although this would at rst sight seem to increase the search

space investigation could nevertheless reveal potential for improving the overall

depthrst b ehaviour

Events with Duration

The currentversion of the Event Calculus regards events as ideally having no

duration Real parallel or at least concurrent settings suchasmultiagent domains

however require the mo delling of execution time intervals The assumptions ab out

the lifetime of conditions no longer hold Preconditions haveto last in the worst

case until the end of event execution Also the p ostconditions could b e generated

from the start on Their existence however cannot be guaranteed until the end

of execution Furthermore there is the p ossibility of prop erties coming into life

and dying again during execution during conditions they represent abstracted

p ersistances Wewould like to exetnd the Event Calculus to capture all these

concepts The worst case assumptions ab out conditions will havetocovered as well

as the intro duction of during conditions and a distinction b etween weak and strong

conditions will b e needed so that the calculus will b e able to reason ab out prop erties

that can b e interrupted and reinstalled without aecting the success of an action

ContextDep endent Conditions

Another extension in expressivity is gained bytheintro duction of contextdep endent

conditions As wehave already mentioned in our discussion of the Event Calcu

lus p ostconditions that are strongly tied to certain preconditions could b e mo d

elled by several action axiomatisations The increase in the branching factor can b e

avoided by using sp ecial mechanisms in the planning pro cess One of these resolves

p ersistence conicts by simply switching the unwanted eect with one of its asso

ciated preconditions o On the other hand proving that a certain prop ertyholds

also requires the installation of its asso ciated preconditions

Probability in Planning

The action description need not b e annotated with the condition dep endencies alone

Planning in uncertain environments often requires that certain goals hold with a

certain probability after execution of a plan The notion of probability could there

fore b e intro duced on the action level One could replace p ersistence prop erties with

the concept of evidence for certain preconditions Bayes rule can b e used to calcu

late the correct distributions for the time p oints From these numb ers the resulting

distributions after action execution can be generated describ es the technical

background of the BURIDAN algorithm a partialorder planner that incorp orates

these presented techniques

Sensing Actions

Furthermore the representation of sensing actions imp oses some new requirements

on the temp oral reasoning comp onent Sensing actions are sp ecial events that will

gather some information at execution time b esides installing their eects They

could serveto complete the knowledge that the planner needs to full its task at

planning time The generation of the plan however has to b e done for all p ossible

outcomes of the environment sensing Normallythisintro duces several conditional

branches within the plan structure For all combinations of the outcomes of the

sensing actions the planner now has to establish the goal indep endently Further

resolution techniques for p ersistence destruction could nowbeintro duced by making

the contexts of destroyer and p ersistence inconsistent How these mechanisms could

ork should b e a topic of our future research be integrated into our logical framew

Hierarchical Planning

A general heuristic in problem solving is the reuse of already generated solutions

There are twoways of incorp orating this heuristic into planning First one could

have a certain plan as a prop osal to the problem solver which then tries its b est to

mo dify it to meet the goal This plan mo dication or planning from second princi

ples has also b een recognised as a NPcomplete problem and can often b e more

complex than the corresp onding planning from scratch task the Event Calculus

and ab duction show that plan synthesis and plan mo dication are in general of the pre- duringconditions effects conditions p de

p de

pd e

Figure Plan Abstraction

same complexity EVE supp orts mo dication but an implementation of hierar

chical planning by breaking up a plan into its primitive events see NOAH

and SIPE is therefore often to o complex

A second metho d already employed in EVEs ob ject system is the abstraction

of events and plans to be basically the same whether dened as primitives or

hierarchical events should b e of no interest to the planner Certainly one is losing a

lot of information dep ending on the kind of abstraction and risks conicts during

execution but this signicantly sp eeds the planning pro cess up A good rule is

to calculate overall preconditions and p ostconditions for a plan In the intended

strong nonlinear setting this is to o weak on its own to handle the dep endencies

between parallel branches which concludes in the additional intro duction of during

conditions During conditions are furthermore the abstracted version of p ersistences

that are not allowed to b e destroyed in order to b e successful

The necessary computation of the overall conditions Figure is not dicult

The Event Calculus is again a p erfect to ol to deliver these Preconditions are the

collected preconditions of the children that have to b e installed b efore the execution

of the plan A registration of successful knowledge base accesses pro duces these

for free during either service involving the calculus Overall eects consist of the

prop erties provable by the calculus at startend without those prop erties that

are intro duced by the implicit start situation This could be done by an analysis

that is also suited for insp ection of prop erties within the plan and thus exploring

the during conditions

This technique enables EVE to build plan libraries with reuse facilities at rela

tively little exp ense Learning AI systems based on planning are also p ossible

Generic Resources

As can be seen from the sp ecication of the planning problem the parts of the

resource description relevant to the problem have to b e complete at planning time

Decentralised multiagent systems however are often faced with incomplete knowl

edge ab out the environment esp ecially other co op erativeagents that could help to

solve the goal The ab duction principle is again the key to realising far more exible

behaviour based on hyp othetical reasoning If the facts that are intro duced bythe

start situation ie knowledge base can also b e used as hyp otheses planning could

involve a virtual resource amount reasonably treated by the minimality paradigm State Goal

Plan Synthesis Plan with hypothetical modification result plan resources (real resources)

maximal parametrizable nonlinear

plan plan

Figure Generic resources

of ab duction

The execution of plans dealing with those generic resources however requires

an additional revision with resp ect to the currently available resource rates Again

the ab ductive Event Calculus pro cedure provides the necessary functionalityby

its mo dication ability First virtual entities are replaced by roles ie parametri

sations to the plan Afterwards the plan is thrown into mo dication together with

the actual situation and an instantiation as well as the elimination of conicts is

obtained by the theory of time and action Figure

Heuristics

Probably b est way of obtaining eciency is of course to p ermit domaindep endent

rules with EVEs general heuristics framework Development of more generally

usable techniques such as wayplanning could be of course part of those eorts

mainly fo cussing on the intended application domain the loading dock see Section

and serve as guidelines for the construction of heuristics within the Event

Calculus

Ab duction constraint logic programming

So far the translation functions that we have intro duced in Section use the

constraintbased platform as a deduction system and intro duce the hyp othetical

reasoning of ab duction via reication ie the interpretation of certain terms as

sets and thus predicates This canbeseenfrom the listbased explicit ab duction

set that is passed through the constraint abstractions A closer investigation of the

functionality of constraint logic programming approaches however reveals a deep er

relation b etween CLP and ab duction Figure

Basically a constraintbased pro of pro cedure knows some sp ecial subset of logic

that it can handle eciently The data structures that are necessary to handle this

hosen a basic reside in the constraint store As so on as some element of this set is c

constraint it is checked whether the constraint store entails implies the basic

constraint If not the constraint is added to the store and will trigger an up date of

the information within propagation If we compare this b ehaviour to ab duction

this is basically the same an ab ductive predicate basic constraint as a goal is

checked to match the already existing assumptions check on entailment If not

represented in the ab ductive state it can serve as an additional hyp othesis added

to the store and thus maintenance propagation of the ab duction set will pro duce CLP proof tree empty constraint store program P goal G

abduction set/hypothesis selected a basic constraint P G’, ϕ ,G’’ store does not entail ϕ

tell maintenance propagation

amplified store PG’,G’’

Figure CLP is Ab duction

some new hull the new constraint store

We therefore prop ose to get rid of the reication approach and use the constraint

based platform as an ab ductive inference pro cedure Due to ecient constrainthan

dling new translation functions will pro duce more ecient co de that is also more

natural The constraint metaphor can also b e used as the basis for dynamically in

uencing the planning search pro cess Environmental change during planning could

be expressed as additional constraints p erhaps through the intro duction of some

new event that could b e p osted to the lo cal computation spaces already spawned

Inconsistent assumptions within the ab ductive framework will cause the resp ective

computation spaces to collapse The remaining front represents all the paths that

are consistent with the dynamic change and further expansion resp ects the new

situation The searchhasthus b een dynamically guided

Summary

With its intended integration into the agent mo del InteRRaP there are several issues

to explore within EVE apart from the design of the agentarchitecture Investigating

the suitability of the Event Calculus in multiagent distributed and realtime

planning requires sophisticated techniques to b e evaluated Also extensions to the

planning pro cedure such as during conditions improved time treatment hierarchi

cal features and generic resources turn out to b elong to these metho ds Finally

ab duction and constraint logic programming seem to b e related in a very close way

Improved clausetoconstraint translations with ab ductive facilities will b e p ossible

Conclusion

Comprising the results of our rep orted work with the analysis of our test applica

tions Sections and EVE has proved several facts related to planning logic

programming and multiagent systems

The Event Calculus is together with an ab duction principle highly suited

for nonlinear planning

The calculus can b e improved to catch strong nonlinearity and to cop e with

worst case assumptions

The ab duction principle is a rich extension to theorem proving that allows

hyp othetical reasoning for many purp oses such as planning

The Event Calculus b ehaves well under a theorem pro of pro cedure p os

sibly given some restrictions

It is p ossible to implement full theorem proving facilities even with hyp othet

ical and nonmonotonic reasoning on a constraintbased platform

Mo dern pro cedural paradigms and logical programming do not contradict

even in tightly logicbased approaches New techniques such as ob ject

oriented ab duction are p ossible

Oz provides a p erfect base for distributed nonlinear planning attempts

Ob jectorientation is the key for reasonable data structures also in planning

EVE can b e extended to an ecient distributed multiagent planning mo d

ule The incorp oration into agentarchitectures arises interesting DAI research

problems

Heuristics are necessary to guarantee eciency as the calculus in its current

formulations requires the construction of a rather large search space

event_calculus.oz event_calculus_meta.oz constraint version predicates.oz Meta-Level of the Event Calculus some tools within encapsulated search of the Event Calculus

eve.oz stateclass.oz Declaration & Inclusion of subordinate sldnfa.oz a class that defines files the sldnfa the object state access driver procedure

event_classes.oz UrEvent, UrPlan: event_calculus_tools.oz event classes event_search.oz interface between the service object and EVE: the service object sldnfa class event_tools.oz tools for the event

methods

Figure File Hierarchy

A EVE Installation

After the theoretical and implementational issues this section tries to give a short

overview and guide to the installation and the customisation of the EVE mo dule

A Dep endencies and Compilation

The les that come with the EVE distribution their content and mutual

dep endencies are shown in Figure The only administrative task left to

the user is an optional precompilation of eveoz and its inclusion into his

source co de feed eveoz From then on the imp ortant constants UrE

ventUrPlanUrActionEveCreate and Eve are dened and allowinteraction with

the EVE system that is exemplary describ ed in the next section A A sp ecial

signicance is ascrib ed to StateClass that should serve as the parent for the users

knowledge base see Sections and to provide the state accessing metho ds

demanded for the interaction in encapsulated search

A A Counting Example

The following example allows to get insightinto the basic steps of user interaction

with EVE Let us construct a counting domain in which the planning pro cess is

used to mo dify a counter The b eginning is made by inclusion of the EVE system

feed eve

The next step should b e the customisation of the chosen knowledge base EVEs

test environment therefore denes a very simple listbased approach Its implemen

tation could of course be far more sophisticated but the functionality suces to

show the basic abilities Remember that StateClass intro duces the basic state

access metho ds

KnowledgeBase

a simple list based knowleddge base

declare KnowledgeBase

class KnowledgeBase from UrObject StateClass

attr

factsnil

meth addFact

if IsList Fact then

factsAppend

facts

Fact

else

factsAppend facts Fact

fi

end

meth removeFact

if Member Fact facts then

factsFilter facts proc X

if XFact then true

else false fi

end

fi

end

meth getfactdisjFact

MemberDisj Fact facts

end

meth reset

factsnil

end

end

KnowledgeBase stores its content in a simple list There can be additions

add deletions delete and a total reset of the knowledge base get

factdisj is resp onsible for interfacing the KB within the Event Calculus

it matches the memb ers of the list disjunctively against the requested prop ertyNow

let us intro duce a KB ob ject and its representation of the actual counters state that

is set to

new knowledgebase

declare ActualKnowledgeBase

create ActualKnowledgeBase from KnowledgeBase

end

ActualKnowledgeBase reset addactual

Still lacking is the denition of a counting action Its roles are the counter state

b efore fromn and after ton the counting op eration and the direction in whichit

counts direction

declare Count

EveCreate UrAction Count

Count addRolesrolesfromn ton direction

Count setIdCount

Count addExecutionParameterscount evevarfromn eve

varton

The conditions for Count are straightforward Before its execution the actual

counter must contain the fromn value Afterwards its contentwillbe ton and no

longer fromn

Count addConditionsposprecondition actualevevarfromn

Count addConditionspospostcondition actualevevarton

Count addConditionsnegpostcondition actualevevarfromn

The relation between coun ting direction and counters states is given by the

following constraint that will furthermore restrict the values to be in range from

and the directions up and down

Count addConstraintsproc Roles

Rolesfromn

Roleston

or

Rolesdirectionup

FD Rolesfromn Roleston

Rolesdirectiondown

FD Rolesfromn Roleston

ro

endnil

Note that the disjunction is really disjoint Whether the action is built on the

toplevel or in encapsulated search the b ehaviour in instantiations is reasonable In

encapsulated search Count even turns out to implicitly representtwotyp es CountUp

and CountDown at once due to the disjunction semantics Left to trigger the planning

pro cess remain instantiation of planning service ob ject its connection to the KB

registration of Count as a typ e of the planning domain and the synthesis request to

obtain a solution plan that counts from to

declare Planner TestPlan Busy

new planner object

create Planner from Eve with init end

Planner setKnowledgeBaseActualKnowledgeBase KnowledgeBase

Planner setAllowedActionTypesCount

Planner synthesisactual Busy TestPlan

A Summary

Installation and customisation of EVE is very simple The given example shows the

basic steps to p erform in order to connect the planning mo dule to the application

domain To get a complete overview ab out programming with EVE we highly

recommend

B Axiomatisation of the MultiAgent Blo ckworld

The following source co de represents the multiagentblocksworld domain and ex

emplary denes a situation description using the listbased knowledge base ob ject

known from the previous installation intro duction from Section A

Action classes of the the blocksworld scenario

the blocksworld generic actions

declare Pickup Stack Unstack Drop

EveCreate UrAction Pickup

Pickup setIdPickup

Pickup addExecutionParameterspickup evevaragent eve

varblock

Pickup addRolesrolesagent block

Pickup addConditionspospostcondi tions

holdingevevaragent eve

varblock

Pickup addConditionsnegpostconditions

handemptyevevaragent

clearevevarblock

ontableevevarblock

Pickup addConditionspospreconditions

handemptyevevaragent

clearevevarblock

ontableevevarblock

EveCreate UrAction Drop

Drop setIdDrop

Drop addExecutionParametersdrop evevaragent eve

varblock

Drop addRolesrolesagent block

Drop addConditionspospostconditions

ontableevevarblock

clearevevarblock

handemptyevevaragent

Drop addConditionsnegpostconditions

holdingevevaragent evevarblock

Drop addConditionspospreconditions

holdingevevaragent evevarblock

EveCreate UrAction Stack

Stack setIdStack

Stack addExecutionParametersstack evevaragent

evevarblock eve

varblock

Stack addRolesrolesagent block block

Stack addConditionspospostconditions

clearevevarblock

onevevarblock evevarblock

handemptyevevaragent

Stack addConditionsnegpostconditions

clearevevarblock

holdingevevaragent eve

varblock

Stack addConditionspospreconditions

clearevevarblock

holdingevevaragent eve

varblock

EveCreate UrAction Unstack

Unstack setIdUnstack

Unstack addExecutionParametersunstack

evevaragent

evevarblock

evevarblock

Unstack addRolesrolesagent block block

Unstack addConditionspospostconditions

holdingevevaragent evevarblock

clearevevarblock

Unstack addConditionsnegpostconditions

handemptyevevaragent

clearevevarblock

onevevarblock evevarblock

Unstack addConditionspospreconditions

handemptyevevaragent

clearevevarblock

onevevarblock evevarblock

declare Planner ActualKnowledgeBase TestPlan

new planner object

create Planner from Eve with init

end

new knowledgebase

create ActualKnowledgeBase from KnowledgeBase

end

Planner setKnowledgeBaseActualKnowledgeBase KnowledgeBase

The KnowledgeBase delivers the start situation

ActualKnowledgeBase reset addonblockb blocka

ontableblocka

ontableblockc

clearblockc

clearblockb

handemptyrobo

handemptyrobo

C Axiomatisation of the Loading Do ck Scenario

This section presents the current axiomatisation of the loading do ck domain Pbc

Generic builds the parenttyp e of all available actions It incorp orates an execution

pro cedure that will transmit commitments to the BBL Inherited from this typ e

are the agentindep endent action typ es that also could serve as a base axiomatisa

tion for multiagent planning Finally the agentsp ecic actions are dened as their

subtyp es

Action classes of the loading dock scenario

local

The finite domains

PbcGeneric

Move

Turn

Grasp

Drop

in

The generic pbcaction

EveCreate UrAction PbcGeneric

PbcGeneric setExecutionproc Parameters Success

local Self ActivationParameter in

ParametersSelfActivationParameternil

PBCControl triggerSelf

ActivationPa

rameter

Success

end

end

general Move command

EveCreate PbcGeneric Move

Move setIdMove

Move addRolesrolesagent x y x y direction

Move addExecutionParametersactivatebehGotorect

argsrectevevarx

evevary

evevarx

evevary

Move addConditionspospreconditions

agentagentnameevevaragent

xevevarx

yevevary

agentdirectionagentnameevevaragent

direc

tionevevardirection

emptyxevevarx

yevevary

Move addConditionspospostconditions

agentagentnameevevaragent

xevevarx

yevevary

agentdirectionagentnameevevaragent

directionunknown

emptyxevevarx

yevevary

Move addConditionsnegpostconditions

agentagentnameevevaragent

xevevarx

yevevary

emptyxevevarx

yevevary

agentdirectionagentnameevevaragent

directionevevardirection

specialised for our agent

EveCreate Move LocalMove

LocalMove setIdLocalMove

LocalMove getRoleagent KB getmyname

the Turn command

EveCreate PbcGeneric Turn

Turn setIdTurn

Turn addRolesrolesagent direction

direction

Turn addExecutionParametersactivatebehTurn

argsevevardirection

Turn addConditionspospreconditions

agentdirectionagentnameevevaragent

direc

tionevevardirection

Turn addConditionspospostconditions

agentdirectionagentnameevevaragent

direc

tionevevardirection

Turn addConditionsnegpostconditions

agentdirectionagentnameevevaragent

direc

tionevevardirection

specialised for our agent

EveCreate Turn LocalTurn

LocalTurn setIdLocalTurn

LocalTurn getRoleagent KB getmyname

the Grasp command

EveCreate PbcGeneric Grasp

Grasp setIdGrasp

Grasp addRolesrolesagent agx agy direction

box boxx boxy type

Grasp addExecutionParametersactivatebehGetbox

argsnil

Grasp addConditionspospreconditions

agentagentnameevevaragent

xevevaragx

yevevaragy

handemptyagentnameevevaragent

agentdirectionagentnameevevaragent

direc

tionevevardirection

boxboxnameevevarbox

boxtypeevevartype

xevevarboxx

yevevarboxy

Grasp addConditionspospostconditions

holdingagentnameevevaragent

boxnameevevarbox

boxtypeevevartype

freexevevarboxx

yevevarboxy

Grasp addConditionsnegpostconditions

handemptyagentnameevevaragent

boxboxnameevevarbox

boxtypeevevartype

xevevarboxx

yevevarboxy

Grasp addConstraintsproc Roles

or

Rolesdirectionnorth

RolesagxRolesboxx

FD Rolesboxy Rolesagy

Rolesdirectionsouth

RolesagxRolesboxx

FD Rolesboxy Rolesagy

t Rolesdirectioneas

RolesagyRolesboxy

FD Rolesboxx Rolesagx

Rolesdirectionwest

RolesagyRolesboxy

FD Rolesboxx Rolesagx

ro

end

specialized for our agent

EveCreate Grasp LocalGrasp

LocalGrasp setIdLocalGrasp

LocalGrasp getRoleagent KB getmyname

the Drop command

EveCreate PbcGeneric Drop

Drop setIdDrop

Drop addRolesrolesagent agx agy direction

box boxx boxy type

Drop addExecutionParametersactivatebehPutbox

argsnil

Drop addConditionspospreconditions

agentagentnameevevaragent xevevaragx yevevaragy

agentdirectionagentname evevaragent di

rectionevevardirection

holdingagentnameevevaragent boxnameevevarbox box

typeevevartype

freexevevarboxx yevevarboxy

Drop addConditionspospostconditions

boxboxnameevevarbox boxtypeevevartype xevevarboxx

yevevarboxy

Drop addConditionsnegpostconditions

holdingagentnameevevaragent boxnameevevarbox box

typeevevartype

freexevevarboxx yevevarboxy

Drop addConstraintsproc Roles

or

Rolesdirectionnorth

oxx RolesagxRolesb

FD Rolesboxy Rolesagy

Rolesdirectionsouth

RolesagxRolesboxx

FD Rolesboxy Rolesagy

Rolesdirectioneast

RolesagyRolesboxy

FD Rolesboxx Rolesagx

Rolesdirectionwest

RolesagyRolesboxy

FD Rolesboxx Rolesagx

ro

end

specialized for our agent

EveCreate Drop LocalDrop

LocalDrop setIdLocalDrop

List of Figures

Normalised Clauses C C

The Task of Plan Generation

Situation Action Typ e Goal and Plan

Nonlinear MultiAgent Plan

Hierarchical Plan

The Task of Plan Analysis

Computational Architecture of EVE

Action Typ e DenitionPlanning Domain Axiomatisation

The Situation Calculus

Propagation of Prop erties in the Situation Calculus

The Event Calculus by Shanahan

Propagation of Prop erties in the Event Calculus

Strong Nonlinear Incorrectness

Event Calculus by Missiaen

Nontermination

A Not Strong Nonlinear Solution

The Simple Event Calculus of EVE

The Extended Event Calculus of EVE

The SLD Step

The SLDNF Step

Insoundness of Nonground NF

Incompleteness of Ground NF

The SLDCNF Step

The De Morgans Laws

The SLDNF Step

Example Pro of with SLDNF

The SLDA Step

The SLDNFA Step

The SLDCNFA Step

The SLDNFA Step

Translation Scheme T Resolution



T Negation As Failure



T Constructive Negation



T Constructive Negation





T Constructive Negation



The MetaAbduction Predicate

T Ab duction



T Ab duction





T Ab duction



Driver for Scheme T



Ob jectOriented Ab duction

the Plan Service Class Eve

The EventClassUrEvent

A display Result

An Example Event Hierarchy

The Default Ab ductive State

An EVECompatible Knowledge Base

the MultiAgentBlocksworld

The InteRRaP Architecture

ALayer within InteRRaP

EVE within the LPL

The Loading Do ck Scenario

ALayer of an AgentArchitecture

Plan Abstraction

Generic resources

CLP is Ab duction

File Hierarchy

References

M Alicia Perez Multiagent planning in Pro digy May

Avrim L Blum and Merrik L Furst Fast Planning Through Planning Graph

Analysis

Bernhard Neb el and Jana Ko ehler Plan Mo dication versus Plan Generation

A ComplexityTheoretic Persp ective pages

Christian Schulte Gert Smolka and Jorg Wurtz Encapsulated Search and

Constraint Programming in Oz March

Christoph G Jung the EVE User GuideFebruary

Christoph G Jung Klaus Fischer and Alastair Burt Resolution Constructive

Negation and Ab duction over Finite Domains in Higher Order Constraint

Programming In Andreas Ab ecker Harald Meyer auf m Hofe Jorg Muller

and Jorg Wurtz editors Proc eedings of the DFKI Workshop on Constraint

Based Problem Solving DFKI Do cument Saarbruc ken Germany February

DFKI GmbH

David Chang Constructive Negation based on the Complete Database In

Rob ert A Kowalski and Kenneth A Bowen editors Proceedings of the th Int

Conf on Logic Programming Seattle pages The MIT Press

Septemb er

K Eshghi and R A Kowalski Ab duction compared with negation as failure

In Proceedings of the st Int Conf on Logic Pr ogramming The MIT Press

C Evans Negation as failure as an approach to the hanks and mcdermott

problem

R James Firby Building symb olic primitives with continuous control routines

Gert Smolka An Oz Primer DFKI Oz Do cumentation Saarbruc ken Ger

many April

Gert Smolka The Oz Programming Mo del In Jan van Leeuwen editor

Computer ScienceToday Lecture Notes in Computer Science vol pages

SpringerVerlag Berlin

Gert Smolka and Christian Schulte Logische Programmierung Skriptum

zur gleichnamigen Vorlesung

S Hanks and D McDermott Default reasoning nonmonotonic logic and the

frame problem pages

Jana Ko ehler Towards a logical treatment of plan reuse pages

Joachim Hertzb erg Planen Einfuehrung in die Planerstel lungsmethoden der

Kuenstlichen Intel ligenzvolume of Reihe Informatik Wissenschaftsverlag

Mannheim Wien Zuehrich

John McCarthy Situations Actions and Causal Laws

John W Lloyd Foundations of Logic Programming nd ext EditionSymb olic

Computation Springer Berlin Heidelb erg New York

Jorg PMuller An Architecture for Dynamical ly Interacting Agents Disserta

tion Universitat des Saarlandes

Keith L Clark Negation as Failure In H Gallaire and J Minker editors

Logic and Databases pages New York Plenum press

N Kushmerik S Hanks and D Weld An algorithm for probabilistic planning

J Lloyd and R Top or Making prolog More Expressive Journal of Logic

Programming

Lo de Missiaen Localized Abductive Planning with the Event Calculus PhD

Dissertation KU Leuven Leuven September

DM Lyons and AJHendricks A practical approachtointegrating reaction

and delib eration

Marc Denecker Lo de Missiaen and Maurice Bruyno oghe Temp oral reasoning

with Abductive Event Calculus January

Mathias Bauer Susanne Biundo Dietmar Dengler Jana Ko ehler and Gabriele

Paul PHI A LogicBased To ol for Intelligent Help Systems Technical rep ort

Saarbrucken

Melvin Fitting First Order Logic and Automated Theorem Proving Texts

and Monographs in Computer Science Springer Verlag New York September

Michael Rosinus ALADIN A Language for Designing InteRRaP Agents

Diplomarb eit Universitat des Saarlandes

Jorg PMuller and Markus Pischel The Agent Architecture InteRRaP Con

cept and Application Technical rep ort Saarbrucken

MurrayP Shanahan Representing continuous change in the event calculus

In Proceedings of the ECAI pages August

Murray Shanahan Rob otics and the Common Sense Informatic Situation

Budap est Hungary to app ear

Nils J Nilsson Principles of Articial Intel ligence Tiago Publishing Company

Palo Alto CA

Peter J Stuckey Constructive Negation for Constraint Logic Programming

In Proceedings LICS

Ralf Wingenter Ein Deduktiver Planungsansatz fur das Verladehofszenario

Diplomarb eit Universitat des Saarlandes

Rob ert A Kowalski Logic for Problem Solvingvolume of Articial Intel li

gence Series Elsevier Science Publisher BV NorthHolland

Rob ert A Kowalski and Marek Sergot A logicbased calculus of events New

Gener ation Computing

Rob ert E Fikes and Nils J Nilsson Strips A new approach to the application

of theorem proving to problem solving Artical Intel ligence

J A Robinson A machineoriented logic based on the resolution principle

Journal of the ACM

ED Sacerdoti Planning in a Hierarchy of Abstraction Spaces In Proceedings

of the IJCAI

ED Sacerdoti A Structure for Plans and Behaviour Elsevier North Holland

M Shanahan Prediction is deduction but explanation is ab duction In Pro

ceedings of the IJCAI page

F von Martial Interactions among autonomous planning systems pages

DE Wilkins Hierarchical Planning Denition and Implementation In Pro

ceedings of the ECAI

Yoav Shoham Whats the frame problem In Michael P George and AmyL

Lansky editors Reasoning about Actions and Plans pages Morgan

Kaufmann Publishers Inc Los Altos CA June

Index



C initial

C C initiates

CET negprecondition

on



posprecondition

start

terminates



jj

Drop

Eve

C KnowledgeBase

Maintain

MemberDisj

MetaAbduction



MetaClause

Pickup

SolveCombinator

Solver

select Solve

variant Stack

BBL StateClass

CPL Unstack

KB UrAction

LPL UrEvent

PS UrPlan

SG act

WIF addConstraints

cho ose addEvent

disunify addRole

fail analysis

maintain before

reprove clear

unify clipped



generic resources end

addConditions end

display end

getState evaluation

initiates evevar

postcondition execute

precondition executestop

setExpense fails

setHeuristic getAllAfter

FiDo getAllEvents

act getConditions

continue getEvent

fails getRole

getState getState

halt getfactdisj

happens handempty

holds happens

happens SIT

holding SLDCNFA

holds SLDCNF

holdsfalse SLDNF

holdstrue SLDNFA

in SLDNFA



initial SLDNFA

initial SLDNF

initiates SLDNF

initiates SLD

member STRIPS

modification Situation Calculus

negpreconditions

ab ducible

next

ab ducible maintenance

nil

ab ducible maintenance

ontable

ab duction

out

ab duction set

pospreconditions

ab duction state

precondition

ab ductive predicate

result

action

setActionBounds

action typ e

setAllowedActionTypes

action typ e

setBefore

action typ e

setDebugLevel

actionplan execution

setEvent

actionplan execution

setKnowledgeBase

agent

setRoleMap

ALADIN

setState

antisymmetry

start

application

stop

architecture

synthesis

Articial Intelligence

terminates

ask op erator

false

assumption

true

atom

if else fi

autonomy

local in end

axiomatisation

or ro

proc end

backtracking

NPhard

BackusNaur Form

SIPE

backward planning

SLDNFA

body

CHICA

b o olean value

DFKI Oz

EVE

calculus

Event Calculus

cell

Event Calculus

choice

choice p oint

GRAPHPLAN

choice rule

InteRRaP

Clarks Completion form

NOAH

Clarks equality theory

NPcompleteness

class

NPhard

classical logic

Oz

clause

PROLOG

clause program existential quantication

closed formula

communication explicit representation

completeness explicit representation

complexity theory explicit representation

computation space exp onential complexity

concurrency extended least commitment

condition

fact

conditional

fact clause

conjunction

failure

consistency

fairness

constraint

nite domain

constraint logic system

nite domain

constraint abstraction

rstorder logic

constructive negation

formula

constructive negation

forward planning

contextdep endent actioneventtyp e

fourvalued logic

free variable

contour

fuzzy logic

co op eration

co op erative domain

general problem solving

correctness

generic resources

cost

goal

goal set

DAI

GPS

De Morgans laws

graph theory

De Morgans laws

groundness

decidability

deduction

head

delib eration

heuristics

denotational semantics

depth b ound

hierarchical planning

depthrst search

higherorder logic

destroyer

hyp othesis

disjunction

hyp othetical reasoning

distributed planning

hyp othetical reasoning

disunication

domain

implication

DPS

implicit representation

during condition

incomplete temp oral knowledge

incomplete temp oral knowledge

eect

incomplete temp oral knowledge

encapsulated search

encapsulated searchdriver

inequality

entity

inference

equality

inx

equality maintenance

initiator

equivalence

interpretation

equivalence semantics

InteRRaP

equivalence transformation

iterative deep ening

event

event duration

KB

eventtyp e

knowledge base

execution

knowledge base

layer plan evaluation

leaf plan graph analysis

least commitment plan mo dication

least commitment plan synthesis

linear planning planaction execution

linearisation planning

linearity assumption planning from scratch

list planning from second principles

loading do ck scenario p ositive precondition

loading do ck scenario p ositive prop erty

lo calised planning p ostcondition

logic precondition

logical connective predicate

logical programming predicate logic

program verication

maintenance

pro of

Malcevs Lemma

prop ert y

MAS

prop osition

meansend analysis

meta programming quantication

metalogic quantier

metho d

rational tree

MGU

reactivearchitecture

mo del

reactivity

monotonicity

reasoning

most general unier

record

multiagent blo cksworld

reexivity

multiagent domain

refutation

negation regression

negation as failure reication

negation as failure relation

negation normal form representation

negative prop erty residue

negative ab ductive goal resolution

negative precondition resource sp ecication

NF role

nonlinear planning role constraint

nonmonotonicity

satisability

scheduling

number

scop e

ob ject orientation search

ob ject state search tree

ob jectoriented ab duction selection rule

semantics

parallelism

semilinear planning

path

situation

pattern of b ehaviour

situation abstraction

p ersistence

skolem term

plan

solution

plan evaluation

soundness

plan abstraction

start situation

plan analysis

state the Event Calculus by Shanahan

statement

strong nonlinearity theorem

strong condition theorem pro of pro cedure

strong nonlinearity theorem pro of pro cedure

theorem proving

structure theory

sub formula thread

subgoal time

substitution transformation function

subsumption transition function

success transitivity

susp ension truth

symmetry tuple

syntax typ e hierarchy

term unication

terminating computation unier

terminating computation universal quantication

universe

the frame axiom

variable

the p ersistence axiom

variant

the ab duction step

the ab duction step

weak condition

the extended Event Calculus of

weak nonlinearity

EVE

worst case assumption

the extended Event Calculus of

EVE

the extended Event Calculus of

EVE

the extended Event Calculus of

EVE

the frame axiom

the frame problem

the Halting Problem

the p ersistence axiom

the qualication problem

the resolution step

the simple Event Calculus of

EVE

the simple Event Calculus of

EVE

the simple Event Calculus of

EVE

the simple Event Calculus of

EVE

the simple Event Calculus of

EVE

the Sussman Anomaly

the tra velling salesman problem

the Turing Machine

the Event Calculus by Missiaen