An Overview of

silkthrilledΛογισμικό & κατασκευή λογ/κού

18 Νοε 2013 (πριν από 3 χρόνια και 6 μήνες)

67 εμφανίσεις

CHAPTER 13
AnOverviewof
Agent-OrientedProgramming
YoavShoham
1
havebeenworkinginareasrelatedtosoftwareagentsforanumberof years
now,togetherwith manystudentsandothercolleagues.Recently,terms
suchas"(intelligent)(software)agents,""knowbots,"and"softbots"have
becomequitepopular.The work takingplaceunderthisumbrellais diverse,
varyingin content,style,andqualitysufficientlytorendertermssuchas"soft-
wareagent"meaninglessin general.I havespenta fair amountof timein the
pasttwoyearstryingtounderstandvariousagent-relatedwork inindustryand
academia.However,inthischapterI will notattempttoputanyorderintothis
area,nor positionour ownwork atStanfordwithinit.This isthetopicof an-
otherpapercurrentlyin theworks.The discussionherewill beconfinedtore-
viewingour own work on multi-agentsystemsin generalandagent-oriented
programminginparticular.
Agent-OrientedProgramming:SoftwarewithMentalState
In 1989I coinedthetermagent-orientedprogramming(AOP) todescribeanew
programmingparadigm,onebasedoncognitiveandsocietalviewof computa-
tion.Althoughnew,theproposalwasinspiredbyextensivepreviousresearchin
Artificial Intelligence(Al),distributedcomputing,andotherneighboringdisci-
plines.This chapterwill summarizesomeof themajorideasfrompreviousre-
search.A moredetaileddiscussionof AOP appearsinShoham(1993).
I
I
,1
WhatIs anAgent?
Mostoften,whenpeopleinAl usetheterm"agent,"theyrefertoanentitythat
,,11
II~
I~il
272 SHOHAM
functionscontinuouslyandautonomouslyin anenvironmentin whichother
processestakeplaceandotheragentsexistoThis is perhapstheonlyproperty
thatisassumeduniformlybythosein Al whousethetermoThe senseof"au-
tonomy"isnotprecise,but thetermistakentomeanthattheagents'activities
donotrequireconstanthumanguidanceor intervention.Oftencertainfurther
assumptionsaremadeabouttheenvironment,for examplethatit is physical
andpartiallyunpredictable.lo fact,agentsaresometimestakentoberobotic
agents,inwhichcaseotherissuessuchassensoryinput,motorcontrol,andtime
pressurearementiooed.
Fioally,agentsareoftentakentobe"high-level."Althoughthissenseisquite
vague,manytakesomeversionof it todistioguishagentsfromothersoftwareor
hardwarecomponents.The highlevelismanifestedio symbolicrepresentation
and/orsomecognitive-likefunction:agentsmaybe"informable"(Geoesereth
1989),maycontainsymbolicplansin additiontostimulus-responserules(Tor-
rance1991;Hayes-Rothetal.1989;MitcheIl1990),andmayeveopossessoatural-
languagecapabilities.This senseisnotassumeduniformlyin Al,aodin facta
certaincounter-ideologydeliberatelydeniesthecentralityor evenexistenceof
high-Ievelrepresentationinagents(AgreandChapman1987;Brooks1986).
Clearly,thenotionof agenthoodin Al isanythingbut crispoI shouldthere-
foremakeit cIearwhat1meanbytheterm"agent,"whichispreciselythis:An
agentisanentitywhosestateisviewedasconsistingof mentalcomponentssuchas
beliefs,capabilities,choices,andcommitments.Thesecomponentsaredefinedio a
precisefashionandstandin roughcorrespondencetotheircommonsensecoun-
terparts.In thisview,therefore,agenthoodisin themind of theprogrammer:
Whatmakesanyhardwareor softwarecomponentaoagentispreciselythefact
thatonehaschosentoanalyzeandcontrolit inthesementalterms.
The questionof whatanagentisisoowreplacedbythequestiooof whaten-
titiescanbeviewedashavingmentalstate.The answeris thatanythingcanbe
sodescribed,althoughit isnotalwaysadvantageoustodo so.This viewisnot
originaltome.For example,in Dennett(1987)andotherpublicatioos,Dennett
proposesthe"intentionalstance,"fromwhichsystemsareascribedmentalqual-
itiessuchasintentionsandfreewill.The issue,accordingtoDennett,is oot
whetherasystemreallyisintentional,butwhetherwecancoherentlyviewit as
such.Similar sentimentsareexpressedby McCarthy(1979),whoalsodistin-
guishesbetweenthelegitimacyof ascribingmentalqualitiestomachinesandits
usefulness:
To ascribecertainbeliefs,freewill,intentions,consciousness,abilities,or wantstoa
machineor computerprogramislegitimatewhensuchanascriptionexpressesthe
sameinformationaboutthemachinethatit expressesabouta personoIt is useful
whentheascriptionhelpsus understandthestructureof the machine,itspastor
futurebehavior,or how to repairor improveit.It is perhapsneverlogicallyre-
quiredevenfor humans,but expressingreasonablybrieflywhat isactualIyknown
aboutthestateof themachinein a particularsituationmayrequirementalquali-
1
""""
AGENT-ORIENTED PROGRAMMING 273
tiesor qualitiesisomorphicto them.Theoriesof belief,knowledgeandwanting
canbeconstructedfor machinesinasimplersettingthanfor humans,andlaterap-
pliedtOhumans.Ascriptionof mentalqualitiesismoststraightforwardfor machines
of knownstructUresuchasthermostatsandcomputeroperatingsystems,but is
mostusefulwhenappliedtoentitieswhosestructureisveryincompletelyknown.
In Shoham(1989),I illustratethepointthroughthelight-switchexample.Ir
isperfectlycoherenttotreatalightswitchasa(verycooperative)agentwiththe
capabilityof transmittingcurrentat will,who iovariablytransmitscurrent
whenit believesthatwe wantit traosmittedandnot otherwise;flickingthe
switchissimplyour wayof communicatingour desires.However,whilethisis
acoherentview,itdoesnotbuyusanything,sioceweesseotiallyunderstandthe
mechanismsufficientlytohavea simpler,mechanisticdescriptionof itsbehav-
ior.In cootrast,wedo not haveequallygoodknowledgeof theoperationof
complexsystemssuchrobots,people,and,arguably,operatingsystems.lo these
casesit isoftenmostconvenienttoemploymentalterminology;theapplication
of theconceptof"knowledge"to distributedcomputation,discussedbelow,is
anexampleof thisconvenience.1
111'\tI
IJ~
'''1Ii
"Ii'
,
I~i
,.UIII11
,!~r~~
'Ii''''!
Agent-VersusObject-OrientedProgramming
I mentionedpreviouslythattheascriptionof mentalconstructsmustbecoher-
entandusefuI.The applicationof thelogicof knowledgeindistributedcompu-
tation,giventhereasanexample,usedthementalconstruct"knowledge"in a
particularway:it mappedit ontoanexistingcomputationalframework(adis-
tributednetworkof processors)andusedit toreasonaboutthesystem.The use
wewill makeof mentalconstructsisdifferent:ratherthanusethemfor mere
analysis,wewill employthemtodesignthecomputationalsystem.The various
mentalcategorieswill appearin theprogramminglanguageitself,andthese-
manticsof theprogramminglanguagewill berelatedto thesemanticsof the
mentalconstructS.This is similar in spirit to a developmentwithin thedis-
tributedcomputationcommunity,wherea proposalhasbeenmadetoinclude
testsfor epistemicpropertiesin theprotocolsthemselves(HalpernandZuck
1987);however,uptill nowtherehasbeennofollowupontheproposal.
I haveproposeda computationalframeworkcalledagent-orientedprogram-
ming(AOP).The nameis notaccidental,sincefromtheengineeringpointof
viewAOP canbeviewedasaspecializationof theobject-orientedprogramming
(OOP) paradigm.I meanthelatterinthespiritof Hewitt'soriginalActorsfor-
malism(Hewitt1977),ratherthaninsomeof thesensesinwhichit usedtoday.
Intuitively,whereasOOP proposesviewingacomputationalsystemasmade
upof modulesthatareabletocommunicatewithoneanotherandthathavein-
dividualwaysof handlingincomingmessages,AOP specializestheframework
byfixingthestate(nowcalledmentalstate)of themodules(nowcalledagents)to
consistof preciselydefinedcomponentscalledbeliefs(includingbeliefsabout
1111
1111
11_11
l."
'111
III~'
011
111
111
"1,
11
11:
1'1
274 SHOHAM
Figure 1.OOP versusAOP.
theworld,aboutrhemselves,andabouroneanorher),capabiliries,choices,and
possiblyorhersimilarnorions.A compurarionconsistsof rheseagents'inform-
ing,requesting,offering,accepting,rejecting,competing,andassistingonean-
other.This ideaisborroweddirectlyfromthespeechactliterature(Grice1989;
Searle1969;Austin1962).
Speechacttheorycategorizesspeech,distinguishingbetweeninforming,re-
questing,offeringandsoon;eachsuchtypeof communicativeactinvolvesdif-
ferentpresuppositionsandhasdifferenteffects.Speech-acttheoryhasbeenap-
pliedin Al,in naturallanguageresearchaswelI asin planrecognition.To my
knowledge,AOP andMcCarthy'sElephant2000languagearethefirstattempts
to basea programminglanguagein parton speechacts.Figure 1summarizes
therelationbetweenAOP and00p'2
On theResponsibleUseofPseudo-MenralTerminology
The previousdiscussionreferredtomentalisticnotionssuchasbeliefandcom-
mitment.In ordertounderstandthesensein whichI intendthese,considerthe
useof logicsof knowledgeandbeliefinAl anddistributedcomputation.These
logics,whichwereimporteddirectlyfromanalyticphilosophyfirsr to Al and
thentootherareasof computerscience,describethebehaviorof machinesin
termsof notionssuchasknowledgeandbelief.In computersciencethesemen-
talistic-soundingnotionsareactualIygivenprecisecomputationalmeaningsand
areusednot only to provepropertiesof distributedsystems,but to program
themaswell.A typicalrulein suchaknowledge-basedsystemsis"if processor
A doesnotknowthatprocessorB hasreceiveditsmessage,thenprocessorA
will not sendthenextmessage."AOP augmentstheselogicswith formalno-
tionsof choices,capabilities,commitments,andpossiblyothers.A typicalrulein
!
AGENT-ORIENTED PROGRAMMING 275
theresultingsystemswilI be"if agentA believesthatagentB haschosentodo
somethingharmfultoagentA,thenA will requestthatB changeitschoice."In
addition,temporalinformationis includedtoanchorbelief,choices,andsoon
inparticularpointsintime.
Hereagainwemaybenefitfromsomeideasin philosophyandlinguisrics.As
in thecaseof knowledge,thereexistswork in exactphilosophyon logicsfor
choiceandability.AlthoughtheyhavenotyethadaneffectinAl comparableto
thatoflogicsofknowledgeandbelief,theymayinthefuture.
Intentionaltermssuchasknowledgeandbeliefareusedinacurioussensein
theformalAl community.On theonehand,thedefinitionscomenowherecIose
to capturingthefulI linguisticmeanings.On theotherhand,theintuitions
abouttheseformalnotionsdoindeedderivefromtheeveryday,commonsense
meaningof thewords.What iscuriousisthat,despirethedisparity,theevery-
dayintuitionhasprovenagoodguidetoemployingtheformalnotionsinsome
circumscribedapplications.AOP aimsrostrikeasimilarbalancebetweencom-
putationalutilityandcommonsense.
11
~~~
Two Scenarios
Belowarerwoscenarios.The firstisfairlycomplexandservestoiIIustratethe
rypeof futureapplicationsenvisioned.The secondisa toyexampleandserves
rhreepurposes:it iIIustratesa numberof AOP ideasmorecrisply;it is imple-
mentablein thesimpleAGENT-O languagedescribedlaterinthechapter;and
it ilIustratesthefactthatagentsneednotberoboticagents.
ManufacturingAutomatÍon.Alfred andBrendawork at acar-manufacturing
plant.Alfredhandlesregular-ordercars,andBrendahandlesspecial-orderones.
The planthasaweldingrobor,Calvin.The plantiscontrolIedbyacoordinating
program,Dashiel.ThefolIowingscenariodevelops,involvingcommunicationbe-
tweenAlfred,Brenda,CalvinandDashiel.Ir containscommunicationactssuch
asinforming,requesting,committing,permitting,andcommandingandrequires
agentstoreasonaboutthebeliefs,capabilities,andcommitmentsofotheragents.
8:00:Alfred requeststhatCalvinpromisetoweldtenbodiesfor himthat
day;Calvinagreestodoso.
8:30:Alfred requeststharCalvinacceptthefirstbody,Calvinagrees,and
thefirstbodyarrives.Calvinstartsweldingit andpromisesAlfredtonoti-
fyhimwhenit isreadyforthenextbody.
8:45:BrendarequeststhatCalvin work on a special-ordercar whichis
neededurgently.Calvinrespondsthatit cannotrighrthenbutthatit will
whenir finishesthecurrentjob,atapproximately9:00.
9:05:CalvincompletesweldingAlfred'sfirstcar,shipsit out,andoffersto
weldBrenda'scaroBrendashipsit thecar,andCalvinstartswelding.
I1
I
I
~
OOP
AOP
Basicunit
object
agent
Parametersdefining unconstrained
beliefs,commitments,
stateof basicunit
capabilities,choices...
Processof computation
messagepassingand
messagepassingand
responsemethods
responsemethods
Typesof message unconstrained
inform,request,offer,
promise,decline...
Constraintsonmethods
none
honesty,consistency...
276 SHOHAM
9:15:AlfredinquireswhyCalvinisnotyetreadyfor his(Alfred's)nextcaro
Calvinexplainswhyandalsothatit (Calvin)expectstobereadybyabout
10:00.
9:55:Calvin completesweldingBrenda'scar andshipsit out.Brendare-
queststhatit reacceptit anddosomepainting,butCalvinrefuses,explain-
ingthatit doesnotknowhowtopaint.Calvinthenofferstoweldanother
carfor AlfredandproceedstoweldAlfred'scarsforawhile.
12:15:BrendarequeststhatCalvin committo weldingfour morespecial-
ordercarsthatday.Calvinrepliesthatit cannot,sincethatconflictswithits
commitmentto Alfred,who still hassixunweldedcars.Brendarequests
Alfred to releaseCalvin fromits commitmentto Alfred.Alfred refuses.
BrendarequeststhatDashiel(rememberDashiel?)orderCalvintoaccept
her importantrequestandrevokeitscommitmentto Alfred.Dashielor-
dersCalvintoweldtwoof Brenda'scars,andthenasmanyof Alfred'sas
timeallows.
3:30:Calvin sensesit is low on lubricant,and,without interruptingits
work,asksAlfred for whenthenextlubricationis scheduled.Alfred re-
spondsthathedoesn'tknow,but thatDashielshouldknow.Calvinasks
Dashiel,who informsit that thenextlubricationis scheduledfor 4:00.
Sincethatissufficientlysoon,Calvincontinuestoweld.
Airline Reservation.This exampleisa minormodificationof oneduetoJohn
McCarthy(1990),whousesit to illustratehisElephant2000programminglan-
guage.The exampleinvolvesthreeagents:apassengerP,anairlinecIerkC,and
C'ssupervisorS.P andS arehuman,andC isaprogram(orisit theotherway
around?Or perhapsall threeareprograms?).Notethatbyconfirmingareser-
vation,theairlineentersiotoacommitmenttoissueaboardingpasstothepas-
sengerattheappropriatetime.Again,thefollowingexchangeinvolvesrequest-
ing(aqueryisarequesttoinform),informing,permitting,anddenying,aswell
asmentalcomponentssuchasknowledgeandcommitment.
March
P faC:PleaseinformmewhatflightsyouhavefromSanFranciscotoNew
York onApril18.
CfaP:Flight 354departsat08:30,flight293departsat 10:00,flight441de-
partsatnoon.
P faC:Pleasebookmeon354.
CfaP:That issoldout.
P faC:Pleasebookmeon293.
CfaP:That isconfirmed;yourreservationnumberis112358.
P faC:Pleasebookmealsoon441.
CfaP:Thatconflictswith293;I amnotallowedtodoublebookapassenger.
l
I
AGENT-ORIENTED PROGRAMMING 277
P
fa C:Pleaseget permissiontodo so.
C faS:I requestpermissionforthefollowingdoublebooking.
SfaC:Permissiondenied.
C faP:Sorry,I cannotgetapproval.
April18,attheairport
P faC:My nameisP;I haveareservationfor flight293.
C faP:Hereisyourboardingpass.
"
!I.
Overviewof theAOP Framework
A completeAOP systemwill includethreeprimarycomponents:
.
A restrictedformallanguagewithcIearsyntaxandsemanticsfor describ-
ing mentalstate.The mentalstatewill bedefineduniquelyby several
modalities,suchasbeliefandcommitment.
.
An interpretedprogramminglanguagein whichtoprogramagents,with
primitivecommandssuchasREQUEST andINFORM.The semanticsof
theprogramminglanguagewill dependinpartonthesemanticsof mental
state.
.
An"agentifier,"convertingneutral devicesinto programmableagents.
In theremainderof thisdocumentI will startwithashortdiscussionof men-
tal state.I will thenpresentageneralfamilyof agentinterpreters,asimplerep-
resentativeof whichhasalreadybeenimplementedasAGENT-O.Relatedwork
isdescribedinthefifthsection.I will endwithasummaryof recentresearchre-
sultsrelatedtoAOP.
On theMental Stateof Agents
The firststepin theenterpriseis todefineagents;thatis,todefinethevarious
componeotsof mentalstateandtheinteractionsbetweenthem.Thereisnota
unique"corred'definition,anddifferentapplicationscanbeexpectedtocall
for specificmentalproperties.3In this section1summarizewhat couldbe
viewedasabare-bonestheoryof mentalstate,akernelthatwill inthefuturebe
modifiedandaugmented.
ComponentsofaLanguageforMentalState
In relatedpastresearchbyothersin Al,threemodalitieswereexplored:belief,
desire,andintention(givingrisetothepunonBDI agentarchitectures).Other
similarnotions,suchasgoalsandplans,werealsopressedintoservice.These
arecIearlyimportantnotions;theyarealsocomplexones,however,andnotnec-
essarilythemostprimitiveones.4
278 SHOHAM
AGENT-ORIENTED PROGRAMMING 279
By wayof motivation,hereisaninliCo __8Jla1viewof theworldwhichunderlies
theselection.At anypointin time,the::::FLJlUre isdeterminedbytwo factors:the
pasthistory,andthecurrentactions~f =a..gents.For example,pasthistoryalone
doesnot(inthisview)determinewhetl:~c::rI raisemyarm;thatisdeterminedby
whetherin factI taketheappropriate auc=_ion.The actionsof anagentaredeter-
minedbyitsdecisions,or choices.sIn ot::hoe:.words,somefactsaretruefornatural
reasons,andotherfactsaretruebecalLse::~gentsdecidedtomakethemso.Oeci-
sionsarelogicallyconstrained,thoug h J;;:1otdetermined,bytheagent'sbeliefs;
thesebeliefsrefertothestateofthe wc:>r-.í:l.d(inthepast,presentor future),tothe
mentalstateof otheragents,andtothe::'<::8apabilitiesof thisandotheragents.For
example,giventhattherobotbelievestl atit isincapableof passingthroughthe
narrowdoorway,it will not decidet,~ go throughit.Oecisionsarealsocon-
strainedbyprior decisions;therobotC~LIIIot decidetobeinRoom5infivemin-
utesifit hasalreadydecidedtobein R QaCJ8113atthattime.
In thefirst instantiationof AOP,a 1anguagecalIedAGENT-O (Torrance
1991),wetoostartedwith quitebasic b L.L ildingblocks,in factmuchmorebasic
thanthosementionedsofar.We incor~~rated twomodalitiesinthementalstate
of agents:beliefandobligation(or cofY18J,..,Útment).We alsodefineddecision(or
choice)asanobligationtooneself.FinaalL.y-,lve includedathirdcategorywhichis
not a mental constructper se:capability
.
By restrictingthecomponentsof m-e~t::al statetothesemodalitieswein some
informalsenseexcludedrepresentation...(]IDf motivation.Indeed,wedidnotassume
thatagentsare"rational"beyondassulIl.:i rlg thattheirbeliefs,obligationsandca-
pabilitiesareinternalIyandmutuallyc::o~sistent.This assumptionstandsincon-
trastto theother work mentioneda~c:.""'e,which makesfurtherassumptions
aboutagentsactingin theirown besti nt;'=:rests,andsoon.Suchstrongernotions
of rationalityareobviouslyimportant,a J.<J[ amconvincedthatin thefuturewe
will wishtoaddthem.In fact,in her.o.::s::s:rtation,ThomasintroducedanAOP
languagethatincludesthenotionsof ir»t= rldingandplanning(Thomas1993).
Thesepropertiesarequiteweak,buttheyaresufficienttojustifythetermi-
nology,andnecessaryfor thedesignof theinterpreter.The weaknessof theas-
sumptionsensuresthattheinterpretersapplytoa widevarietyof applications.
StilI,eventheseassumptionswilI beinappropriatefor somepurposes,in which
caseanewtypeof interpreterwilI berequired.
Internalconsistency.I assumethatboththebeliefsandtheobligationsarein-
ternalIyconsistent.
Goodfaith.I furtherassumethatagentscommitonlyto whattheybelieve
themselvescapableof,andonlyif theyrealIymeanit.
Introspection.AlthoughingeneralI donotassumethatagentshavetotalin-
trospectivecapabilities,I doassumethattheyareawareof theirobligations.On
theotherhand,I do notassumethatagentsarenecessarilyawareof commit-
mentsmadetothem.
Persistenceof mentalstate.I haveonlyplacedrestrictionsonmentalattitudes
at a singleinstantof time.I concludethissectionby discussinghow mental
stateschangeor persistovertime.Unlikewiththepreviouslydiscussedproper-
ties,preciseconstraintscannotcurrentlybespecified,butonlyinformalguide-
lines.
Consider,for example,belief.The previouslydiscussedrestrictionsallow
agentswhichatonetimebelievenothingatalI,shortlyafterwardstohaveabe-
lief abouteverysentence,andthenagainto becomequiteagnostic.Common
sensesuggeststhatbeliefstendtobemorestablethanthat,andit wouldindeed
bedifficulttorelyonthebehaviorof agentswithsuchvolatilebeliefs.I wilI now
placeastrongconditiononbelief:I wilI assumethatagentshaveperfectmemo-
ryof andfaithin theirbeliefs,andonlyletgoof abeliefif theylearnacontra-
dictoryfact.Beliefsthereforepersistbydefault.Furthermore,I wilI assumethat
theabsenceof beliefalsopersistsby default,althoughin a slightlydifferent
sense:if anagentdoesnotbelieveafactatacertaintime(asopposedtobeliev-
ingthenegationof thefact),thentheonlyreasonhewilI cometobelieveit isif
helearnsit.
How to formallycapturethesetwo kinds of defaultpersistenceis another
story,whichtouchesonissuesthatarepainfulIyfamiliartoresearchersin non-
monotonictemporalreasoningandbeliefrevision.In fact,a cIoselook at the
logicaldetailsof belief(or knowledge)persistencerevealsseveralverysubtle
phenomena,whichhavesofarnotbeenaddressedintheliterature.
In addition,obligationsshouldpersist--otherwisetheywouldn'tbeobliga-
tions.As inthecaseof belief,however,thepersistenceisnotabsolute.Although
bydefaultobligationspersist,thereareconditionsunderwhichobligationsare
revoked.
Theseconditionspresumablyincludeexplicitreleaseof theagentbytheparty
to whichit is obligated,or alternativelya realizationonthepartof theagent
thatit isnolongerabletofulfilI theobligation.(Intheirdiscussionof thepersis-
tenceof commitment,CohenandLevesque[1990]actualIyproposeamoreelab-
Propertiesof theVariousComponents
I havesofar not placedanyconstraint> eunthevariousmodalitiesdefined,and
thereforehavenot guaranteedthat t81=}oI inanywayresembletheir common
sensecounterparts.We will nowplace s c:hconstraints.Justasthereisnoobjec-
tively"right"collectionof mentalcatega::Dr-ies,thereisno"right"listof properties
for anyparticularmentalcategory.I r-.<lavealreadystatedthatthecorrespon-
dencebetweentheformaldefinitionaIlc::8 commonsensewilI alwaysbeonlyap-
proximateandthatI would like tostr.lc~ abalancebetweencommonsenseand
utility.Indeed,I expectdifferentappli.occat:ionsof AOP tocalIfor differentprop-
ertiesof belief,commitment,andcapao.:J:iiry.In thissection[ wilI brieAyandin-
formalIydefinea numberof properties ]!::assumeaboutthemodalities.Formal
definitionsof thesepropertiesmaybeFO~.;I1d inShoham(1993).
280 SHOHAM
oratesecondcondition,onethatrequirescommonknowledgebythecommitter
andcommitteeof theimpossibility;however,furtherdiscussionof theirposition
andargumentsagainstit wouldbetoolongadetour.)
Sincedecisionisdefinedin termsof obligation,it inheritsthedefaultpersis-
tence.Notice,however,aninterestingpointaboutthepersistenceof decision:
whileanagentcannotunilaterallyrevokeobligationsit hastowardsothers,it
cancancelobligationsheldtowardsit-ineluding obligationsit holdstowards
itself,namelydecisions.An agentis thereforefreetomodifyanexistingdeci-
sion,butunlessheexplicitlydoessothedecisionwill stand.
Finally,capabilitiestootendnottoAuctuatewildly.In fact,in thisdocument
I assumethatcapabilitiesarefixed:Whatanagentcandoatonetimeit cando
atanyothertime.However,I will allowtoconditionacapabilityof anactionon
certainconditionsthatholdatthetimeof action.
The ContextualNatureof ModalStatements
I havethroughoutthediscussiontalkedof"unequivocal"statementsregarding
beliefs,obligations,andcapabilities.Commonsense,however,suggeststhat
eachof thesemodalitiesiscontextsensitive:I canprintthedocumentrightnow,
butonlyinthecontextof thenetworkbeingup;I amobligatedtoyoutofinish
thework bytomorrow,butif mychildhasjustbeenrushedtohospitalthenall
betsareoff (eventhoughI amstill capableof finishingthework).Indeed,Mc-
Carthyhasarguedthatall statements,notonlymodalones,shouldbeviewedin
contextoAlthoughI agreein principieanddiscussit furtherin Shoham(1991),
inthisartieleI will ignoretheissueof contextsensitivity.
A GenericAgentInterpreter
In theprevioussectionI discussedthefirstcomponentof theAOP framework,
namelythedefinitionof agents.I nowturntotheprogrammingof agentsand
will outlineagenericagentinterpreter.
The behaviorof agentsisgovernedbyprograms;eachagentiscontrolledby
its own privateprogramoAgentprogramsthemselvesarenotlogicalentities,
buttheircontrolanddatastructuresrefertothementalstateof theagentusing
thelogicallanguage.6
The BasicLoop
The behaviorof agentsis,inprincipie,quitesimple.Eachagentiteratesthefol-
lowingtwostepsatregularintervals:
1.Readthecurrentmessagesandupdateyour mentalstate(ineludingyour
beliefsandcommitments);
,
AGENT-ORIENTED PROGRAMMIN(;281
Initializementalstate
andcapabilities
Definerulesfor making
newcommitments
,
UpJate
~-
--~
'"
dock
- -
mental
'-1
1
Representationof
mentatstate
andcapability
state
+
I
,
I
,
A
I
I
Executecommitments
fOTcurrenttime
-.
()utgoingmessages
control
-...
Figure2.Aflowdiagramolagenericagentinterpreter.
2.Executethecommitmentsfor thecurrenttime,possiblyresultingin fur-
therbeliefchange.Actionstowhichagentsarecommittedineludecom-
municativeonessuchasinformingandrequesting.
The processis illustratedin figure2;thedashedarrowsrepresentAowof
data,whilethesolidarrowsshowtemporalsequencing.
AssumptionsaboutMessagePassing
Agentprogramswill inelude,amongotherthings,communicationcommands.
In orderthatthosebeexecutable,I will assumethattheplatformis capableof
passingmessagesto otheragentsaddressableby name,whetherthoseresidein
thesamemachineor inothers.The programminglanguagewill definetheform
of thesemessages,andtheinterpreterwill determinewhenmessagesaresent.
AGENT-ORIENTED PROGRAMMING 283
282 SHOHAM
AssumptionabouttheClock
Centraltotheoperationof theinterpreteristheexistenceof adock;agentsare
inherently"realtime"(touseanotheroverloadedterm).The mainroleof the
dock istoinitiateiterationsof thetwo-steploopatregularintervals(e.g.,every
10milliseconds,everyhour).The lengthof theseintervalsisdeterminedbythe
settablevariable"timegrain."
I donotdiscusstheimplementationof suchadock,whichwill varyamong
platforms,andsimplyassumethatit exists.I alsoassumea variable"now,"
whosevalueissetbythedock tothecurrenttimein theformatdefinedin the
programminglanguage(e.g.,aninteger,date:hour:minute).
In previouswork,I havemadetheverystrongassumptionthatasingleitera-
tionthroughthelooplastslessthanthetimegrain;infutureversionsof thelan-
guageI will relaxthisassumptionandcorrespondinglywill complicatethede-
tailsof theloopitself..
Of course,thefactthatagentsusethesametemporallanguagedoesnoten-
surethattheirdocksaresynchronized.If all areagentsarerunningonthesame
machine;therewill benoproblem,but otherwisethepossibilityof dock drift
exists.Althoughsynchronizationdoesnotimpactthedesignandprogramming
of singleagents,it iscrucialfor ensuringthatasocietyof agentsisabletofunc-
tion usefully.Fortunately,thereexistsynchronizationprotocolswhichensure
limiteddrift amongdocks(for anoverview,seeSchneider[1987]),andweex-
pecttousetheseinourapplications.
RelatedWork
''Ii
So far,I havenot discussedrelatedwork in anydepth.The bodyof related
work isinfactsorichthatinthissectionI will mentiononlythemostdoselyre-
latedwork,andbriefIyat that.I will omit furtherdiscussionof pastwork on
logicsof knowledgeandbelief,whichthelogicof mentalstateextends,sinceI
alreadydid thatin theintroduction.For thesamereason,I will notdiscussob-
ject-orientedprogrammingandHewitt'swork.The followingis orderedin
whatI seeasdecreasingrelevanceto,andoverlapwith,AOP.The order(or,for
thatmatter,indusionin thelist)refIectsnootherranking,nor isit impliedthat
researchershighuponthelistwouldnecessarilyendorseanypartof AOP.
I~~
~~
t~ii
'1'
t~
~~
McCarthy's(1990)workonElephant2000
This languageunderdevelopmentisalsobasedonspeechacts,andtheairline-
reservationscenarioI havediscussedisduetoMcCarthy.Oneissueexploredin
connectionwith Elephant2000isthedistinctionbetweenillocutionaryandper-
locutionaryspecifications,which1havenotaddressed.In contrasttoAOP,Ele-
phant2000currentlycontainsnoexplicitrepresentationof state,mentalor oth-
erwise.Conditional statementstherefore refer to the history of past
communicationratherthantothecurrentmentalstate.
111
.111
1111
AGENT-O:A SimpleLanguageanditsInterpreter
DistributedAl
Thereisrelatedwork withinDistributedAl community(cf.MCC [1990]).Al-
thoughAOP is,tomyknowledge,uniquein itsdefinitionof mentalstateand
theresultingprogramminglanguage,otherstoohavemadetheconnectionbe-
tweenobject-orientedprogrammingandagenthood(FerberandCarie 1990;
Hewitt 1990).
111I
'1111
.111
'\1\\
Agentinterpretersmayvaryalongmanydimensionsandingeneralposemany
challengingproblems.We haveimplementeda particularprogramminglan-
guagecalledAGENT-O,whoseinterpreteris anextremelysimpleinstanceof
thegenericagentinterpreter.In fact,thesimplificationsembodiedin AGENT-
Oaresoextremethatit maybetemptingtodismissit asuninteresting.Howev-
er,it wasrecognizedearlyon thatonewould notgaingoodinsightinto the
strengthsandweaknessesof AOP withoutwritingactualprograms.Ir wasde-
cidedthereforeto implementa simpleinterpreterfirst,anddesignmorecom-
plexlanguagesandinterpretersbasedonthisexperience.Ir turnedoutthede-
signof AGENT-O itselfposedsomechallenges,andwehavebeensurprisedby
thediversityof applicationsthateventhissimplelanguageadmits.Further-
more,AGENT-O isdesignedin a waythatsuggestsobviousextensions;a few
arebeingcurrentlypursuedandaredescrihedinthefinalsection.
The implementedinterpreteris documentedin Torrance(1991).A second,
morecomplexinterpreterwasdesignedandimplementedincollaborationwith
theHewlettPackardCorporation.
111
The IntelligentCommunicatingAgentsProject(1987-1988)
This ambitiousproject,carriedoutjointlyatStanford,SRI andRockwellInter-
national(Nilsson,Rosenschein,Cohen,Moore,Appelt,Buckley,andmanyoth-
ers)hadamongitsgoalstherepresentationof speechactsandconnectionbe-
tweentheintensionallevelandthemachineleve!.Seediscussionof someof the
individualworkbelow.
1
"
II!
CohenandLevesque'sWorkonBelief,
Commitment,Intention,andCoordination
Thesetworesearchers(CohenandLevesque1997,1990)havealsoinvestigated
thelogicalrelationshipsbetweenseveralmodalitiessuchasbeliefandchoice.
Althoughtheyhavenot approachedthetopicfroma programming-language
284 SHOHAM
perspectiveas I have,they too havebeeninterestedin speechactsand mental
stateas building blocks for coordination and analysisof behavior.Their work
has its roots in earlier work in natural language understanding by Allen,
Cohen,and Perrault (Allen 1983;Cohen and Perrault 1979).Despitesomesimi-
larities,crucial differences exist between the mental categoriesemployed by
Cohen and Levesqueand ours.
ContractNets
AOP shareswith earlywork oncontractnets(Smith1980)thecomputational
roleof contractsamongagents.However,thesimilarityendsthere.Contract
netsarebasedon broadcastingcontractsandsolicitingbids,asopposedto the
intimatecommunicationin AOP.Contractnetshadnoothernotionof mental
state,no rangeof communicativespeechacts,nor anyaspectof theasyn-
chronous,real-timedesigninherentinAOP.
SituatedAutomata
RosenscheinandKaelbling'ssituatedautomata(Kaelbling1988;Rosenschein
andKaelbling1986;Rosenschein1985)is relevantin connectionwith thepro-
cessof agentification.We adopttheirideaof decouplingthemachinelanguage
fromtheprogrammer'sintensionalconceptualizationof themachine,butdiffer
onthespecificdetails.
Coordination
Severalresearchershavebeenconcernedwith theprocessof coordinationin
modernenvironments.For example,asa part of their moreglobal project,
WinogradandFloreshavedevelopedamodelof communicationinaworken-
vironment(WinogradandFlores1986).They pointto thefactthateverycon-
versationisgovernedbysomerules,whichconstraintheactionsof thepartici-
pants:a requestmustbefollowedbyanacceptor a decline,aquestionbyan
answer,andsoon.Their modelof communicationisthatof afiniteautomaton,
withtheautomatonstatescorrespondingtodifferentstatesof theconversation.
This is amacrotheory,a theoryof societiesof agents,in contrasttothemicra
theoryof AOP.In relatedwork,Maloneandhisassociatesareaimingtowardsa
generaltheoryof coordination,drawingondiversefieldssuchascomputersci-
enceandeconomics(Malone1991).
InformableAgents
Genesereth'sworkoninformableagents(seeGeneserethchapter,alsointhisvol-
ume).Genesereth'sinterestliesprimarilyinagentscontainingdeelarativeknowl-
edgethatcanbeinformedof newfactsandthatcanactonpartialplans.In this
connection,hehasinvestigatedalsothecompilationof declarativeplansandin-
,
AGENT-ORIENTED PROGRAMMING 285
formation into actioncommands.Geneserethusesthe term"agents"soas to in-
eludealsolow-level finite-automaton-likeconstructs.AOP's structureof mental
stateisconsistentwith Genesereth'sdeelarativeregimebut isnot requiredby it.
.~~11
l'\1
.
I
,
I
~ I
~
I
11'
I
b
iu
,
~
~
~
~
~~
PlanRepresentationandRecognition
Work onplanrepresentationandrecognitionbyKautz,Pollack,Konolige,Lit-
man,Allen,andothers(e.g.,Kautz 1990,LitmanandAllen 1990,Pollack1990,
andBratman1987)alsoaddressestheinteractionbetweenmentalstateandac-
tion,butit isusuallyconcernedwithfiner-grainedanalyses,involvingtheactual
representationof plans,reasoninglimitations,andmorecomplexmentalno-
tionssuchasgoals,desires,andintentions.
Nilsson'sAetionNets
ACTNET isalanguagefor eomputinggoal-achievingaetionsthatdependsdy-
namieallyonsensoryandstoreddata.The ACTNET languageisbasedonthe
coneeptof actionnetworks.An aetionnetworkisa forestof logicalgatesthat
seleetaetionsin responsetosensoryandstoreddata.The conneetiontoAOP,al-
beit a weak one,is that someof the wires in the network originatefrom
databaseitemsmarkedas"beliefs"and"goals."The maintenaneeof these
databasesisnotthejobof theaetionneto
Summaryof ResultsandOngoing Research
Work onmentalstateisproeeedingondifferentfronts.Herearesomepointers
toongoingreseareh:
.
In MosesandShoham(1993)we providesomeresultson theeonneetion
betweenknowledgeand(onekindof)belief.
.
Thomas(1993)tacklesthenotionsof eapability,plan,andintentions.
.
In LamarreandShoham(1994)wearguefor thethree-waydistinctionbe-
tweenknowledge,certainty,andbelief.
.
BrafmanandTennenholtz(1992)layout a frameworkin whiehbeliefs,
preferenees,andstrategyaremaintainedinaformof"rationalbalance."
.
Del Val andShoham(1994)arguethat thepropertiesof beliefupdate
shouldbederivedmethodicallyfroma theoryof aetionandthatdoingso
revealssomelimitationsoftheKM postulates.
.
Del Val andShoham(1994)proposetoreducethenotionof beliefrevision
tothatofbeliefupdate,andthusalsototheoriesofaetion.
.
In ShohamandCousins(1994)we provideaninitial surveyof logiesof
mentalstatein AL
1I
,11
111
I
!
286 SHOHAM
In parallel with the logical aspectsof action and mental state,we have investi-
gatedalgorithmic questions:
·
We haveproposeda specificmechanismfor tracking how beliefs change
over time,calledtemporalbeliefmaps(Isozaki and Shoham1992).
·
In Brafman,Latombe,andShoham(1993)andBrafmanet al.(1993)we
showthat,similartodistributedsystems,theformalnotionof knowledge
canbeappliedtoalgorithmicrobotmotionplanning.Recently,weproposed
knowledgecomplexityasausefulgeneralcomplexitymeasurein robotics,
withanapplicationtoautomatingthedistributionof roboticalgorithms.
We haverecentlybeguncontemplatingtheroleof agentsin thecontextof
digital libraries,whetheror not theyareof theAOP variety.We havesofar
conductedoneexperiment:
·
Thereisanexperimenttodeployadaptiveagentsthatperformautomated
browsingof theWorldWideWebonbehalfof theuser.
Finally,weare.interestedinhowmultipleagentscanfunctionusefullyinthe
presenceof otheragents.In particular,we areinterestedin mechanismsthat
minimizeconflictsamongagentsandhavebeeninvestigatingtheutilityof so-
ciallawsincomputationalsettings:
·
In ShohamandTennenholtz(1992)weproposeageneralframeworkfor
representingsociallawswithinatheoryof actionandinvestigatethecom-
putationalcomplexityof automaticallysynthesizingusefulsociallaws.We
alsostudyaspecialcaseof trafficlawsinarestrictedrobotenvironment.
·
In ShohamandTennenholtz(1995)westudywaysin whichsuchconven-
tionsemergeautomaticallyin adynamicenvironment.Earlyresultswere
reponedoninShohamandTennenholtz(1992).
·
In Kittock(1994),herefinestheseresultstotakeintoaccountthetopology
of theagentnetworkandtheexistenceof asymmetricinteractionsamong
agents.
Notes
1.Elsewhere,I discusshowthegradualeliminationof animisticexplanationswith the
increasein knowledgeiscorrelatedverynicelywith bothdevelopmentalandevolution-
aryphenomena.In theevolutionof science,theologicalnotionswerereplacedoverthe
centurieswith mathematicalones.Similarly,in Piaget'sstagesof child development,
thereisa cleartransitionfromanimisticstagesaroundtheagesof 4-6(when,for exam-
pie,childrenclaimthatcloudsmovebecausetheyfollowusaround)tothemoremature
laterstages.
2.Thereisonemoredimensiontothecomparison,which1omittedfromthetable,and
it regardsinheritance.Inheritanceamongobjectsis today oneof themainfeaturesof
OOP,constitutinganattractiveabstractionmechanism.1havenotdiscussedit sinceit is
notessentialtotheideaof OOP,andevenlesssototheideaof AOP.Neverthelessapar-
allel canbedrawnhere,too.In OOP,specializedobjectsinheritthemethodsof more
generalones.One analogousconstructin AOP wouldbegroupagents,thatis,agents
AGENT-ORIENTED PROGRAMMING 287
111
thataremadeupof agroupof simpleragents.If wedefinethebeliefsof thiscomposite
agentasthe"commonbeliefs"of theindividualagentsandthecommitmentsof thecom-
positeagentsastheir"commoncommitments,"thenthementalattitUdesof thegroup
areindeedinheritedbytheindividua!.
3.In thisrespectour motivationheredeviatesfromthatof philosophers.However,1be-
lievethereexistsufficientsimilaritiestomaketheconnectionbetweenAl andphilosophy
mutuallybeneficia!.
4.CohenandLevesque(1990),forexample,proposetoreducethenotionof intentionto
thoseof goalandpersistence.Their pioneeringwork introducesmentalcategoriesthat
aredifferentfromours.The twoframeworkssharetheessentialviewof beliefandtime.
They eachintroducemodalitiesabsentfromtheother:obligationandcapabilityin our
framework,goalsandintentionsin theirs.However,eventwonotionsthatatfirstappear
tObesimilar-such asour"decision"andtheir"choice"-turn outtObequitedifferent.
5.The termchoiceissomewhatambiguous;1discussvarioussensesof choicelater.
6.However,anearlydesignof agentprogramsby Akahani wasentirelyin thestyleof
logicprogramming;in thatframeworkprogramstatementsthemselveswereindeedlog-
icalsentences.
II~I
~
11
11
References
Agre,P.,andChapman,D.1987.PENGI:An Implementationof aTheoryof Activity.In
Proceedingsof theSixthNationalConferenceonArtificial Intelligence,268-272.Menlo
Park,Calif.:AmericanAssociationforArtificial Intelligence.
Allen,J.F.1983.RecognizingIntentionsfromNatUralLanguageUtterances.In Compu-
tationalModelsof Discourse,eds.M.Bradyand R.e.Berwick,107-166.Cambridge,
Mass.:MIT Press.
Austin,J.L.1962.HowtoDo ThingswithWords.Cambridge,Mass.:HarvardUniversity
Press.
Brafman,R.,andTennenholtz,M.1994.BeliefAscriptionandMental-LevelModeling.
In Proceedingsof theFourthIntemationalConferenceonPrincipIesof KnowledgeRepresen-
tationandReasoning(KR'94).SanFrancisco,Calif.:MorganKaufmann.
Brafman,R.1.;LatOmbe,J.-C.;andShoham,Y.1993.TowardKnowledge-LevelAnaly-
sis of Motion Planning.In Proceedingsof the Eleventh National Conferenceon
Artificial Intelligence,670-675.MenloPark,Calif.:AmericanAssociationfor Artificial
Intelligence.
Brafman,R.1.;Latombe,J.-e.;Moses,Y.;andShoham,Y.1993.KnowledgeasaTool in
MotionPlanningunderUncertainty.In TheoreticalAspectsof ReasoningaboutKnowl-
edge:Proceedingsof theFifth Conference(TARK 1994).SanFrancisco,Calif.:Morgan
Kaufmann.
Bratman,M.E.1987.Intention,Plans,andPracticalReason.Cambridge,Mass.:Harvard
UniversityPress.
Brooks,R.A.1986.A RobustLayeredControlSystemforaMobileRobot.IEEE ¡oumal
ofRobotAutomation2(1):14-23.
Cohen,P.R.,andLevesque,H.J.1990.IntentionIsChoicewithCommitment.Artificial
Intelligence42(3):213-261.
Cohen,P.R.,andLevesque,H.J.1997.RationalInteractionsastheBasisfor Communi-
288 SHOHAM
cation.In Intentionsin Communication,eds.P.R.Cohen,l.Morgan,andM.E.Pollack.
Cambridge,Mass.:MIT Press.Forthcoming.
Cohen,P.R.,andPerrault,C.R.1979.Elementsof a Plan-BasedTheoryof SpeechActs.
CognitiveScience3:177-212.
Del Val,A.,andShoham,Y.1994.DerivingPropertiesof BeliefUpdatefromTheories
of Action.Joumal01Logic,Language,andInlormation3(2):81-119.
Del Val,A.,andShoham,Y.1996.A UnifiedViewof BeliefRevisionandUpdate.Jour-
nal01LogicandComputation4(5):797-810.
Dennett,D.C.1987.TheIntentionalStance.Cambridge,Mass.:MIT Press.
Drummond,M.1989.SituatedControl Rules.In Proceedingsolthe First Intemational
ConlerenceonKnowledgeRepresentationandReasoning,eds.R.l.Brachmanand H.l.
Levesque,103-113.SanFrancisco,Calif.:MorganKaufmann.
Ferber,l.,andCarie,P.1990.ActorsandAgentsas ReRectiveConcurrentObjects:A
Mering IV Perspective.In Proceedingsof theTenthInternationalWorkshopon Dis-
tributedArtificialIntelligence,TechnicalReportACT-AI-355-90,MCC,Austin,Texas.
Genesereth,M.R.1989.A Proposalfor Researchon InformableAgents,TechnicalRe-
port,Logic-89-4,ComputerScienceDepartment,StanfordUniversity.
Grice,P.1989.StudiesintheWaysolWords.Cambridge,Mass.:HarvardUniversityPress.
Halpern,l.Y.,andZuck,L.D.1987.A Little KnowledgeGoesa Long Way:Simple
Knowledge-BasedDerivationsandCorrectnessProof.~for aFamilyof Protocols.In Pro-
ceedingsof the Sixth ACM Symposiumon Principies of DistributedComputing,
269-280.NewYork:AssociationofComputingMachinery.
Hayes-Roth,B.;Washington,R.;Hewett,R.;Hewett,M.;andSeiver,A.1989.Intelligent
MonitoringandControl.In Proceedingsof theEleventhInternationalloint Conference
on Artificial Intelligence,243-249.Menlo Park,Calif.:Internationalloint Conferences
onArtificialIntelligence.
Hewitt,C.1990.TowardOpenInformationSystemsSemantics.In Proceedingsof the
Tenth InternationalWorkshopon DistributedArtificial Intelligence,TechnicalReport
ACT-AI-355-90,MCC,Austin,Texas.
Hewitt,C.1977.ViewingControl StructuresasPatternsof PassingMessages.Artificial
Intelligence8:323-364.
Isozaki,H.,amIShoham,y 1992.A Mechanismfor ReasoningaboutTime andBelief.
In Proceedingsof theConferenceon Fifth-GenerationComputerSystems,694-701.
Amsterdam:lOS Press.
Kaelbling,L.P.1988.Goalsas ParallelProgramSpecifications.In Proceedingsof the
SeventhNational Conferenceon Artificial Intelligence,60-65.Menlo Park,Calif.:
AmericanAssociationforArtificial Intelligence.
Kautz,H.A.1990.A CircumscriptiveTheoryofPlan Recognition.In Intentionsin Com-
munication,eds.P.R.Cohen,l.Morgan,andM.E.Pollack,60-65.Cambridge,Mass.:
MIT Press.
Kittock,l.E.1994.The Impactof LocalityandAuthorityontheEmergenceofConven-
tions.In Proceedingsof theTwelfth National Conferenceon Artificial Intelligence,
420-425.MenloPark,Calif.:AmericanAssociationforArtificial Intelligence.
Lamarre,P.,and Shoham,Y.1994.Knowledge,Certainty,Belief,and Conditional-
ization.In Proceedings01theFourthIntemationalConlerenceonPrincipies01Knowl-
edgeRepresentationandReasoning(KR'94J,eds.l.Doyle,E.Sandewall,andP.Toras-
-
A(;ENT-ÜRIENTED PRO<;RAMMING289
so,415-424.SanFrancisco,Calif.:MorganKaufmann.
Litman,D.l.,andAllen,l.F.1990.DiscourseProcessingandCommonsensePlans.In
Intentionsin Communication,eds.P.R.Cohen,l.Morgan,andM.E.Pollack.Cambridge,
Mass.:MIT Press.
McCarthy,l.1979.AscribingMental Qualitiesto Machines,TechnicalReportMemo,
326,Al Lab,StanfordUniversity.
Malone,T.W.1991.TowardanInterdisciplinaryTheoryofCoordination,TechnicalRe-
port,CCS 120,SloanSchoolof Management,MassachusettsInstituteofTechnology.
MCC.1990.Proceedingsof theTenthInternationalWorkshopon DistributedArtificial
Intelligence,TechnicalReportACT-AI-355-90,MCC,Austin,Texas.
Mitchell,T.M.1990.BecomingIncreasinglyReactive.In Proceedingsof theEighthNa-
tionalConferenceon Artificial Intelligence,1050-1058.Menlo Park,Calif.:American
AssociationforArtificiallntelligence.
Moses,Y.,andShoham,Y.1993.BeliefasDefeasibleKnowledge.Joumal01ArtificialIn-
telligence64(2):299-321.
Pollack,M.E.1997.Plan asComplexMentalAttitudes.In Intentionsin Communica-
tion,eds.P.R.Cohen,l.Morgan,andM.E.Pollack.Cambridge,Mass.:MIT Press.
Forthcoming.
Rosenschein,S.l.1985.Formal Theoriesof Knowledgein Al andRobotics,Technical
Report362,SRI International,MenloPark,California.
Rosenschein,S.l.,and Kaelbling,L.P.1986.The Synthesisof Digital Machineswith
ProvableEpistemicProperties.Paperpresentedat ConferenceonTheoreticalAspectsof
ReasoningaboutKnowledge,19-22March,Monterey,California.
Schneider,F.1987.UnderstandingProtocolsfor ByzantineClock Synchronization,
TechnicalReport,ComputerScienceDepartment,CornellUniversity.
Searle,l.R.1969.SpeechActs:An t.ssayin thePhilosophy01Language.Cambridge,U.K.:
CambridgeUniversityPress.
Shoham,Y.1993.Agent-OrientedProgramming.Joumal 01Artificiallntelligence60(1):
51-92.
Shoham,Y.1991.Varietiesof ContextoIn ArtificiallntelligenceandMathematicalTheOlY
olComputation,393-408.SanDiego,Calif.:Academic.
Shoham,Y.1989.Time for Action.In Proceedingsof theEleventhInternationalloint
Conferenceon Artificial Intelligence,954-959.Menlo Park,Calif.:Internationalloint
ConferencesonArtificialIntelligence.
Shoham,Y.,andCousins,S.1994.Logicsof MentalAttitudesin Al:A VeryPreliminary
Survey.In Advancesin KnowledgeRepresentationandReasoning,eds.G.Lakemeyerand
B.Mebel,296-309.NewYork:SpringerVerlag.
Shoham,Y,andTennenholtz,M.1992.EmergentConventionsin Multi-AgentSystems:
Initial ExperimentalResultsandObservations.In ProceedingsoltheConlerenceonPrin-
CIpies01KnowledgeRepresentationandReasoning,225-23I.SanFrancisco,Calif.:Morgan
Kaufmann.
Shoham,Y.,andTennenholtz,M.1995.ComputationalSocialSystems:OfRineDesign.
Joumal01Artificiallntelligence73(1-2):231-252.
Smith,R.G.1980.The ContractNet Protocol:High-LevelCommunicationandControl
in a Distributed Problem Solver.lEEr:Transactions01Compute/'Science29(12):
1104-1113.
1"1
I
1",
290 SHOHAM
Thomas,B.1993.PLACA,An Agent-OrientedLanguage.Ph.D.diss.,Depanmentof
ComputerScience,StanfordUniversity.
Torrance,M.1991.The AGENTOProgrammingManual,TechnicalRepon,Depanment
of ComputerScience,StanfordUniversity.
Winograd,T.,andFlores,F.1986.UnderstandingComputersandCognition.Norwood,
N.J.:Ablex.
I
CHAPTER 14
KQML asanAgent
CornrnunicationLanguage,
.n
Ir
11
"
,Ii
TimFinin,YannisLabrou,&¡amesMayfield
1,
1
t isdoubtfulthatanyconversationaboutagentswill resultinaconsensuson
thedefinitionof anagentor of agency.Frompersonalassistantsand"smart"
interfacestopowerfulapplications,andfromautonomous,intelligententi-
tiesto informationretrievalsystems,anythingmightqualifyasanagentthese
days.But,despitethesedifferentviewpoints,mostwouldagreethatthecapacity
for interactionandinteroperationisdesirable.The buildingblockfor intelligent
interactionis knowledgesharingthatincludesbothmutualunderstandingof
knowledgeandthecommunicationof thatknowledge.The importanceof such
communicationisemphasizedbyGenesereth,whogoessofarastosuggestthat
anentityisasoftwareagentif andonlyif it communicatescorrectlyinanagent
communicationlanguage(GeneserethandKetchpel1994).Afterall,it ishardto
picturecyberspacewithentitiesthatexistonlyin isolation;it wouldgoagainst
ourperceptionof adecentralized,interconnectedelectronicuniverse.
How mightmeaningful,constructive,andintelligentinteractionamongsoft-
wareagentsbeprovided?Thesameproblemforhumansrequiresmorethanthe
knowledgeof a commonlanguagesuchasEnglish;it alsorequiresa common
understandingof thetermsusedinagivencontextoA physicist'sunderstanding
of velocityis notthesameasthatof acarenthusiast's,2andif thetwo wantto
converseabout"fast"cars,theyhavetospeaka"commonlanguage."Also,hu-
mansmustresorttoasharedetiquetteof communicationthatisaresultof soci-
etaldevelopmentandthatispartiallyencodedinthelanguage.Althoughweare
notalwaysconsciousof doingso,wefollowcertainpatternswhenweaskques-
tionsor makerequests.Suchpatternshavecommonelementsacrosshumanlan-
guages.Likewise,for softwareagentstointeractandinteroperateeffectivelyre-
quiresthreefundamentalanddistinctcomponents:(i)acommonlanguage,(ii)a
commonunderstandingof theknowledgeexchanged,and(iii) theabilityto ex-
111
I~
Ir
,l~
IIJ