From: FLAIRS-01 Proceedings. Copyright © 2001, AAAI (www.aaai.org). All rights reserved. The benefits of multi-agent systems in spatial reasoning Christian Kray GermanResearch Center for Artificial Intelligence (DFKI) GmbH,Stuhlsatzenhansweg 66123 Saarbrficken, Germany kray@dfki.de Abstract This paperpresents argumentsfor the applicationof a multiagent approachto spatial reasoning, andit is shownhowspatial reasoningbenefits from an agent-basedimplementation. In orderto achievethis, the basic processesin spatial reasoning are analyzedand mappedonto a multi-agentarchitecture. Additionally, common problemsin the context of real-world applications are identified, and it is shownhowthese can be addressedusing the proposedapproach.Furthermore,it is arguedthat a realization based on a multi-agentsystemoffers advantagesin termsof extensibility andflexibility. Finally, an exemplaryimplementationof a spatial reasoning system withinan interactive tourist guideis presentedalongwithits basic mechanismsand a short review of its performancein real worldtasks. Introduction Spatial cognition is a central componentof humanintelligence, and it is involved in manyevery day tasks such as wayfmding, locomotion, and vision. Spatial concepts are also very important for communication,e.g. when describing spatial constellations to a listener so that he can identify a certain object. Manyapproaches for enabling systems to reason about space have been proposed, ranging from strictly qualitative calculi (e.g. based on topological relations (Egenhofer & Herring 1990)) to more quantitative methods (e.g. using potential fields to computelinguistic descriptions of spatial constellations (Gapp1994)). There is a great number of possible applications (Cohn 1996) for these methodsranging from verbal interfaces for the blind to autonomous robot navigation. Additionally, the advent of affordable positioning systems (e. g. GPS, Gallileo) and the widespread adoption of mobile devices (such as mobile phones and PDAs)has sparked a great dernand for location-aware services, and consequently for spatial reasoning. While this has led to the development of smart infrastructures for this kind of services ((Hohl et al. 1999), (Butz, Baus, & Krtiger 2000)) - facilitating the dling of nomadicusers - there are still somemajor hurdles that hinder the widespreadapplication of spatial reasoning. On one hand, the computations that have to be performed to evaluate spatial constellations and to arrive at Copyright(g) 2001, AmericanAssociationfor Artificial Intelligence(www.aaai.org). All rights reserved. 552 FLAIRS-2O01 somesuitable solution are highly complexand time consuming. Moreover, the fundamental data upon which the reasoning takes place is frequently providedin a low-level metrical format (e. g. vector data in a GIS), while in manycases symbolicor qualitative format is needed. Onthe other hand, the computational methods have to be adapted to take into account real-world characteristics (such as the current context). These points will be morethoroughly discussed in the following section along with a possible solution using multiagent systems (MAS). Theremainderof this article is structured as follows. The next section shortly reviews the current links betweenspatial cognition and agent-based systems. After this, several reasons are highlighted for the adoption of a multi-agent approach in spatial reasoning. The following section describes an implementation of a spatial reasoning system along the lines of the points madein the previous section. The final section summarizesthe ideas presented here, and provides someideas for future research directions. Basingspatial reasoningon multi-agent systems In the context of spatial reasoning, the term agent is mostly used to describe a system that performs a specific task such as route advice (Rogers, Fiechter, &Langeley 1999) or incremental route instructions (MaaB, Bans, & Paul 1995). Whilethese certainly meet the definition of an agent - which Wooldridge describes as computer systems that are capable of autonomousaction in some environment in order to meet their design objectives (Wooldridge 1999) - they are not multi-agent systems per se. Multi-agent systems can be defined as systems that are designed and implemented as several interacting agents (Jennings, Sycara, & Wooldridge 1998). Although there are a few systems that take a decompositional approach to spatial cognition and exploit the benefits of parallel or resource-aware computations (e. g. (Blocher 1999)), the advantages of a true multi-agent system in spatial reasoning have not yet been thoroughly examined. In the following sections, several reasons are presented for the application of multi-agent systems generally, as well as arguments for modelingspatial reasoning using a multiagent approach. ¯ Frameof Reference General qualifies of multi-agent systems Several relations, especially angular relations depend on Beforelookingat the specific advantagesin the contextof theestablishment ofa frame ofreference inorder tobe spatial-reasoning,somegeneralqualities of multi-agentsysnon.ambiguons. Some calculi alsousetheframe ofrefertemscan be identified. (Bond&Gasser1988)list several ence to scale space accordingly(Gapp1995). rationales for dis~’butingan AI system,such asadaptabil¯ Route Segmentation ity,cost-effectiveness, and improvements in the developIn the case of reasoningin the context of navigationor mentand management process. In addition, they point out route descriptions,a complexroute mighthaveto be ditl~theinherent isolation/autonomy oftheparts provides videdinto severalsegments to allowfor properreasoning. notonly protection forlocal information, butmayalso be a more’natural’ waytoaddress certain problems. Further- Theseprocessesdo haveto interact heavilyin orderto solve more,theyarguethat the distributionfacilitates spacializaspatial problems.Consider,for example,the selection of lion, andmayincreasethe reliability, robustness,and/oreffia referenceobject. Toidentify the mostappropriateone for ~iency oftheentire system. Finally,they state that resource the taskat hand,static charact~’istics are oftennotsufficient. limitations canbebandied bothonanindividual, andona Therelation chosento go alongwiththe referenceobject as larger scale. Butbefore these benefits canbeexploited in well as whetherit has beenmentioned beforecontribute to spatial reasoning, itisnecessary toanalyze howthereason- its overallrating. Theprocessof selecting a frameof refingprocess canbemapped ontoagents. ¯ rc~cealso r~uiresinput fromother processes,as the current referenceobjector the actuallocationof the user havea Mappingprocesses onto agents great influenceon the outcome of the selectionprocess.The When lookingat the different computational modelsfor spasegm~tationof a complexroute is another exa~le of the intensiveinteractionbetween these coreprocesses:a chosen tial reasoning((Cohn1996),(’Mukerjee 1998)),onecan dividethe reasoningprocessinto severaldistinct butinteractsubdivisiondependsnot onlyon characteristicsof the route, ing sub-processes.Manyproblemsrelated to spatial conbut is also determined bythe qualityof relationsthat canbe stellations call for the evaluationof relations of somekind establishedfor the resultingparts, andbythe context(e.g, at betweensomeobjects, or oonv~sely,for the mapping of rewhatspeeda user is traveling). lations to a specific constellation.I)q~ndingon the set of ModeLing these interactingprocessesas agentsoff~s serrelationsin question,there mayalso be the needto establish ial advantages overa monolithic architecture. Firstly, the a frameof reference(e.g. whenconsideringangularrelasubproc~sscan be clearly separated, whichallowsfor the tions). Inthe context ofnavigation, additional processes can concentrationon the correspondingfundamentalreasoning beidentified. Inorder tomason about routes, itoRen makes methodswithouthavingto take into accountrequiremems of sense to divide theminto segments,whichcan be mapped other subprocesses fromthe start, Secondly,the interaction between tl"asn is madeexplicit, whichnot onlysimplifiesits ontoqualitative descriptions(Tversky&Lee1999).In this case, a different bodyof relations- whichmilesto somedeformalization,but also makesit easyto changethe interacgre~ on the shapeof the objects involved((Kray&Blocher tion patterns (mendynamically) andfacilitates the realiza1999),(Mathet2000))- canalso be taken into accoum. tion ofmeta.l~/elreasoning,Thirdly,the agentsare l~c¢ to tlre 1 tries to summarize the precedentreflectionsbydepictdecidewhattheywantto donext. Thisenablesthorn, e. g. to ing thosefundamental processesin the center part: reasonaboutpendingrequestsfromother agents, and cancel obsoletejobs (suchas the evaluationof a mediocre reference ¯ Two-PointRelations objcg~tif there is alreadya better one)or changethe orderof Thisincludestbe evaluationof topological,angular distance.dependentrelations, whichshare the common the processingofth~jobs (e,g. if informationrequiredby later job is alreadyavailable).FinaUy, it is a straightforward characteristicsthat they- in their mostbasicform-relate 1. task to extend and modifysuch a multi-agent system. B~ twoobjectsto eachother cause the subprocesses arestrictly separated,their internal ¯ N-PolntRelations reasoningmechanisms can be exchang~without disturbing Relationsthat cannotbe reducedto a two.point-problem, the rest of the system.Addingnewagents, that modeldifsuch as path relations (Kray&Blocher1999), special ferent processes,canalso be achievedrathereasily, since the caseslike inbetween,or constellationalrelations (Mathet modifications requiredto let existingagentsbenefitfromthe 2000),are qualitativelydifferent fromtwo-pointrelations. newfunctionalityare cle~arlyencapsulated withinthem.In a They require more than twoobjects, and/or additiortal armonolithicarchitecture, isolating the placeswherechanges guments suchas shapeor outline information. haveto be appliedor changingthe implicit interaction can be tediousanderror prone. ¯ ReferenceObject Common tasks in the realmof spatial reasoningsuch as Challenges posed by real-world applications localizationor object identificationrequirethe selection era suitablereferenceobject(or anchorobject)froma set Whilethese advantagesapplyto almostany spatial reasonofpossiblecandidutes. ing task, they do so especiallyin the contextof real-world uses. Whena user employsa systemto solve a specific ~Two pointscanbe seenas the mostbasic entities, between task, such as q~ryinga geographicalinformationsystem whicha relation canbe established(Kray&Blocher1999).hence (OlS)to obtainsomeinformation,or askingfor navigational thename. Figure1: Processes,factors, andagents in spatial reasoning instructions, the computationalcomplexityof mostspatial reasoning calculi (Cohn1997) can becomea big obstacle. Althoughthere are methods,whichcan be solved in polynomialtime, the great numberof possible arguments(e.g. the numberof objects within a GIS)and the amountof time to deducequalitative informationfromthe mostly metrical data (e.g. performingset operations on bitmapbaseddata) require the applicationof heuristics, or at least someformof adaption strategy (such as anytimealgorithms(Zilberstein 1993)),in order to keepanswertimes in a tolerable range. A multi-agent approachhelps to address these problems. Onone hand, the freedomof decision that each agent has, allowsfor specific adaptationstrategies and heuristics to be applied to the specific subproblemshandledby the agent. Onethe other hand,it is an inherentability of such systems to allowagents to duplicate themselves,or to moveto a different site should they wantto do so. This offers newways to addressthe needfor a timely solution: in case there is a large amountof informationto be considered,several instances of a specific agent can concurrentlyworkon small subsets. If the computationalpowerof the current platform is insufficient to solve the task in time, an agent candecide to moveto a morepowerfulsite. Finally, the messagepassing mechanism,whichis used for the inter-agent communication, makesit easy to realize a transactional paradigm: instead of waitingfor the completionof a requestsent to another agent, a specific agentmaystart working on a different task until it reachesa point whereit again needsexternalinformation.After sendingoffthe correspondingrequest, the agent cancheckwhetherthere is already a reply to the first request.If that’s the case, it cancontinueto workonthe orig- SS4 FLAIRS-2001 inal task, therebyexploiting the ’waiting’ time, whichwould havebeenwastedotherwise.Thesestrategies canalso be applied concurrently,to a single basic agentor to severalones, dependingon the task at hand. Furthermore,in a real-world context a great numberof factors, that are usuallyleft out of spatial reasoning,haveto be included in the reasoningprocess. Figure 1 showsfour fields, whichplay an importantrole in a real-worldapplication: geometry,contextualfactors, languages,and resource restrictions. Whilegeometrical information in someform is present in almostany systemconcernedwith spatial cognition, there are somefactors that are especially important in a real worldscenario, suchas the visible characteristics of entities in the worldor the level of abstraction,at which these entities are evaluated. Thesefactors, or the reasoning/computationto extract themfrom the geometryof the world model,can again be encapsulated in agents, inheriting mostof the benefits listed aboveand simplifyingthe interaction withthe core processesdescribedin the previous section. Thesameis true for contextual factors, whichare particularly important in real-world applications. Knowledge about, e.g. which meansof transportation is used (MAX, Bans, &Paul 1995), what scale the user is referring to (Montello1993),or whatfunctiona certain building has (Lynch1960)strongly influence the outcomeof the reasoning process. Whilethe importanceof resource considerations havealready beendiscussed, the relevanceof the languageswhichare used to informthe user of the results from the reasoning wasnot. But the fact, e.g. whetherto realize the outputgraphicallyor verbally, andwhatspecific (natural) languageor symbolsare selected can changethe 2. outcomeof the reasoning This list of relevant factors for real-world spatial reasoning is certainly neither complete, nor has the exact way, in which they influence the reasoning process, been empirically examined. But building a system that includes these factors using a multi-agent architecture allows not only for a clear separation but also for continuous improvements: Whennew factors are identified, they can be added as an agent, and their influence on the other processes can be incorporated easily by first analyzing it individually for each process, and then establishing the interaction. Modifications to existing processes are on a local base without the need to search for all places, where changes would have to be made in a monolithic system. Furthermore, once empirical results becomeavailable about the wayin which certain factors influence the reasoning processes, they can be implemented in a straightforward way. Either by simply changing the explicit interaction patterns, or by additional local modifications to the affected processes. In both cases, unaffected processes need not to be altered. These characteristics have been very beneficial in the developmentof the spatial reasoning system presented in the following section. An exemplary implementation The ideas described in the previous section have led to the 3, which imrealization of a spatial reasoning system SPACE plements manyof the concepts presented here. It is part of a mobile tourist guide (DEEP MAP(Malaka & Zipf 2000)), whereit is responsible for various tasks involving spatial problems, such as navigational instructions or queries with spatial constraints. Not only is SPACE part of a multi-agent system (the mobile tourist guide), but it also consists agents itself 4. The internal agents communicatewith each other over an internal messagebus, and can also send messages to external agents via the external messagebuss. They modelthe basic processes identified in the previous section, and the spatial reasoning tasks, whicharise in the context of the tourist guide (see figure 2). Thesetasks include the identification (Identify) of objects in the environment of the user, and description (Describe) of objects the user mentions, e.g. whenreplying to queries like ’What’s this?’ or ’Tell me more about this building’. SPACE can also generate localizations tbr real-world entities using relational expression (Localize) and translate such expressions into geometrical regions (TransToGeo).Finally, there is an agent, that handles the incremental generation of navigational instructions (RouteManager),and a scheduling agent (Scheduler), which analyzes incoming jobs and distributes them amongthe internal agents. During the two years of development, SPACEhas been enhanced and extended frequently. As new information 2For example,somerelations might not be easily express~le verbally or graphically. 3Spatial CognitionEngine 4Thisarchitecture is often called holonic(Fischer 1999). 5Thisdesign ensuresthat internal messagetraffic is kept from the externalbus, andexternal agentscan addressa single agent for all spatial problems. Deep Map ~ . ..................... Scheduler Sp;CE t BestRO ] PathRelations ] Segmentation ] Relations ] RefSys ] Figure 2: Architecture of SPACE sources/agents became available, the internal agents were adjusted to include them in their reasoning. For example, when an agent for the managementof the dialog history was introduced, the BestROagent was modified to take into account whether an object had been previously mentioned when rating objects. The other agents did not have to be adjusted in order to benefit from this additional information. Adding an internal agent was also a straightforward task: Whenan agent for a hotel reservation system was introduced, the need arose for the translation of relational expressions (e. g. ’close to the station’) to geometricalregions. TransToGeowas added, and did make use of the other existing agents without altering the system. The interaction between the agents is very intense, and would be very hard to handle if it were implicit. For example, when the BestROagent evaluates an object, it contacts the GIS, the Dialog History, the Context Manager, and all other internal agents except Segmentation, and may engage in a message exchangewith several of them. Thesame is true for the other agents of the system. SPACEas it stands now can handle the tasks mentioned above within the city of Heidelberg (Germany) in a timely fashion. It relies on a GIS, whichcontains a detailed model of the entire city and its surroundings. The reasoning process takes into account information from a user model(e. g. age, knowledge about environment, physical constitution) and a context model (e. g. weather, means of transportation). The system also considers the user’s current position (obtained from a GPSreceiver) and facts from the dialog history. SPACE has been successfully used in a mobile prototype around the castle of Heidelberg. Currently, the system is being ported to a newagent platform, that offers enhanced resource monitoring and adaptation facilities, and a newversion of the mobileprototype for systematic tests with casual users is prepared. SPATIOTEMPORAL REASONING555 Conclusion and Future Directions Thispaper presenteda newapproachto the modelingo f spatial reasoningprocessesusing multi-agentsystems. It was shown,that using the agent paradigmcan be very beneficial in several aspects. Onone hand,several basic processescan be identified and mapped directly ontoagents, not only simplifying the modelby encapsulatingfunctionality, but also makingthe interaction betweenthose processesexplicit. On the other hand,the multi-agentapproachfacilitates the modification andextensionof a spatial reasoningsystem,and is particularly well suited in the contextof a real-worldapplication since manyadditional factors haveto be taken into account. In the future, severalresearchdirectionswill be followed. Firstly, the interaction betweenthe agents will be analyzed morethoroughlyin order to formalizeand optimizeit. Secondly,a morerigid evaluationof the entire systemis planned throughsystematic field tests with casual users. Thirdly, a componentfor user interaction about uncertain spatial knowledge (e.g. to determinethe user’s current location in case of sensor failure by meansof a dialogue)is currently under development.Finally, additional resourceadaptation strategies will be examinedto further improvethe average responsetime. Acknowledgements DeepMap,SpaCE,and the results presented in this paper are fundedby the Klaus Tschira Foundation, Heidelberg. SpaCEis co-fundedby the DFKI. References Blocher, A. 1999. RessourcenadaptierendeRaumbeschreibung: Ein beschrdnla-optimaler Lokalisationsagent (resource-adaptingspatial descriptions: a boundedoptimal localization agenO.Ph.D. Dissertation, Computer ScienceDivision, University of Saarland, Germany. Bond,A. H., and Gasser, H. 1988. Ananalysis of problems and research in dai. In Bond,A. H., and Gasser,H., eds., Readingsin distributed artificial intelligence. SanManteo, CA: Morgan Kanfmann. Butz, A.; Baus, J., and Krtiger, A. 2000. Augmenting buildings with infrared information. In Proceedingsof the International Symposiumon AugmentedReality ISAR 2000. Los Alamitos, CA: IEEEComputerSociety Press. Colin,A. G.1996.Calculifor qualitative spatial reasoning. In Calmet,J.; Campbell, L A.; and Pfalzgraf, L, eds., Artifical Intelligence and SymbolicMathematicalComputation (LNCS1138). Berlin: Springer. 124-143. Cohn,A. G. 1997. Qualitative spatial representation and reasoningtechniques. In Brewka,G., Habel,C.; and Nebel, B., eds., 1(,1-97(LNA11303). Berlin: Springer. Egenhofer,M. J., and Herring, J. R. 1990. Amathematical frameworkfor the definition of topological relations. In Brassel, K., and Kishimoto,H., eds., FourthInternational Symposiumon Spatial Data Hadling. 556 FLAIRS-2001 Fischer, K. 1999. Agent-BasedDesign of Holonic Manufacturing Systems. Journal of Robotics and Autonomous Systems. Gapp,K.-P. 1994. Basic meaningsof spatial relations: Computation and evaluation in 3d space. In Proceedingsof AAAI-94. Gapp,K.-P. 1995. Processingspatial relations in object localization tasks. In AAAIFall Symposium on "Computational Modelsfor In tegratingLanguage and~qsion"’. Hohl, F.; Kubach,U.; Leonhardi, A.; Rothermel,K.; and Schwehrn,M. 1999. Next century challenges: Nexus- an openglobalinfrastructurefor spatial-awareapplications.In Proc. of Mobicom99. Seattle, Washington:ACM. Jennings, N.; Sycara, K.; and Wooldridge,M. 1998. A roadmapof agent research and development.Journal of AutonomousAgents and Multi-Agent Systems 1:275-306. Kray, C., and Blocher, A. 1999. Modelingthe basic meanings of path relations. In Proceedingsof the 16th IJCAL MorganKaufmann,San Francisco, CA, 384-389. Lynch, K. 1960. The image of the city. Cambridge,MA: MITPress. MaaB,W.; Bans, J.; and Paul, J. 1995. Visual grounding of route descriptions in dynamicenvironments.In AAAI Fall Symposiumon ComputationalModelsfor Integrating Languageand lqsion. MIT, Cambridge,MA:AAAI. Malaka, R., and Zipf, A. 2000. Deep Map- challenging IT research in the framework of a tourist information system. In Fesenmaier, D. R.; Klein, S.; and Buhalis, D., eds., Informationand communication technologies in tourism 2000. Wien:Springer. 15-27. Mathet, Y. 2000. Newparadigmsin space and motion: A modeland an experiment.In Rodriguez,R. V., ed., Workshop on Current lssues in Spatio-TemporalReasoningat ECA12000. Montello, D. 1993. Scale and multiple psychologies of space. In Frank, A. U., and Campari,I., eds., Spatial Information Theory: A Theoretical Basis for GIS. Berlin: Springer-Verlag. 312-321. Mukerjee,A. 1998. Neat vs scruffy: A survey of computational modelsfor spatial expressions.In Olivier, P., and Gapp,K.-P., eds., Computational RepresentationandProcessing of Spatial Expressions.KluwerAcademic Press. Rogers, S.; Fiechter, C.-N.; and Langeley, P. 1999. An adaptive interactive agent for route advice. In Proceedings of AutonomousAgents ’99, 198-205. NewYork, New York: ACM Press. Tversky, B., and Lee, P. U. 1999. Pictorial and verbal tools for conveyingroutes. In Spatial InformationTheory (Proceedingsof COSIT99). Springer, Berlin, 51-64. Wooldridge, M.1999.Intelligent agents. In Weiss,G., ed., Multiagent Systems - A ModernApproachto Distributed Artificial Intelligence. TheMITPress. 21-35. Zilberstein, S. 1993. Operational Rationality through Compilationof AnytimeAlgorithms. Ph.D. Dissertation, ComputerScience Division, University of California at Berkeley.