developing multi-agent system with jade (1)
Developing Multi-Agent Systems with JADE Wiley Series in Agent Technology Series Editor: Michael Wooldridge, Liverpool University, UK The Wiley Series in Agent Technology is a series of comprehensive practical guides and cutting- edge research titles on new developments in agent technologies. The series focuses on all aspects of developing agent-based applications, drawing from the Internet, telecommunications, and Articial Intelligence communities with a strong applications/technologies focus.
The books will provide timely, accurate and reliable information about the state of the art to researchers and developers in the Telecommunications and Computing sectors.
Titles in the series: Padgham/Winikoff: Developing Intelligent Agent Systems 0470861207 (June 2004) Pitt (ed.): Open Agent Societies 047148668X (August 2004) Developing Multi-Agent Systems with JADE
Fabio Bellifemine, Telecom Italia, Italy Giovanni Caire, Telecom Italia, Italy Dominic Greenwood, Whitestein Technologies AG, Switzerland Copyright 2007 John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England
Telephone (+44) 1243 779777
Email (for orders and customer service enquiries): cs-books@wiley.co.uk Visit our Home Page on www.wiley.com
All Rights Reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except under the terms of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London W1T 4LP, UK, without the permission in writing of the Publisher. Requests to the Publisher should be addressed to the Permissions Department, John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England, or emailed to permreq@wiley.co.uk, or faxed to (+44) 1243 770620.
This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the Publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
JADE () and related logos are a registered trademark of Telecom Italia S.p.A.
Other Wiley Editorial Ofces
John Wiley & Sons Inc., 111 River Street, Hoboken, NJ 07030, USA
Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA
Wiley-VCH Verlag GmbH, Boschstr. 12, D-69469 Weinheim, Germany
John Wiley & Sons Australia Ltd, 42 McDougall Street, Milton, Queensland 4064, Australia
John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809
John Wiley & Sons Canada Ltd, 6045 Freemont Blvd, Mississauga, ONT, L5R 4J3, Canada
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Anniversary Logo Design: Richard J. Pacico
Library of Congress Cataloging-in-Publication Data:
Bellifemine, Fabio. Developing multi-agent systems with JADE / Fabio Bellifemine, Giovanni Caire, Dominic Greenwood. p. cm. Includes bibliographical references and index. ISBN-13: 978-0-470-05747-6 (cloth : alk. paper)
- Intelligent agents (Computer software) 2. Object-oriented programming (Computer science) 3. Java (Computer program language) I. Caire, Giovanni. II. Greenwood, Dominic. III. Title. QA76.76.I58B45 2007 006.3 Cdc22 2006036200
British Library Cataloguing in Publication Data
A catalogue record for this book is available from the British Library
ISBN: 978-0-470-05747-6 (HB)
Typeset in 9/11pt Times by Laserwords Private Limited, Chennai, India Printed and bound in Great Britain by Antony Rowe Ltd, Chippenham, Wiltshire This book is printed on acid-free paper responsibly manufactured from sustainable forestry in which at least two trees are planted for each one used for paper production. Contents
The Authors ix
List of Contributors xi
Preface xiii
1 Introduction 1
2 Agent Technology Overview 3 2.1 About agents 3 2.2 The Foundation for Intelligent, Physical Agents (FIPA) 10
3 The JADE Platform 29 3.1 Brief history 29 3.2 JADE and the agents paradigm 30 3.3 JADE architecture 32 3.4 Compiling the software and launching the platform 34 3.5 JADE packages 37 3.6 Message transport service 39 3.7 Admin and debugging tools 42
4 Programming with JADE C Basic Features 51 4.1 Creating agents 51 4.2 Agent tasks 57 4.3 Agent communication 65 4.4 Agent discovery: the yellow pages service 72 4.5 Agents with a GUI 75
5 Programming with JADE C Advanced Features 77 5.1 Ontologies and content languages 77 5.2 Composing behaviours to create complex tasks 91 5.3 Threaded behaviours 99 5.4 Interaction protocols 100 5.5 Interacting with the AMS 107 5.6 Starting JADE from an external Java application 111
6 Agent Mobility 115 6.1 Agent mobility 115 6.2 Intra-platform mobility 117 6.3 Inter-platform mobility service 119 6.4 Usage of the JADE mobility services 121 vi Contents
7 JADE Internal Architecture 131 7.1 Distributed coordinated lters 131 7.2 Creating a JADE kernel service 136
8 Running JADE Agents on Mobile Devices 145 8.1 Main limitations of the mobile environment 145 8.2 The LEAP add-on 146 8.3 The split container execution mode 150 8.4 Developing MIDP agents 154 8.5 LEAP add-on advanced 161
9 Deploying a Fault-Tolerant JADE Platform 173 9.1 The main replication service 173 9.2 Attaching the DF to a relational DB 176
10 The JADE Web Services Integration Gateway 181 10.1 Web service technology 181 10.2 The utility of agent and Web service integration 182 10.3 The WSIG architecture 182 10.4 Installation requirements 184 10.5 WSIG installation procedure 185 10.6 WSIG operation 186 10.7 Example 1: Web service client invokes an agent service 193 10.8 Example 2: Agent service invokes a Web service 203
11 Agent-Society Conguration Manager and Launcher 207 11.1 Basic terms and concepts 207 11.2 Book-trading example 209 11.3 Distributed deployment 215 11.4 The XML meta-model 218 11.5 Inside the ASCML 220 11.6 Distributed monitoring, logging and debugging 222 11.7 Outlook 223
12 JADE Semantics Framework 225 12.1 FIPA-SL language 226 12.2 Interpretation engine 230 12.3 Basic semantic agent 231 12.4 Specializing the interpretation activity 234 12.5 Customizing belief handling 237 12.6 Handling Actions 240 12.7 Synthesizing standard and advanced use of the JSA 245 12.8 Conclusions 245
13 A Selection of Other Relevant Tools 247 13.1 The Bean Generator 247 13.2 JADEMX 250 13.3 The Java Sniffer 251 13.4 JADEX C engineering goal-oriented agents 254 Contents vii
APPENDIX A Command Line Options 259 A.1 Syntax 259 A.2 Options to launch containers and main containers 260 A.3 General Options 261 A.4 Options of the JADE kernel-level services 262 A.5 Options related to MTPs 265 A.6 Options to congure the yellow page DF service 267 A.7 Options specic to the JADE-LEAP platform 268 A.8 Extending the command line with user-dened options 269
APPENDIX B List of Symbols and Acronyms 271
Bibliography 275 References 275 FIPA Specications 278
Index 281 The Authors
Fabio Bellifemine is a senior project manager at the Research Labs of Telecom Italia. He inspired, originated and led the JADE Project and, later, he launched and presided at the JADE Governing Board. He graduated summa cum laude from the Computer Science University of Torino in 1988 and, before joining Telecom Italia (formerly CSELT), until 1994 he was a researcher at the Italian National Research Council (CNR) working in the eld of digital video coding. In 1996 he joined the FIPA standardization body and he was attracted by the software agent technology. In 2000, on behalf of the Work Package 1 of the FACTS Project, he was awarded the rst prize in the FIPA competition for the best agent-based application: New generation TV entertainment system . He served as chairman of the FIPA Architecture Board and, next, of the X2S Technical Committee with the challenging goal of promoting to standard the core specications of FIPA. The effort and the passion for this emerging technology were recognized by appreciation certicates of FIPA for his outstanding contributions. He is IEEE Senior Member, member of the Technical Committee on Distributed Intelligent Systems of the IEEE Systems, Man, and Cybernetics Society, and member of the Program Committee of some scientic conferences in this research eld. He is also member of the Expert Group of JSR 271 which is going to specify the third generation of Java MIDP specications. His research interests mainly focus on agent technologies and on their adoption to develop better and more efcient systems and applications; recently, he launched in Telecom Italia a new research program in the eld of Wireless Sensor Networks.
Giovanni Caire graduated summa cum laude from the Politecnico di Torino in 1992 and, after that, joined the Research Labs of Telecom Italia (formerly CSELT) where he is now a senior project manager. He started working in the Multimedia and Video Services department where he was involved in several international collaborative projects. In 1995 he led the ATMAN ACTS European Project dealing with advanced techniques of audio-visual content trading. Since 1998 his interest has been in the eld of distributed applications with particular focus on the Java technology. He started working in the JADE Project in 2000 when he led the working group that ported the platform on the Java Micro Edition within the scope of the LEAP IST European Project. In 2004 he represented Telecom Italia in the Java Workstream of the OMTP international initiative whose goal was to dene an open platform on mobile terminals enabling service providers to develop a uniform and simplied customer experience. In 2005 he actively participated in the Expert Group of the JSR 232 Mobile Operational Management which addressed the customization of the OSGi specication for hand-held devices. Currently he is working in the OSS Innovation department of Telecom Italia where he leads the software development of an important project employing agent technology and in particular the JADE platform in the eld of network management. At the same time he is actively involved in the JADE Board with the role of Technical Leader.
Dominic P. A. Greenwood is Head of Research at Whitestein Technologies AG in Zurich,
Switzerland. He has been active in the eld of multi-agent software and systems for several years
from both a research and commercial perspective, including participation in FIPA and involvement
with JADE as a member of the JADE Board and as designer of the JADE Web Services Integration
Gateway add-on. He received a Ph.D. for his work on adaptive strategies for controlling non-linear
behaviour in communication networks from Staffordshire University in 1997, after which he took a
position as group leader of distributed network management research at Fujitsu Telecommunications
x The Authors
Europe in the UK. In 2000 he joined the Network Agent Research group of Fujitsu Laboratories of America in Sunnyvale, California, where he became involved in several aspects of agent-related research and standardization. It was during this period that he became actively involved with FIPA, serving as contributor to various activities including the FIPA Abstract Architecture and as co-chair of the FIPA Ontology technical committee. He also served as technical coordinator of JSR 87, Java Agent Services, which addressed the creation of a core API for agent systems based on a reication of the FIPA Abstract Architecture. In 2003 he joined Whitestein Technologies AG in Zurich, becoming involved in a broad variety of projects related to the commercial application of
agent technology and several European-wide collaborative projects, including the JADE Board. He is a member of several program committees and has a number of academic publications, with his current research interests including distributed and complex adaptive systems, proactive computing, ubiquitous systems, service-oriented computing and commercial applications of software agent technology and autonomic computing. Contributors
The following contributed to various parts of the book:
Agostino Poggi, Dipartimento di Ingegneria dell Informazione, Universitadegli Studi di Parma
(Section 2.1).
The membership of FIPA (Section 2.2) Jordi Cucurull-Juan, Joan Ametller-Esquerra and Ramon
Marti, Universitat Autonoma de Barcelona (Chapter 6).
Alois Reitbauer, Profactor Research, (Chapter 7).
Roland Mungenast, Profactor Research (Section 9.2).
Dirk Bade, University of Hamburg, Department of Computer Science, Distributed and Information
Systems (Chapter 11).
Karl-Heinz Krempels, Sven Lilienthal and Ananda Sumedha Markus Widyadharma, RWTH Uni-
versity of Aachen, Department of Computer Science, Communication and Distributed Systems
(Chapter 11).
Vincent Louis and Thierry Martinez, France Telecom, Research & Development (Chapter 12).
Chris Van Aart, Y All BV (Section 13.1).
David B. Bernstein, Caboodle Networks, Inc. (Section 13.2).
Pavel Tichy, Rockwell Automation Research Center (Section 13.3).
Alexander Pokahr, Lars Braubach, Andrzej Walczak and Winfried Lamersdorf, University of
Hamburg Department of Informatics, Distributed Systems and Information Systems (Section
13.4).
Preface
In life, many important undertakings often begin with some degree of happenstance, appearing as both hesitant and uncertain as they start to take on a distinct form. JADE was such an undertaking, with its true nature only able to emerge through a period of growth and evolution. From this quiet genesis, JADE has now become a major open source software project with a worldwide scope and user base. It is arguably the most popular software agent technology platform available today, a fact that never ceases to delight and amaze the project s initiators given that it was neither planned nor anticipated. This remarkable evolution is of course the result of myriad contributions from an inspired and self-motivated grass-roots open source community. Contributing groups and individual JADE users and developers are often silently masked behind an email address, but have nevertheless been able to participate and collaborate at many different levels with suggestions, ideas, contributions, and, in several cases, entire software modules, add-ons and new derivative projects. It is our hope that this book will assist with yet further spreading knowledge of JADE, helping to unify, inspire, motivate and grow this community. We would like to make a very special thank you and acknowledgement to all of our international colleagues and friends who have contributed to JADE over the years. This book would not be possible without you. Naturally we must also reserve an additional and very warm thank you to everybody able to directly contribute material to this book. 1
Introduction
Agent-Oriented Programming (AOP) is a relatively new software paradigm that brings concepts
from the theories of articial intelligence into the mainstream realm of distributed systems. AOP
essentially models an application as a collection of components called agents that are characterized
by, among other things, autonomy, proactivity and an ability to communicate. Being autonomous
they can independently carry out complex, and often long-term, tasks. Being proactive they can
take the initiative to perform a given task even without an explicit stimulus from a user. Being
communicative they can interact with other entities to assist with achieving their own and others
goals. The architectural model of an agent-oriented application is intrinsically peer to peer, as any
agent is able to initiate communication with any other agent or be the subject of an incoming
communication at any time.
Agent technology has been the subject of extensive discussion and investigation within the
scientic community for several years, but it is perhaps only recently that it has seen any sig-
nicant degree of exploitation in commercial applications. Multi-agent systems are being used in
an increasingly wide variety of applications, ranging from comparatively small systems for per-
sonal assistance to open, complex, mission-critical systems for industrial applications. Examples
of industrial domains where multi-agent systems have been fruitfully employed include process
control, system diagnostics, manufacturing, transportation logistics and network management.
When adopting an agent-oriented approach to solving a problem, there are a number of domain-
independent issues that must always be solved, such as how to allow agents to communicate. Rather
than expecting developers to develop this core infrastructure themselves, it is convenient to build
multi-agent systems on top of an agent-oriented middleware that provides the domain-independent
infrastructure, allowing the developers to focus on the production of the key business logic.
This book describes JADE (Java Agent DEvelopment framework), probably the most widespread
agent-oriented middleware in use today. JADE is a completely distributed middleware system with
a exible infrastructure allowing easy extension with add-on modules. The framework facilitates
the development of complete agent-based applications by means of a run-time environment imple-
menting the life-cycle support features required by agents, the core logic of agents themselves, and
a rich suite of graphical tools. As JADE is written completely in Java, it benets from the huge set
of language features and third-party libraries on offer, and thus offers a rich set of programming
abstractions allowing developers to construct JADE multi-agent systems with relatively minimal
expertise in agent theory. JADE was initially developed by the Research & Development depart-
ment of Telecom Italia s.p.a., but is now a community project and distributed as open source under
the LGPL licence.
The JADE website is http://jade.tilab.com. In addition, a book companion website from Wiley
is available at http://wiley.com/go/bellifemine jade.
Developing Multi-Agent Systems with JADE Fabio Bellifemine, Giovanni Caire, Dominic Greenwood Copyright 2007 John Wiley & Sons, Ltd 2 Introduction
The book s intended audience is primarily application developers with goals to both provide a comprehensive explanation of the features provided by JADE and also to serve as a handbook for programmers. Many of the features discussed are supported with exemplary code, either ad hoc or positioned with the context of a pervasive book trading example. All code snippets and application examples provided in the book relate to version 3.4.1 of JADE released on November 2006; although we expect this material will remain consistent with future versions and is, in the most part, backward compatible with previous versions of JADE. The book is structured as follows: Chapter 2 presents an overview of agent technology discussing the most relevant agent-related concepts, architectures and tools. Moreover, it provides a summary of the FIPA specications that represent the most important standardization activity conducted in the eld of agent technology. Chapter 3 presents the core architecture of JADE, its components and supported features. It also shows how to start the platform, launch agents and use the graphical administration tools. Chapters 4, 5 and 6 focus on the main Application Programming Interfaces (APIs) that JADE provides to access its features. Chapter 4 describes the basic features, Chapter 5 the advanced features and Chapter 6 is dedicated to agent mobility. Chapter 7 presents the internal architecture of the JADE kernel and explains how to modify and extend its behaviour. Chapter 8 addresses the development and deployment of JADE-based applications in the mobile and wireless environment. Chapters 9, 10 and 11 present additional congurations and tools that can be used to solve issues that must typically be taken into account when deploying real-world applications. Chapter 12 then discusses the JADE Semantic Framework, an important and recently released module that exploits the formal semantics of messages exchanged by agents. Finally, Chapter 13 gives an overview of other relevant tools that can be used with JADE. 2
Agent Technology Overview
The rst part of this chapter presents an overview of agent technology, including a brief discus- sion on agent architectures, programming languages, and tools. It also provides a set of relevant bibliographic references to scientic papers and applications of multi-agent systems. The second part of the chapter describes the FIPA specications, today the most widespread and accepted set of standards for multi-agent platforms and applications. JADE is compliant with the FIPA specications; it has also in some ways extended the FIPA model in several areas, but in all aspects related to interoperability, the core purpose of FIPA, JADE fully respects the FIPA specications.
2.1 ABOUT AGENTS
Agents are considered one of the most important paradigms that on the one hand may improve on current methods for conceptualizing, designing and implementing software systems, and on the other hand may be the solution to the legacy software integration problem.
2.1.1 WHAT IS AN AGENT?
The term agent , or software agent, has found its way into a number of technologies and has been widely used, for example, in articial intelligence, databases, operating systems and computer networks literature. Although there is no single denition of an agent (see, for example, Genesereth and Ketchpel, 1994; Wooldridge and Jennings, 1995; Russell and Norvig, 2003), all denitions agree that an agent is essentially a special software component that has autonomy that provides an interoperable interface to an arbitrary system and/or behaves like a human agent, working for some clients in pursuit of its own agenda. Even if an agent system can be based on a solitary agent working within an environment and if necessary interacting with its users, usually they consist of multiple agents. These multi-agent systems (MAS) can model complex systems and introduce the possibility of agents having common or conicting goals. These agents may interact with each other both indirectly (by acting on the environment) or directly (via communication and negotiation). Agents may decide to cooperate for mutual benet or may compete to serve their own interests. Therefore, an agent is autonomous, because it operates without the direct intervention of humans or others and has control over its actions and internal state. An agent is social, because it cooperates with humans or other agents in order to achieve its tasks. An agent is reactive, because it perceives its environment and responds in a timely fashion to changes that occur in the environment. And
Developing Multi-Agent Systems with JADE Fabio Bellifemine, Giovanni Caire, Dominic Greenwood Copyright 2007 John Wiley & Sons, Ltd 4 Agent Technology Overview
an agent is proactive, because it does not simply act in response to its environment but is able to exhibit goal-directed behavior by taking initiative. Moreover, if necessary an agent can be mobile, with the ability to travel between different nodes in a computer network. It can be truthful, providing the certainty that it will not deliberately communicate false information. It can be benevolent, always trying to perform what is asked of it. It can be rational, always acting in order to achieve its goals and never to prevent its goals being achieved, and it can learn, adapting itself to t its environment and to the desires of its users.
2.1.2 ARCHITECTURES
Agent architectures are the fundamental mechanisms underlying the autonomous components that support effective behaviour in real-world, dynamic and open environments. In fact, initial efforts in the eld of agent-based computing focused on the development of intelligent agent architectures, and the early years established several lasting styles of architecture. These range from purely reactive (or behavioural) architectures that operate in a simple stimulus Cresponse fashion, such as those based on the subsumption architecture of Brooks (1991) at one extreme, to more deliberative architectures that reason about their actions, such as those based on the belief desire intention (BDI) model (Rao and Georgeff, 1995), at the other extreme. In between the two lie hybrid combinations of both, or layered architectures, which attempt to involve both reaction and deliberation in an effort to adopt the best of each approach. Thus agent architectures can be divided into four main groups: logic based, reactive, BDI and layered architectures. Logic-based (symbolic) architectures draw their foundation from traditional knowledge-based systems techniques in which an environment is symbolically represented and manipulated using reasoning mechanisms. The advantage of this approach is that human knowledge is symbolic so encoding is easier, and they can be constructed to be computationally complete, which makes it easier for humans to understand the logic. The disadvantages are that it is difcult to translate the real world into an accurate, adequate symbolic description, and that symbolic representation and manipulation can take considerable time to execute with results are often available too late to be useful. Reactive architectures implement decision-making as a direct mapping of situation to action and are based on a stimulus Cresponse mechanism triggered by sensor data. Unlike logic-based architectures, they do not have any central symbolic model and therefore do not utilize any com- plex symbolic reasoning. Probably the best-known reactive architecture is Brooks s subsumption architecture (Brooks, 1991). The key ideas on which Brooks realized this architecture are that an intelligent behaviour can be generated without explicit representations and abstract reasoning pro- vided by symbolic articial intelligence techniques and that intelligence is an emergent property of certain complex systems. The subsumption architecture denes layers of nite state machines that are connected to sensors that transmit real-time information (an example of subsumption archi- tecture is shown in Figure 2.1). These layers form a hierarchy of behaviours in which the lowest
Reasoning about behaviour of objects
Plan changes to the world
Sensor Identify objects Actuator
Monitor changes
Build maps
Explore
Wander
Avoid obstacle
Figure 2.1 A subsumption architecture for robot navigation
About Agents 5
levels have less control than higher levels of the stack, thus decision-making is achieved through goal-directed behaviours. Subsumption-designed agents perceive conditions and act, but do not plan. The advantage of this approach is that it will perform better (i.e. respond faster but not reason better) in dynamic environments, as well as that they are often simpler in design than logic-based agents. However, the fact that reactive agents do not employ models of their environment results in some disadvantages. In fact, sensor data may not be sufcient to determine an appropriate action and the lack of agent state makes it almost impossible to design agents that learn from experience. Moreover, given that the agent acts on the basis of the interaction among the different behaviours, it is very hard to engineer reactive agents to full specic tasks, in particular, when such agents must be realized through a large number of behaviours. BDI (Belief, desire, intention) architectures are probably the most popular agent architectures (Rao and Georgeff, 1995). They have their roots in philosophy and offer a logical theory which denes the mental attitudes of belief, desire and intention using a modal logic. Many different agent-based systems have been realized that implement BDI (e.g. PRS (Georgeff and Lansky, 1987), JAM (Huber, 1999), JACK (Howden et al., 2001), dMARS (d Inverno et al., 1998 and JADEX (see Section 13.4)) with a wide range of applications demonstrating the viability of the model. One of the most well-known BDI architectures is the Procedural Reasoning System (PRS) (Georgeff and Lansky, 1987). This architecture is based on four key data structures: beliefs, desires, intentions and plans, and an interpreter (see Figure 2.2). In the PRS system, beliefs represent the information an agent has about its environment, which may be incomplete or incorrect. Desires represent the tasks allocated to the agent and so correspond to the objectives, or goals, it should accomplish. Intentions represent desires that the agent has committed to achieving. Finally, plans specify some courses of action that may be followed by an agent in order to achieve its intentions. These four data structures are managed by the agent interpreter which is responsible for updating beliefs from observations made of the environment, generating new desires (tasks) on the basis of new beliefs, and selecting from the set of currently active desires some subset to act as intentions. Finally, the interpreter must select an action to perform on the basis of the agent s current intentions and procedural knowledge. Layered (hybrid) architectures allow both reactive and deliberative agent behaviour. To enable this exibility, subsystems arranged as the layers of a hierarchy are utilized to accommodate both types of agent behaviour. There are two types of control ows within a layered architecture: hori- zontal (Ferguson, 1991) and vertical layering (Muller et al., 1995). In horizontal layering, the layers are directly connected to the sensory input and action output (see Figure 2.3), which essentially has each layer acting like an agent. The main advantage of this is the simplicity of design since if the agent needs n different types of behaviours, then the architecture only requires n layers. However, since each layer is in effect an agent, their actions could be inconsistent prompting the need for a mediator function to control the actions. Another complexity is the large number of possible interactions between horizontal layers Cmn (where m is the number of actions per layer). A vertical layer architecture eliminates some of these issues as the sensory input and action output are each
Beliefs Plan library
Sensors Actuators
Interpreter
Goals Intentions
Figure 2.2 The PRS agent architecture
6 Agent Technology Overview
Horizontal One-pass vertical
layered layered
Sensors Sensors Actuators
Layer 1 Layer 1
Sensors Layer 1 Actuators
Layer 2 Layer 2 Layer 2
Layer 3 Layer 3 Layer 3
Layer n Layer n Layer n
Actuators
Two-pass vertical
layered
Figure 2.3 Data and control ows in the layered architectures
dealt with by at most one layer each (creating no inconsistent action suggestions). The vertical lay- ered architecture can be subdivided into one-pass and two-pass control architectures. In one-pass architectures, control ows from the initial layer that gets data from sensors to the nal layer that generates action output (see Figure 2.3). In two-pass architectures, data ows up the sequence of layers and control then ows back down (again, see Figure 2.3). The main advantage of vertical layered architecture is the interaction between layers is reduced signicantly to m2(n1). The main disadvantage is that the architecture depends on all layers and is not fault tolerant, so if one layer fails, the entire system fails.
2.1.3 COMMUNICATION AND COORDINATION One of the key components of multi-agent systems is communication. In fact, agents need to be able to communicate with users, with system resources, and with each other if they need to cooperate, collaborate, negotiate and so on. In particular, agents interact with each other by using some special communication languages, called agent communication languages, that rely on speech act theory (Searle, 1969) and that provide a separation between the communicative acts and the content language. The rst agent communication language with a broad uptake was KQML (Mayeld et al., 1996). KQML was developed in the early 1990s as part of the US government s ARPA Knowledge Sharing Effort. It is a language and protocol for exchanging information and knowledge that denes a number of performative verbs and allows message content to be represented in a rst-order logic-like language called KIF (Genesereth and Ketchpel, 1994). Currently the most used and studied agent communication language is the FIPA ACL (see Section 2.2.2), which incorporates many aspects of KQML (Labrou et al., 1999). The primary features of FIPA ACL are the possibility of using different content languages and the management of conversations through predened interaction protocols. Coordination is a process in which agents engage to help ensure that a community of individual agents acts in a coherent manner (Nwana et al., 1996). There are several reasons why multiple agents need to be coordinated including: (1) agents goals may cause conicts among agents