<<

Linkoping Electronic Articles in

Computer and Information Science

Vol nr

Intro duction To The

Fluent

Michael Thielscher

Department of Computer Science

Dresden UniversityofTechnology

Dresden Germany

Linkoping University Electronic Press

Linkoping Sweden

httpwwwepliuseeacis

Revised version

Revised version publishedonFebruary by

Linkoping University Electronic Press

Linkoping Sweden

Original version was published on October

Linkoping Electronic Articles in

Computer and Information Science

ISSN

Series editor Erik Sandewal l

c

Michael Thielscher

A

Typeset by the author using L T X

E

Formattedusingetendu style

Recommended citation

Author Title Linkoping Electronic Articles in

Computer and Information Science Vol nr

http wwwepliuseeacisOctober

The URL wil l also contain links to both the original version and

the present revised version as wel l as to the authors home page

The publishers wil l keep this article online on the Internet

or its possible replacement network in the future

for a periodofyears from the date of publication

barring exceptionalcircumstances as describedseparately

The online availability of the article implies

apermanent permission for anyone to read the article online

to print out single copies of it and to use it unchanged

for any nonc ommercial research and educational purpose

including making copies for classroom use

This permission can not berevoked by subsequent

transfers of copyright Al l other uses of the article are

conditional on the consent of the copyright owner

The publication of the article on the date statedabove

included also the production of a limited number of copies

on paper which werearchived in Swedish university libraries

like al l other written works published in Sweden

The publisher has taken technical and administrative measures

to assure that the online version of the article wil l be

permanently accessible using the URL statedabove

unchanged and permanently equal to the archived printedcopies

at least until the expiration of the publication period

For additional information about the Linkoping University

Electronic Press and its procedures for publication and for

assuranceofdocument integrity ple ase refer to

its WWW home page http wwwepliuse

or by conventional mail to the address statedabove

Motivation

The purp ose of the Fluent Calculus is to solve the inferential Frame Prob

lem While the representational asp ect of the Frame Problem means the

problem of sp ecifying all noneects of actions the inferential asp ect means

the problem of actually computing these noneects The latter concerns

each uentvalue which when proving a theorem is needed in a situation

other than the one for whichitisgiven or in which it arises as an eect

of an action or event Apparently onebyone and using separate instances

of the relevant axioms every such uentvalue needs to b e carried from

the p oint of its app earance past eachintermediate situation to the p oint

of its use This is done for instance in the Situation Calculus if successor

state axioms are used no matter whether reasoning is p erformed forward in

time or via regression and in the Event Calculus where survival needs

to b e proven indep endently for eachuentvalue If all uentvalues

are needed in exactly the situations in which they are given or arise then

the inferential Frame Problem causes no computational burden at all The

more uents have to b e carried unchanged through manyintermediate sit

uations or event o ccurrences however the more valuable can a solution to

the inferential Frame Problem b e

The Fluent Calculus which ro ots in the logic programming formalism

of addresses the inferential Frame Problem by sp ecifying the eect of

actions in terms of how an action mo dies a state The application of a

single state up date axiom always suces to derivetheentire change

caused by the action in question Central to the axiomatizationtechnique

of the Fluent Calculus is a State swhich relates a situation s

to the state of the world in that situation In turn these world states

are collections of uents which are reied to this end ie treated as terms

Fluents that are known to hold in a state are joined together using the binary

function symbol This function is assumed to b e b oth asso ciativeand

commutative It is illustratively written in inx notation

As an example supp ose that ab out the initial state in some Blo cks World

scenario it is known that blo ck A is on some blo ck x whichinturnstands

on the table and that nothing is on top of blo ck A or blo ck B In the

Fluent Calculus this incomplete knowledge can b e axiomatized as follows

x z State S On A x On x Table z

y z z On y A z z On y B z

Put in words of state State S it is known that for some x both On A x

and On x Table are true and p ossibly some other facts z hold to owith

the restriction that z do es not include a uentoftheform On y A nor

On y B of whichwe know they are false

State up date axioms sp ecify how the states at two consecutive situations

are related to each other The universal form of these axioms is s

State Do A s State s where s states conditions on s or rather

on the corresp onding state under which denes how the successor state

State Do A s is obtained by mo difying the current state S tates For

example let the eect of an action denoted by Move u v w bethatthe

k w blo ck u is moved away from the top of blo ck v onto the top of blo c

A suitable state up date axiom is

Poss Move u v w s

State Do Move u v w s On u v State s On u w

That is if Move u v w is p ossible and p erformed in s then the new

state plus On u v equals the old state plus On u w In other words the

initial situation

A A



B C B C

 

goal situation

A A



B C B C

 

Figure A simple planning problem with incomplete information

only negative eect of this action is On u v and the only p ositive eect

is On u w

The preconditions of our action Move u v w are that the blo cktobe

relo cated u is currently on v and that b oth u and w are clear ie not

obstructed byany other blo ck Formally

Poss Move u v w s

Holds On u v s x Holds On x us Holds On x w s

where Holds f s is a macro which abbreviates z State sf z

Recall from ab ove the partial initial sp ecication given byformula

and supp ose blo ck A shall b e moved away from its current lo cation onto

blo ck B Then the term State S in the instance fuA v x w B sS g

of state up date axiom can b e replaced by a term which equals State S

according to So doing yields after evaluating Poss Move A x B S

x z State Do Move A x B S On A x

On A x On x Table z On A B

This formula can b e simplied to

A B x z State Do Move A x B S On x Table z On

In this way one obtains from an incomplete initial sp ecication a still partial

description of the successor state which in particular includes the unaected

uent On x Table This prop ertythus survived the computation of the

eect of the action and so needs not b e carried over by separate application

of an axiom

Providing a solution to the inferential Frame Problem the merits of

state up date axioms b ecome apparent as so on as larger reasoning problems

are considered Take for example the planning problem sketched in Fig

ure Of the starting situation it is known that eachblock A is on top

i

of the corresp onding blo ck B and that all blo cks A and C are clear

i i i

The goal is to reshue the conguration so that each blo ck A is on the

i

corresp onding C

i

We rst enco de this planning problem by means of the Situation Calculus

formalism as describ ed by Let On u v s denote that blo ck u is on v

in situation s then the partial knowledge of the initial situation can b e

formalized as

On A B S On A B S

x On x A S On x A S

On x C S On x C S

The goal is to reach a situation S which satises

On A C S On A C S

the only Assuming that On is the only relevantuentand Move u v w

relevant action a suitable eect sp ecication is given by the successor state

axiom

Poss a s

On u w Do a s v a Move u v w

On u w s v a Move u w v

along with the precondition axiom

Poss Move u v w s

On u v s x On x u s On x w s

Now a straightforward solution to the planning problem is to movein

succession the blo cks A A away from their initial lo cation onto

blo cks C C that is

S Do Move A B C Do Move A B C S

In order to formally verify this action sequence a solution let UNA be

a suitable collection of axioms expressing uniqueness of names Then

f gUNA j A pro of of this theorem requires at least

instances of the successor state axiom As many as of these

instances are used to conclude that some uentisnot changed bysome

action

The corresp onding Fluent Calculus formalization of the planning prob

lem consists of the initial sp ecication

z State S On A B On A B z

x z z On x A z z On x A z

z On x C z z On x C z

and the goal sp ecication

z State S On A C On A C z

As ab ove let S b e the situation which corresp onds to the plan of moving

in succession the blo cks A from B onto C Let b e the foundational

i i i

axioms of the Fluent Calculus see b elow then a pro of for the theorem

f gj requires just instances of the state up date

axiom one for each p erformed action

The computational value of the Fluent Calculus is crucially dep endent

on an ecient treatment of equality While the simple addition of equality

axioms may constitute a considerable handicap for theorem proving a va

riet y of ecient constraint solving algorithms have b een develop ed for the

particular equational theory needed for the function see eg



If n is the number of blocks of each kind A B and C then n instances are

needed to keep track of the lo cations of the blo cks A and n n

i

n

n instances for the relevant information ab out the blo cks C not yet b eing

i

 o ccupied

Fluent Calculus Signatures

Fluent Calculus signatures can b e considered reied versions of standard Sit

uation Calculus signatures which are manysorted rstorder languages

with equalitywhich include the sp ecial sort sit for situations Some

predicate symb ols in are uent denotations these are of arity with

the last argument b eing of sort sit The corresp onding Fluent Calculus

signature is then obtained by

replacing each n place predicate symbol which denotes a uent

and whose argumentisofsort sorts sit byan n place function

symb ol whose argumentisofsort sorts

adding the binary function symbol and the constant which serves

as a unit element wrt

adding a sort uent towhich b elong all wellsorted terms with leading

function symb ol obtained in step and a sort state which is the least

set to which b elong the constant each uent and each t t where

t t are of sort state

adding the unary function State whose argument is of sort sit

Foundational Axioms

Fundamental for any Fluent Calculus axiomatization is the axiom set EUNA

the extended unique name assumptions Its denition relies on a complete

ACunication algorithm ie a unication pro cedure by which are com

puted complete sets of most general uniers wrt the equational theory of

asso ciativitycommutativity and existence of unit element see eg

Set EUNA comprises the following equational axioms

The axioms AC for and

x y z x y z

x y y x

x x

All variables are universally quantied

For anytwo terms t and t of sort other than state and with

variables x

a if t and t are not uniable then

xt t

b if t and t are uniable with mgu then

x t t y

where y denotes the variables whichoccurin but not in x

For anytwo terms t and t of sort state and with variables x



By we denote the equational formula x r x r constructed from

 n n

the substitution fx r x r g

n n

a if t and t are not ACuniable then

xt t

b if t and t are ACuniable with the complete set of uniers

cU t t then

AC





 

x t t y

cU t t

AC

where y denotes the variables which o ccur in but not in x

The axioms of item in conjunction with the standard uniqueness of names

assumption in item ensure that EUNA is unication complete wrt

state terms and the equational theory AC These axioms entail inequality

of two state terms whenever these are comp osed of dierentuent terms

The assertion that some uent f holds resp do es not hold in some

State sf z resp z State s f z situation s is formalized as z

This allows to intro duce the common Holds predicate though not as part

of the signature but as a mere abbreviation for a certain equality sentence

def

Holds f s z State sf z

Then any Situation Calculus assertion ab out situations can b e easily trans

ferred to the Fluent Calculus for example the Situation Calculus formu

la On A Table S x On x B S reads Holds On A Table S

x Holds On x B S in the Fluent Calculus

Finally it needs to b e guaranteed that state terms do not contain any

uenttwice or more that is

s x z State sx x z x

It will b e explained shortly why is not required to b e idemp otentto

this end

State Up date Axioms

The schema s State Do A s State s is the universal form of a

state up date axiom Typically condition scombines atom Poss A s

with a formula consisting of Holds f s atoms The form of the up date

comp onent itself dep ends on the ontological assumptions that can b e

made of the action in question We will discuss three cases in turn

The Simple Case

Deterministic actions with only direct and closed eects give rise to the

simplest form of state up date axioms where is a mere equation relating

State Do A s to State s By closed eects wemeanthatanactiondoes

not have p otentially innitely many eects Supp ose action A has a p ositive

eect f then this uent simply needs to b e coupled onto the old state term

A has a negative eect via State Do A s State s f If action

then the uent f which b ecomes false needs to b e withdrawn from the old

state The scheme State Do A s f State s serves this purp ose

The combination of these twoschemes constitutes the general form of state

up date axioms for deterministic actions with only direct eects



s State Do A s State s



where are the negative eects and the p ositive eects resp ectively

of action A under condition s The p erfect symmetry of the equation

in the consequentallows using a state up date axiom equally for reasoning

forward and backward in time

State up date axiom for the Move action b elongs to the simple case

here are two more selfexplanatory examples

Poss Shoot x y s Holds Loaded xs Holds Dead y s

State Do Shoot x y s Loaded xState s Dead y

Distancexy

Poss Walk rxys Holds Time ts t t

Velocity r

State Do Walk rxys At rx Time t

State s At ry Time t

Under the provision that actions do not have op en eects simple state

up date axioms can b e fully mechanically generated from a set of Situation

Calculusstyle eect axioms if the latter can b e assumed a complete account

of the relevant eects of an action For example our state up date

axiom for the Move action would result from applying this construction

to the two eect axioms

Poss Move u v w s Holds u w Do Move u v w s

Poss Move u v w s Holds u v Do Move u v w s

It has b een proved that a collection of thus generated state up date axioms

suitably reects the basic assumption of p ersistence This is the primary

theorem of the FluentCalculus

Disjunctive State Up date Axioms

Nondeterministic actions can b e very elegantly sp ecied by means of dis

junctive state up date axioms s State Do A s State s where

is a disjunction of the p ossible eects ie state up dates of the resp ective

action The following for instance sp ecies the alternative outcomes when

p erforming the Russian roulettelike spinning of the chamberofaloaded

gun x

Poss Spin xs Holds Loaded xs

State Do Spin xs Loaded xState s

State Do Spin xs State s

That is uent Loaded xmayormay not b ecome false when p erforming

the action Spin x



This scheme is the sole reason for not stipulating that b e idemp otent contrary

to what one mightintuitively exp ect For if the function were idemp otent then

the equation State Do A s f State swould b e satised if State Do A s

contained f Hence this equation would not guarantee that f b ecome false Foun

dational axiom to o is vital for this scheme in case of incomplete knowledge of

world states



By op en eects we mean an unbounded numb er of direct eects

State Up date Axioms with Ramications

The Ramication Problem denotes the problem of handling indirect ef

fects of actions These eects are not explicitly represented in action sp eci

cations but follow from general laws socalled state constraints describing

dep endencies among uents As an example consider the extension of the

Yale Sho oting domain by the state constraint Walking y Dead y

The constraint itself is straightforwardly axiomatized as

Holds Walking y s Holds Dead y s

As argued in this state constraint gives rise to the indirect eect that

the turkey stops walking as so on as it is shot More preciselyifboth

Walking Turkey and Dead Turkey happ en to b e true when an action is

p erformed which causes Dead Turkey then this action additionally causes

Walking Turkey Such further indirect eects can b e accounted for by

the successive application of socalled causal relationships These

state new eects are used to dene a predicate Causes state eects new

which means that in the current state state the o ccurred eects eects

give rise to an additional eect resulting in the up dated state new state

eects Inthisway the indirect eect and the up dated currenteects new

in the example is accommo dated via the following denition

state new eects Causes state eects new

z eects Dead y z

new state Walking y state

new eects eects Walking y

where a subterm F represents the o ccurrence of a negative eect From

this denition we can derive for instance that whenever the turkey is dead

but still walking after an action has o ccurred with the eects Loaded Gun

and Dead Turkey then Walking Turkey is additionally caused that is

formally

Causes Dead Turkey Walking Turkey z

Loaded Gun Dead Turkey

Dead Turkey z

Loaded Gun Dead Turkey Walking Turkey

State up date axioms which account for indirect eects are of the form

s



z State s



Ramify z State Do A s

where



are the direct negativeeects

are the direct p ositive eects

Ramify state eects new state means that the successive applica

tion of zero or more causal relationships to state state and eects

eects results in state new state

The axiomatizations of the underlying state constraints such as guar

antee that the overall resulting state State Do A s satises all con

straints The denition of predicate Ramify requires a standard second

order axiom to characterize the reexive and transitive closure of Causes

Ramify state eects new state



s e s e s e

 

 

 

 

 

 



 

 

s e s e s e



 

s e s e Causes s e s e

 

 

s e s e

 

 

 

 

 

 

new eects state eects new state new eects

Along with the axioms ab ove and the foundational axioms of the basic

Fluent Calculus this state up date axiom

Poss Shoot x y s Holds Loaded xs Holds Dead y s

State sz Loaded x

Ramify z Dead y Loaded x Dead y

State Do Shoot x y s

entails that Holds Loaded Gun S Holds Walking Turkey S with

S Do Shoot Gun Turkey S

References

Andrew B Baker Nonmonotonic reasoning in the framework of situ

ation calculus Articial Intel ligence

HansJurgen Burc kert Alexander Herold Deepak Kapur Jorg H Siek

mann Mark E Stickel M Tepp and H Zhang Op ening the AC

unication race Journal of AutomatedReasoning

Matthew L Ginsb erg and David E Smith Reasoning ab out action I I

The qualication problem Articial Intel ligence

Steve Hanks and Drew McDermott Nonmonotonic logic and temp oral

pro jection Articial Intel ligence

Steen Holldobler and Josef Schneeb erger A new deductive approach

to planning New Generation Computing

Steen Holldobler and Mic hael Thielscher Computing change and

sp ecicity with equational logic programs Annals of and

Articial Intel ligence

Joxan Jaar JeanLouis Lassez and Michael J Maher A theory of

complete logic programs with equality Journal of Logic Programming

Hector Levesque Fiora Pirri and Ray Reiter Founda

tions for the situation calculus Linkoping Electronic Arti

cles in COmputer and Information Science URL

httpwwwepliuseeacis

Leszek Pacholski and Andreas Po delski Set constraints a p earl in

research on constraints In G Smolka editor Proceedings of the Inter

national Conference on Constraint Programming CPvolume of

LNCS pages Springer

Ray Reiter The frame problem in the situation calculus A simple

solution sometimes and a completeness result for goal regression In

V Lifschitz editor Articial Intel ligence and Mathematical Theory of

Computation pages Academic Press

Murray Shanahan Solving the Frame Problem A Mathematical In

vestigation of the Common Sense Law of MIT Press

John C Shepherdson SLDNFresolution with equality Journal of

AutomatedReasoning

Michael Thielscher Ramication and causality Articial Intel ligence

Michael Thielscher Reasoning ab out actions Steady versus stabilizing

state constraints Articial Intel ligence

Michael Thielscher Towards state up date axioms Reifying successor

state axioms In L F del Cerro J Dix and U Furbach editors

Proceedings of the European Workshop on Logics in AI JELIAvol

ume of LNAI pages Dagstuhl Germany Octob er

Springer Also conditionally accepted for Articial Intel ligence