SituationCalculus
RichardB.Scherl
ComputerScienceDepartment
MonmouthUniversityWestLongBranch,NewJersey
07764-1898U.S.A.rscherl@monmouth.edu
Abstract
Aformalframeworkforspecifyinganddevelopingagents/robotsmusthandlenotonlyknowledgeandsensingactions,butalsotimeandconcurrency.Re-searchershaveextendedthesituationcalculustohandleknowledgeandsensingactions.Otherre-searchershaveaddressedtheissueofaddingtimeandconcurrentactions.Herebothofthesefea-turesarecombinedintoaunifiedlogicaltheoryofknowledge,sensing,time,andconcurrency.There-sultpreservesthesolutiontotheframeproblemofpreviouswork,maintainsthedistinctionbetweenindexicalandobjectiveknowledgeoftime,andiscapableofrepresentingthevariouswaysinwhichconcurrencyinteractswithtimeandknowledge.Furthermore,amethodbasedonregressionisde-velopedforsolvingtheprojectionproblemforthe-oriesspecifiedinthisversionofthesituationcalcu-lus.
Furthermore,specificationofanagent’sabilitytoachieveagoalingeneralinvolvesrequiringthattheagentknowwhattodotoarriveatagoalstate[Moore,1980;Lesp´eranceetal.,2000].Astheabilitytoachieveparticulargoalswillofteninvolvetheabilitytoperformconcurrentactions,theintegra-tionofknowledgeandconcurrencyisanimportantstepinfullyformalizingtheseaspectsofability.
Wedevelopourframeworkwithinthesituationcalcu-lus–afirst-orderformalismforrepresentingandreasoningabouttheeffectsofactions.ThelanguageisbaseduponthedialectofthesituationcalculususedintheCognitiveRoboticsGroupattheUniversityofToronto.Certainly,an-otherformalismcouldhavebeenused.WithinA.I.numer-ousvaryingformalismsareavailablefornrepresentingandreasoningaboutaction(tonameafew,[Shanahan,1995;Baraletal.,1997]).Knowledgehasbeenincorporatedintoanumberofthese(forexample,[Loboetal.,2001;Thielscher,2000]).OutsideofA.I.proper,thereisalso[Fa-ginetal.,1995]ontheinteractionofknowledgeandtime.Butbyworkinginthesituationcalculus,weareabletoextendpreviousworkonreasoning(byregressionandtheo-remproving)tocoverthelanguagedevelopedhereaswell.Furthermore,ourworkissuitabletobeincorporatedintotherobotprogramminglanguagesGOLOGandCONGOLOG.Itcanthenbeusedtospecifyagentsthatmustreasonabouttheinteractionsoftime,knowledge,andconcurrentactions(in-cludingsensingactions).
Thesituationcalculus[McCarthyandHayes,1969]isalanguageformodelingdynamicallychangingworlds.Changestotheworldaretheresultsofactions,whilepos-sibleworldhistoriesconsistingofsequencesofactionsarerepresentedbysituations.Thesituationcalculuscanbeusedforagentplanningviagoalregression.Reiter[Reiter,1991]proposedasimplesolutiontotheframeproblem,anapproachtoaxiomatizationwithinthesituationcalculus.Al-thoughthisapproachtotheframeproblemrequirescertainsimplifyingassumptions,ithasproventobeusefulandisthefoundationforbothgoalregressionandtheprogramminglan-guageGOLOG.GoalregressionwasextendedbyScherlandLevesque[ScherlandLevesque,2003]toapplytoanagentwhocansensepropertiesoftheexternalworld(e.g.,readnumbersonapieceofpaperordeterminetheshapeofanobject).
1Introduction
Theaimofthispaperistodevelopaunifiedapproachforaxiomatizingtheinteractionofknowledge,sensing,time,andconcurrency.Actionshavepreconditionswhichmayincludeknowledgepreconditions.Sensingactionsalterknowledge.Theknowledgeproduceddependsupontherelativetimeatwhichsensingactionsoccurandalsowhetherornotothersortsofactionsoccurconcurrently.Allofthisinteractswiththeagent’sevolvingknowledgeoftime.
Considerarobotgatheringknowledgeaboutitsenviron-ment.Itmovesaboutwhileconcurrentlypanningthecameraandatvariouspointssensestheenvironmentforthepresenceofobjectswithvariouscharacteristics.Theknowledgeob-tainedthroughsensing(positionsofobjectsofvarioussizes,shapesandcolors)dependsuponthepositionoftherobotataparticularpointintime,theangleofthecamera,etc.Formanypurposes,theresultsofsensingactionsthatoccuratthesametimeareimportant.Notonlydowehavetheneedfortwodistinctconcurrentsensingactionsinbinocularstereop-sis,butalsointhesimultaneoususeofotherfeaturessuchastexturegradientsandshadingtoachieveknowledgeofdepthrelationships.Hereitisrelative,notabsolutetime,thatisimportant.
Thispaper1[combinesandextendstheworkofScherlandLevesqueScherlandLevesque,2003]incorporatingthemodelofconcurrencyandtimepresentedbyReiter[Re-iter,2001].Atthesametime,Reiter’ssimplesolutiontotheframeproblemispreserved.Therealdifficultyistoper-formthesynthesisinsuchawaythattheimportantdistinc-tionbetweenindexicalandobjectivetime[Lesp´eranceandLevesque,1995]ispreserved.
Iftheagentcurrentlyknowstheabsolutetime,thenheknowstheabsolutetimeafterexecutinganaction.Butifhedoesn’tknowtheabsolutetime,thenheonlyknowsthathebeganexecutingtheactionsomenumberoftimeunitsago,unlessofcoursehereadsaclock.Whilemaintainingtheseproperties,theresultspresentedhereallowtherepresentationofthevariouswaysinwhichactions(includingsensingac-tionsandpossiblyotherconcurrentactions)interactwithtimeandknowledge.Themethodofregressionisalsoextendedtoworkwiththisaugmentedlanguage.
Section2givesaquickintroductiontothesituationcalcu-lusandSection3doesthesameforthefoundationalaxioms.Therepresentationofknowledgeandsensingactionsarecov-eredinSection4.Concurrencyisintegratedintotheframe-workinSection5.Section6coverssomeadditionalcon-structsofthelanguageandillustratestheirrepresentationalpower.Anumberofpropertiesoftheformulationaredis-cussedinSection7.RegressioniscoveredinSection8.Fi-nally,Section9istheconclusion.
2SituationCalculusandtheFrameProblem
Spacedoesnotpermitafullexpositionofthebackground
material[onthesituationcalculus.TheframeworkdevelopedinReiter,[2001]isfollowedandfulldetailsmaybefoundthereorinScherl,2003].Weassumethattheframeproblemhasbeenhandledbyutilizingsuccessorstateaxioms.
3FoundationalAxioms
Following[LinandReiter,1994;Reiter,2001]thefounda-tionalaxiomsforthesituationcalculusareutilized.Theseaxiomsprovideuswithadefinitionofss,whichsaysthatthereisasequenceofzeroormoreexecutableactionsthatmovefromsituationstosituations.Again,spacedoesnotpermitfulldevelopmentofthismaterialhere.Fulldetailsmaybefoundin[Reiter,2001;Scherl,2003].
4AnEpistemicFluent
ScherlandLevesque[ScherlandLevesque,2003]adaptthestandardpossible-worldmodelofknowledgeto]thesituationcalculus,asfirstdonebyMoore[Moore,1980.Informally,onecanthinkoftherebeingabinaryaccessibilityrelationoversituations,whereasituationsisunderstoodasbeingaccessiblefromasituationsifasfarastheagentknowsinsit-uations,hemightbeinsituationsinsifitistrueineverysaccessible.Sofromsomethings,andconverselyisknownsomethingisnotknownifitisfalseinsomeaccessiblesitua-tion.
1
Anearlierversionofsomeofthisworkhasappearedin[Zim-merbaumandScherl,2000].
Totreatknowledgeasafluent,theyintroduceabinaryrela-tionK(s,s),readas“sisaccessiblefroms”andtreatitthesamewaywewouldanyotherfluent.Inotherwords,fromthepointofviewofthesituationcalculus,thelastargumenttoKistheofficialsituationargument(expressingwhatisknowninsituations),andthefirstargumentisjustanauxiliaryliketheyinBROKEN(y,s).2
ThenotationKnows(P(now),s)(readasPisknowninsituations)canthenbeintroducedasasanabbreviationforaformulathatusesK.Forexample
Knows(BROKENdef
→B(y,nows),)s.
)=∀sK(s,s)
ROKEN(y,Thespecialindexicalnowisinstantiatedwithasituationvari-ableuponexpansion.
Theapproachalsohandlesactionsthatmakeknownthedenotationofaterm.Forthiscase,oneneedsthenotationKref(T(now),s)definedasfollows:
Kref(T(now),s)def
where=xdoes∃xKnowsnotappear(T(nowin)=x,s)
T.Ingeneral,theremaybemanyknowledge-producingac-tions,aswellasmanyordinaryactions.Tocharacterize[allofthese,wehave]followingthepresentationinScherlandLevesque,2003,afunctionSR(forsensingresult),andforeachactionα,asensing-resultaxiomoftheform:
SR(α(x),s)
=r≡φα(x,r,s)(1)
Thisresultis“YES”if“Q”istrueand“NO”otherwise.The
symbolsaregiveninquotestoindicatethattheyarenotflu-ents.ThesensingresultfunctionforSENSEQisaxiomatizedasfollows:
SR(SENSE∨(Qr,=s)“=r≡(r=“YES”∧Q(s))
NO”∧¬Q(s))(2)
Forordinaryactions,theSRresultisalwaysthesame,withthespecificresultnotbeingsignificant.Forexample,wecouldhave:
SR(PICKUP(x),s)
=r≡r=“OK”(3)
InthecaseofaREADwouldτactionthatmakesthedenotationofthetermτknown,wehave:
SR(READτ,s)
=r≡r=τ(s)(4)
Therefore,τhasthesamedenotationinallworldsssuchthatK(sistrue.
,DO(READτ,s)),andsoKref(τ,DO(READτ,s))TheformofthesuccessorstateaxiomforKwithoutcon-currencyisasfollows:
K(s,((DO∃s(a,∧)ss))K=≡
DO(a,∧(s,s)∧s)Ps)
=OSS(a,a,s(5)
s)SR(a,SR()
TherelationKataparticularsituationDO(a,s)iscompletelydeterminedbytherelationatsandtheactiona.
2
NotethatusingthisconventionmeansthattheargumentstoKarereversedfromtheirnormalmodallogicuse.
5Concurrency
Asoriginallydefinedinthesituationcalculus[McCarthyandHayes,1969],actionshadtooccursequentially,withoneactioncompletedbeforeanothercouldbegin.Furthermore,therewasnofacilitytodealwiththecontinuouspassageoftime.Thiscontrastedwithotherformalismssuchastheeventcalculuswhichcouldnaturallyhandleconcurrentactionsandcontinuoustime.
5.1ConcurrencywithKnowledge
TheworkofPinto[Pinto,1994]andReiter[Reiter,2001]proposedanapproachtodealingwithconcurrency,naturalactionsandcontinuoustimewhilestill[maintainingtheso-lutiontotheframeproblem.ReiterReiter,2001]definedanewsortconcurrent,setsofsimpleactions.Variablesa,sorta,..concurrentrepresent.theInReiter’ssortactionsnotation,andthec,ctime,...ofrepresentanaction’stheoccurrenceisthevalueofthataction’stemporalargument.ThusanactionhastheformA(x,t)andforeachactionanaxiomoftheformTIME(A(x,t))=tisrequiredtoindicatethetimeoftheaction.
Concurrentactionsaresetsofordinaryactionsthataretakentorepresentinstantaneousacts.Anactionwithdura-tionisrepresentedbytwoinstantaneousactions—astartac-tionandanendaction.Additionally,thefoundationalaxiomsaremodifiedtoruleoutthepossibilityofprioractionshavinglatertimes.
SoifwewanttorepresentaPRESSINGactionwithduration(asinpressingabuttonthatkeepsalighton),theapproachistodefinetwoactions;STARTPRESSandENDPRESS.WealsomustintroduceafluentPRESSING.Theneededsucces-sorstateaxiomisasfollows:
PRESSING(DO(a,s))≡
a=(STARTPRESSPRESSING(s)∨
∧a=ENDPRESS)
(6)
Thisapproachtorepresentingactionswithdurationissome-thingthatwemakeuseofhere.
But,theuseofatemporalargumentforactionsisproblem-aticinthepresenceofknowledge.GivenoursuccessorstateaxiomforK,itwouldrequiretheagenttoknowthetimeafteranyaction,evenifitwasunknownintheprevioussituation.Toavoidthis,wecannotrepresenttimeasanargumenttotheinstantaneousactions.
Instead,werepresenttheinstantaneousactionsandasso-ciatedtimesasatupleoftheformwithfunctionsACTIONandTIMEdefined,returningthefirstandsecondele-mentsofthetuple: