Wiley - Wooldridge, An Introduction To Multi Agent Systems (OCR Guaranteed On Full Book)
Wiley - Wooldridge, An Introduction To Multi Agent Systems (OCR Guaranteed On Full Book)
MultiAgent
Systems
M I C H A E L W O O L D R I D G E
An introduction to
Multiaqent Systems
An Introduction to
Multiagent Systems
Michael Wooldridge
Department of Computer Science,
University of Liverpool, UK
JOHN WILEY & SONS, LTD
Copy ri g ht < 2002 John Wiley & S ons Ltd
Bat'fins Lane, Chi chcs t cr,
Wes t S us s e x PO19 1UD, Eng l and
National 01243 779777
International (+44) 1243 779777
e-mail (for orders and customer sen.ice enquiries): cs-booksfwiley.co.uk
Visii our Home Page on Imp://www.wileyeurope.com or hitp://www.wiley.com
Keprmted August 2002
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 I 988 or under the terms of a licence issued by the Copyright Licensing Agency
ltd, !)() I ottenham Court Road, London, UK W1P OLP, without the permission in writing of
the Publisher with the exception of any material supplied specifically for the purpose of
being entered and executed on a computer system for exclusive use by the purchaser of
the publication.
Neither the author nor John Wiley & Sons, Ltd accept any responsibility or liability for loss
or damage occasioned to any person or property through using the material, instructions,
methods or ideas contained herein, or acting or refraining from acting as a result of such
use. The author and publisher expressly disclaim all implied warranties, including mer-
chantability or fitness for any particular purpose. There will be no duty on the author or
publisher' to correct any errors or defects in the software.
Designations used by companies to distinguish their products are often claimed as trade-
marks. In all instances where lohn Wiley & Sons. Ltd is aware of a claim, the product names
appear in capital or all capital letters. Readers, however, should contact the appropriate
companies for more complete information regarding trademarks and registration
Library of Congress Cataloging-in-Publication Data
Wooldridge, Michael J., I 9fi(>-
An introduction to multiagent systems / Michael Wooldridge.
p. cm.
Includes bibliographical references and index.
ISBN 0-471-4969 I-X
1. Intelligent agents (Computer software)1. Title,
QA7G.76.158 VVG5 2001
00C.3 dc21
2001055949
British Library Cataloguing in Publication Data
A catalogue record for this book is available from the British Library
ISBN 0 ,7\ 49691 X
Typeset in 9.5/12.5pt l.ucida Bright by T&r Productions Ltd, London.
Printed and bound in Great Britain by Biddies Ltd, Guildford and Kings Lynn.
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.
To my family:
Jean, John, Andrew,
Christopher, and of course Janine.
Contents
Preface xi
1 Introduction 1
1.1 The Vision Thing 4
1.2 Some Views of the Field 7
1.3 Objections to Multiagent Systems 8
2 Intelligent Agents 15
2.1 Environments 1 7
2.2 Intelligent Agents 23
?3 Agents and Objects 25
2.4 Agents and Expert Systems 27
2.5 Agents as Intentional Systems 28
2.6 Abstract Architectures for Intelligent Agents 31
2.7 How to Tell an Agent What to Do 36
2.8 Synthesizing Agents 42
J Deductive Reasoning Agents 47
3.1 Agents as Theorem Provers 49
3.2 Agent-Oriented Programming 54
3.3 Concurrent MetateM 56
4 Practical Reasoning Agents 65
4.1 Practical Reasoning Equals Deliberation Plus Means-Ends Reasoning 65
4.2 Means-Ends Reasoning 70
4.3 Implementing a Practical Reasoning Agent 75
4.4 HOMER: an Agent That Plans 80
4Jj The Procedural Reasoning Systpm 82
5 Reactive and Hybrid Agents 89
5.1 Brooks and the Subs umption Architecture 90
5.2 The Limitations of Reactive Agents 96
5.3 Hybrid Agents 97
5.3.1 TouringMachines 99
5T3T2 InteRRaP Wi
6 Multiagent Interactions 105
6.1 Utilities and Preferences 106
viii Contents
6.2 Multiagent Encounters 108
6.3 Dominant Strategies and Nash Equilibria 111
6.4 Competitive and Zero-Sum Interactions 113
6.5 The Prisoner's Dilemma 114
6.6 Other Symmetric 2 x 2 Interactions 122
6.7 Dependence Relations in Multiagent Systems 125
7 Reaching Agreements 129
7.1 Mechanism Design 130
7.? Auctions 131
7.3 Negotiation 137
7.3.1 Task-oriented domains 139
7.3.2 Worth-oriented domains 146
7.4 Argumentation 148
8 Communication 163
8.1 Speech Acts 164
8.1.1 Austin 164
8.1.2 Searle 165
8.1.3 The pl an-based theory of speech acts 166
8.1.4 Speech acts as rational action 167
8.2 Agent Communication Languages 168
8.2.1 KIF 169
8.2.2 KQML 170
8.2.3 The FIPA agent communication l anguages T75
8.3 Ontol ogies for Agent Communication 180
8.4 Coordination Languages 183
9 Working Together 189
9.1 Cooperative Distributed Problem Solving 190
9.2 Task Sharing and Result Sharing 192
9.2.1 Task sharing in the Contract Net 194
9.3 Result Sharing 197
9.4 Combining Task and Result Sharing 197
9.5 Handling Inconsistency 199
9.6 Coordination 200
9.6.1 Coordination through partial global planning 202
9.6.2 Coordination through joint intentions 204
9.6.3 Coordination by mutual modelling 210
9.6.4 Coordination by norms and social laws 213
9.7 Multiagent Planning and Synchronization 218
10 Methodologies 225
10.1 When is an Agent-Based Solution Appropriate? 225
10.2 Agent-Oriented Analysis and Design Techniques 226
tt);3 Pitfalls of Agent Devel opment 21J3
10.4 Mobile Agents 236
11 Applications 245
11.1 Agents for Workflow and Business Process Management 245
11.2 Agents for Distributed Sensing 248
11.3 Agents for Information Retrieval and Management 248
11.4 Agents for Electronic Commerce 254
Contents ix
11.5 Agents for Human-Computer Interfaces 258
11.6 Agents for Virtual Environments 259
11.7 Agents for Social Simulation 259
1L8 Agents for X 261
12 Logics for Multiagent Systems 267
12J Why Modal Logic? 268
12.2 Possible-Worlds Semantics for Modal Logics 270
12.3 Normal Modal Logics 271
12.4 Epistemic Logic for Multiagent Systems 278
12.5 Pro-attitudes: Goals and Desires 280
12.6 Common and Distributed knowledge 281
12.7 Integrated Theories of Agency 283
12.8 Formal Methods in Agent-Oriented Software Engineering 288
12.8.1 Formal methods in specification 288
12.8.2 Formal methods in impl ementation 290
12.8.3 Verification 294
Appendix A. A History Lesson 303
Afterword 317
References 319
Index 343
Preface
Multiagent systems are systems composed of multiple interacting computing ele-
ments, known as agents. Agents are computer systems with two important capa-
bilities. First, they are at least to some extent capable of autonomous action - of
deciding for themselves what they need to do in order to satisfy their design objec-
Lives. Second, they are capable of interacting with other agenls - not simply by
exchanging data, but by engaging in analogues of the kind of social activity that
we all engage in every day of our lives: cooperation, coordination, negotiation,
and the like.
Multiagent systems are a relatively new sub-field of computer science - they
have only been studied since about 1980, and the field has only gained widespread
recognition since about the mid-1 QQOs. However, since then international interest
in the field has grown enormously. This rapid growth has been spurred at least in
part by the belief that agents are an appropriate software paradigm through which
to exploit the possibilities presented by massive open distributed systems - such
as the Internet. Although they will certainly have a pivotal role to play in exploiting
the potential of the Internet, there is a lot more to multiagent systems than this.
Multiagent systems seem to be a natural metaphor for understanding and building
a wide range of what we might crudely call artificial social systems. The ideas of
multiagent systems are not tied to a single application domain, but, like objects
before them, seem to find currency in a host of different application domains.
My intention in writing this book is simple. I aim to introduce the main issues in
the theory and practice of multiagent systems in a way that will be accessible to
anyone with a basic background in computer science/IT. The book is deliberately
intended to sit on the fence between science and engineering. Thus, as well as
discussing the principles and issues in the theory of multiagent systems (i.e. the
science of multiagent systems), I very much hope that I manage to communicate
something of how to build such systems (i.e. multiagent systems engineering).
The multiagent systems field can be understood as consisting of two closely
interwoven strands of work. The first is concerned with individual agents, while
the second is concerned with collections of these agents. The structure of the book
reflects this division. The first part of the book - Chapter 1 - sets the scene by
discussing where the multiagent system field emerged from, and presenting some
xii Preface
visions of where it is going. The second part - Chapters 2-5 inclusivearc con-
cerned with individual agents. Following an introduction to the concept of agents,
their environments, and the various ways in which we might tell agents what to
do, I describe and contrast the main techniques that have been proposed in the
literature for building agents. Thus I discuss agents that decide what to do via
logical deduction, agents in which decision making resembles the process of prac-
tical reasoning in humans, agents that do not explicitly reason at all, and, finally,
agents that make decisions by combining deductive and other decision-making
mechanisms. In the third part of the book - Chapters 6-10 inclusive - 1 focus on
collections of agents. Following a discussion on the various ways in which multi-
agent encounters and interactions can be classified, I discuss the ways in which
self-interested agents can reach agreements, communicate with one another, and
work together. 1 also discuss some of the main approaches proposed for designing
multiagent systems. The fourth and final part of the book presents two advanced
supplemental chapters, on applications of agent systems, and formal methods
for reasoning about agent systems, respectively.
I have assumed that the main audience for the book will be undergraduate
students of computer science/IT - the book should be suitable for such students
in their second or third year of study. However, I also hope that the book will be
accessible to coniputing/TT professionals, who wish to know more about some of
the ideas driving one of the major areas of research and development activity in
computing today.
Prerequisites: what you need to know before you start
The book assumes a knowledge of computer science that would be gained in the
first year or two of a computing or information technology degree course. In order
of decreasing importance, the specific skills required in order to understand and
make the most of the book are
an understanding of the principles of programming in high level languages
such as C or Java, the ability to make sense of pseudo-code descriptions of
algorithms, and a nodding acquaintance with some of the issues in concur-
rent and distributed systems (e.g. threads in Java);
familiarity with the basic concepts and issues of artificial intelligence (such
as the role of search and knowledge representation);
familiarity' with basic set and logic notation (e.g. an understanding of what
is meant by such symbols as e, c, n, u, A, V, ->, V, 3, h, \=).
However, in order to gain some value from the book, all that is really required is
an appreciation of what computing is about. There is not much by way of abstract
mathematics in the book, and wherever there is a quantity n of mathematics, I
have tried to compensate by including at least 2n intuition to accompany and
explain it.
Preface xiii
leaching with this book
I have written this book primarily with its use as a course text in mind. The book is
specifically intended for middle to advanced undergraduates, or beginning grad-
uates of computing/IT. The students at my University for whom this book is
intended are either in the third year of an undergraduate computing degree, or
else in the second semester of a three semester 'conversion' MSc course (i.e. an
MSc course designed to equip graduates with non-computing degrees with basic
computing skills).
The book contains somewhat more material than is likely to be taught in most
one-semester undergraduate courses, but strong students should certainly be able
to read and make sense of most of the material in a single semester. The 'core' of
the book is Chapters 1-9 and 11 inclusive. This is the material that I would regard
as being the 'core curriculum' of the multiagent systems field. This material is
divided into four main parts:
an introduction (Chapter 1), which sets the scene for the remainder of the
book;
an introduction to intelligent agents (Chapters 2-5 inclusive);
an introduction to multiagent systems (Chapters 6-9 inclusive);
a discussion of applications of multiagent systems (Chapter 11).
Although individual teachers may wish to spend larger or smaller amounts of
time covering the different parts of the book, I would nevertheless expect most
courses lo at leas I touch on ihe material in all these chapters.
I have included three jokers in the pack.
Chapter 10 (Methodologies) introduces techniques for the analysis and
design of multiagent systems, some of the pitfalls associated with designing
and deploying muitiagent systems, and a discussion of mobile agents tech-
nology. Most of this material is, more than any other material in the book,
not yet really at a stage where I believe it can form part of an undergraduate
degree (at least in my opinion!). I would not therefore expect this material to
be taught on most undergraduate courses; it is included because (i) I suspect
it will be important in the near future; (ii) I wanted to provide pointers for
those interested in finding out more; and most importantly (iii) I think its
interesting, and it is my book.
Chapter 12 (Logics for Multiagent Systems) focuses on logics for multiagent
systems. Logics of agency form a significant part of the research literature on
multiagent systems, but in my experience, many students view this material
as being hard - perhaps because it seems so abstract. However, I strongly
felt that omitting this material entirely would be doing the field a disservice,
and again, I find it interesting. Hence Chapter 12. Students with courses on
logic or semantics under their belt should find this chapter a breeze.
xiv Preface
Appendix A (A History Lesson) gives a (rather subjective!) history of the
agents field. Nobody has yet attempted to do this, and so it seems to me
to be a useful thing to do. Originally, this section was included in Chapter 1,
but several reviewers of the draft manuscript felt that perhaps it included
too much material to be really useful in an introductory chapter.
Lecture slides and other associated teaching material, as well as extensive Web
links for this book are available at
http://www.esc.1i v.ac.uk/~mjw/pubs/imas/
I welcome additional teaching materials (e.g. tutorial/discussion questions, exam
papers and so on), which I will make available on an 'open source' basis - please
email to
[email protected]
Chapter structure
Every chapter of the book ends with three sections, which I hope will be of wider
interest.
A 'class reading' suggestion, which lists one or two key articles from the
research literature that may be suitable for class reading in seminar-based
courses.
A 'notes and further reading' section, which provides additional technical
comments on the chapter and extensive pointers into the literature for
advanced reading. This section is aimed at those who wish to gain a deeper,
research-level understanding of the material.
An 'exercises' section, which might form the basis of homework to be set for
students. Exercises are graded on a scale of one to four, with one being the
easiest (a few minutes work), and four being the hardest (research projects).
Exercises of difficulty three might be undertaken as projects over some
weeks or months; exercises of level one or two should be feasible within
a few hours at most, and might be undertaken as part of weekly homework
or tutorials. Some exercises are suggested for class discussion.
What I left out and why
Part of the joy in working in the multiagent systems field is that it takes inspiration
from, and in turn contributes to, a very wide range of other disciplines. The field
is in part Artificial Intelligence (AI), part economics, part software engineering,
part social sciences, and so on. But this poses a real problem for anyone writing a
book on the subject, namely, what to put in and what to leave out. While there is a
large research literature on agents, there are not too many models to look at with
respect to textbooks on the subject, and so I have had to make some hard choices
Preface xv
here. When deciding what to put in/leave out, I have been guided to a great extent
by what the 'mainstream' multiagent systems literature regards as important, as
evidenced by the volume of published papers on the subject. The second consid-
eration was what might reasonably be (i) taught and (ii) understood in the context
of a typical one-semester university course. This largely excluded most abstract
theoretical material, which will probably make most students happy - if not their
teachers.
I deliberately chose to omit some material as follows.
Learning. My view is that learning is an important agent capability, but is not cen-
tral to agency. After some agonizing, I therefore decided not to cover learning.
There are plenty of references to learning algorithms and techniques: see, for
example, Kaelbling (1993), WeiE (1993, 1997), WeiE and Sen (1996) and Stone
(2000).
Artificial life. Some sections of this book (in Chapter 5 particularly) are closely
related to work carried out in the artificial life, or 'alife' community. However,
the work of the alife community is carried out largely independently of that in
the 'mainstream' multiagent systems community. By and large, the two commu-
nities do not interact with one another. For these reasons, I have chosen not to
focus on alife in this book. (Of course, this should not be interpreted as in any
way impugning the work of the alife community: it just is not what this book is
about.) There are many easily available references to alife on the Web. A useful
starting point is Langton (1989); another good reference is Mitchell (1996).
Mobility. There is something of a schism in the agents community between those
that do mobility and those who do not - I mostly belong to the second group.
Like learning, I believe mobility is an important agent capability, which is par-
ticularly valuable for some applications. But, like learning, 1 do not view it to be
central to the multiagent systems curriculum. In fact, I do touch on mobility, in
Chapter 10 - but only relatively briefly: the interested reader will find plenty of
references in this chapter.
Markov decision problems. Markov decision problems (MDPs), together with
their close relatives partially observable MDPs, are now the subject of much
attention in the AI community, as they seem to provide a promising approach
to the problem of making decisions under uncertainty. As we will see in much
of the remainder of this book, this is a fundamental problem in the agent agent
community also. To give a detailed introduction to MDPs, however, would be
out of the question in a textbook on agents. See Blythe (1999) for pointers into
the literature, and Kaelbling et al. (1998) for a detailed technical overview of the
area and issues; Russell and Norvig (1995, pp. 498-522) give an overview in the
context of an AI textbook.
In my opinion, the most important thing for students to understand are (i) the
'big picture' of multiagent systems (why it is important, where it came from, what
xvi Preface
the issues are, and where it is going), and (ii) what the key tools, techniques, and
principles are. Students who understand these two things should be well equipped
to make sense of the deeper research literature if they choose to.
Omissions and errors
In writing this book, I tried to set out the main threads of work that make up the
multiagent systems field, and to critically assess their relative merits. In doing
so, I have tried to be as open-minded and even-handed as time and space permit.
However, I will no doubt have unconsciously made my own foolish and igno-
rant prejudices visible, by way of omissions, oversights, and the like. If you find
yourself speechless with rage at something I have omitted - or included, for that
matter - then all I can suggest is that you accept my apology, and take solace from
the fact that someone else is almost certainly more annoyed with the book than
you are.
Little did I imagine as I looked upon the results of my labours where
these sheets of paper might finally take me. Publication is a powerful
thing. It can bring a man all manner of unlooked-for events, making
friends and enemies of perfect strangers, and much more besides.
Matthew Kneale (English Passengers)
Comments and corrections - and suggestions for a possible second edition - are
welcome, and should be sent to the email address given above.
Web references
It would be very hard to write a book about Web-related issues without giving
URLs as references. In many cases, the best possible reference to a subject is
a Web site, and given the speed with which the computing field evolves, many
important topics are only documented in the 'conventional' literature very late
in the day. But citing Web pages as authorities can create big problems for the
reader. Companies go bust, sites go dead, people move, research projects finish,
and when these things happen, Web references become useless. For these reasons,
I have therefore attempted to keep Web references to a minimum. I have preferred
to cite the 'conventional' (i.e. printed), literature over Web pages when given a
choice. In addition, I have tried to cite only Web pages that are likely to be stable
and supported for the foreseeable future. The date associated with a Web page is
the date at which I checked the reference was working. Many useful Web links are
available from the book's Web page, listed earlier.
Acknowledgments
Several people gave invaluable feedback on the 'history of the field' section. In
particular, Les Gasser and Victor Lesser were extremely helpful in sorting out my
Preface xvii
muddled view of the early days of distributed AI, and Jeff Rosensehein gave a lot
of help in understanding how game-theoretic techniques entered the multiagent
systems literature. Keith Decker gave suggestions about material to cover on bro-
kers and middle agents. Michael Fisher helped with examples to illustrate his
Concurrent MetateM language in Chapter 3. Valentina Tamma set me straight on
ontologies and DAML. Karen Mosman from Wiley was (and indeed is) an unspeak-
ably cheerful, enthusiastic, and charming editor, and I suppose I should grudg-
ingly admit that I very much enjoyed working with her. Simon Parsons and Peter
McBurney were enormously helpful with the section on argumentation. Nick Jen-
nings, as ever, gave encouragement, support, and sensible practical advice on
contents and style.
Marie Devlin, Shaheen Fatima, Marc-Philippe Huget, Peter McBurney, Carmen
Pardavila, and Valentina Tamma read drafts of the book and gave detailed, help-
ful comments. Marie saved me many hours and much tedium by checking and
crosschecking the bibliography for me. I hate books with sloppy or incomplete
references, and so Marie's help was particularly appreciated. We both made exten-
sive use of the CITESEER autonomous citation system from NEC (see NEC, 2001),
which, as well as helping to provide the definitive reference for many obscure
articles, also helped to obtain the actual text in many instances. Despite all this
help, many typos and more serious errors will surely remain, and these are of
course my responsibility.
I have taught parts of this book in various guises at various locations since
1995. The comments and feedback from students and other participants at these
venues has helped me to improve it significantly. So, thanks here to those at the
199b German Spring School on Al (K1FS) in Gunne am Mohnesee, the AgentLink
summer schools in Utrecht (1999), Saarbrucken (2000), and Prague (2001), the
ESSLLI course on agent theory in Saarbriicken (1998), tutorial participants at
ICMAS in San Francisco (1995) and Paris (1998), tutorial participants at ECAI in
Budapest (1996), Brighton (1998), and Berlin (2000), and AGENTS in Minneapolis
(1998), Seattle (1999), Barcelona (2000), and Montreal (2001), as well as students in
courses on agents that I have taught at Lausanne (1999), Barcelona (2000), Helsinki
(1999 and 2001), and Liverpool (2001). Boi Faltings in Lausanne, Ulises Cortes
and Carles Sierra in Barcelona, and Heimo Lammanen and Kimmo Raatikainen in
Helsinki were all helpful and generous hosts during my visits to their respective
institutions.
As ever, my heartfelt thanks go out to my colleagues and friends in the multi-
agent systems research community, who have made academia rewarding and
enjoyable. You know who you are! Deserving of a special mention here are Carles
Sierra and Carme: their kindness and hospitality has been astonishing.
I took over as Head of Department while I was completing this book, which
nearly killed both the book and the Department stone dead. Fortunately - or not,
depending on your point of view - Katrina Houghton fought hard to keep the
University at bay, and thus bought me enough time to complete the job. For this
xviii Preface
I am more grateful than she could imagine. Paul Leng was a beacon of common
sense and good advice as I took over being Head of Department, without which I
would have been even more clueless about the job than I am now.
A network of friends have helped me keep my feet firmly on the ground through-
out the writing of this book, but more generally throughout my career. Special
thanks here to Dave, Janet, Pangus, Addy, Josh, Ant, Emma, Greggy, Helen, Patrick,
Bisto, Emma, Ellie, Mogsie, Houst, and the rest of the Herefordians.
My family have always been there, and writing this book has been made much
easier for that. My parents, Jean and John Wooldridge, have always supported me
in my career. Brothers Andrew and Christopher have done what all good brothers
do: mercilessly tease at every opportunity, while simultaneously making their love
abundantly clear. Janine, as ever, has been my world.
Finally, I hope everyone in the Department office will accept this finished book
as definitive proof that when I said I was 'working at home', I really was. Well,
sometimes at least.
Mike Wooldridge
Liverpool
Autumn 2001
Introduction
The history of computing to date has been marked by five important, and contin-
uing, trends:
ubiquity;
interconnection;
intelligence;
delegation; and
human-orientation.
By ubiquity, I simply mean that the continual reduction in cost of computing
capability has made it possible to introduce processing power into places and
devices that would hitherto have been uneconomic, and perhaps even unimagin-
able. This trend will inevitably continue, making processing capability, and hence
intelligence of a sort, ubiquitous.
While the earliest computer systems were isolated entities, communicating only
with their human operators, computer systems today are usually interconnected.
They are networked into large distributed systems. The Internet is the obvious
example; it is becoming increasingly rare to find computers in use in commercial
or academic settings that do not have the capability to access the Internet. Until
a comparatively short time ago, distributed and concurrent systems were seen by
many as strange and difficult beasts, best avoided. The very visible and very rapid
growth of the Internet has (I hope) dispelled this belief forever. Today, and for the
future, distributed and concurrent systems are essentially the norm in commercial
and industrial computing, leading some researchers and practitioners to revisit
the very foundations of computer science, seeking theoretical models that better
reflect the reality of computing as primarily a process of interaction.
2 Introduction
The third trend is toward ever more intelligent systems. By this, I mean that the
complexity of tasks that we are capable of automating and delegating to comput-
ers has also grown steadily. We are gaining a progressively better understanding
of how to engineer computer systems to deal with tasks that would have been
unthinkable only a short time ago.
The next trend is toward ever increasing delegation. For example, we routinely
delegate to computer systems such safety critical tasks as piloting aircraft. Indeed,
in fly-by-wire aircraft, the judgement of a computer program is frequently trusted
over that of experienced pilots. Delegation implies that we give control to com-
puter systems.
The fifth and final trend is the steady move away from machine-oriented views
of programming toward concepts and metaphors that more closely reflect the
way in which we ourselves understand the world. This trend is evident in every
way that we interact with computers. For example, in the earliest days of com-
puters, a user interacted with computer by setting switches on the panel of the
machine. The internal operation of the device was in no way hidden from the
user - in order to use it successfully, one had to fully understand the internal
structure and operation of the device. Such primitive - and unproductive - inter-
faces gave way to command line interfaces, where one could interact with the
device in terms of an ongoing dialogue, in which the user issued instructions
that were then executed. Such interfaces dominated until the 1980s, when they
gave way to graphical user interfaces, and the direct manipulation paradigm in
which a user controls the device by directly manipulating graphical icons cor-
responding to objects such as files and programs. Similarly, in the earliest days
of computing, programmers had no choice but to program their computers in
terms of raw machine code, which implied a detailed understanding of the internal
structure and operation of their machines. Subsequent programming paradigms
have progressed away from such low-level views: witness the development of
assembler languages, through procedural abstraction, to abstract data types, and
most recently, objects. Each of these developments have allowed programmers
to conceptualize and implement software in terms of higher-level - more human-
oriented - abstractions.
These trends present major challenges for software developers. With respect
to ubiquity and interconnection, we do not yet know what techniques might be
used to develop systems to exploit ubiquitous processor power. Current software
development models have proved woefully inadequate even when dealing with
relatively small numbers of processors. What techniques might be needed to deal
with systems composed of 10
10
processors? The term global computing has been
coined to describe such unimaginably large systems.
The trends to increasing delegation and intelligence imply the need to build
computer systems that can act effectively on our behalf. This in turn implies two
capabilities. The first is the ability of systems to operate independently, without
our direct intervention. The second is the need for computer systems to be able
Introduction
to act in such a way as to represent our best interests while interacting with other
humans or
The trend toward interconnection and distribution has, in mainstream com-
puter science, long been recognized as a key challenge, and much of the intellec-
tual energy of the field throughout the last three decades has been directed toward
developing software tools and mechanisms that allow us to build distributed sys-
tems with greater ease and reliability. However, when coupled with the need for
systems that can represent our best interests, distribution poses other funda-
mental problems. When a computer system acting on our behalf must interact
with another computer system that represents the interests of another, it may
well be that (indeed, it is likely), that these interests are not the same. It becomes
necessary to endow such systems with the ability to cooperate and reach agree-
ments with other systems, in much the same way that we cooperate and reach
agreements with others 111 everyday life. This type of capability was not studied
in computer science until very recently.
Together, these trends have led to the emergence of a new field in computer
science: multiagent systems. The idea of a multiagent system is very simple. An
agent is a computer system that is capable of independent action on behalf of its
user or owner. In other words, an agent can figure out for itself what it needs to
do in order to satisfy its design objectives, rather than having to be told explicitly
what to do at any given moment. A multiagent system is one that consists of
a number of agents, which interact with one another, typically by exchanging
messages through some computer network infrastructure. In the most general
case, the agents in a multiagent system will be representing or acting on behalf of
users or owners with very different goals and motivations. In order to successfully
interact, these agents will thus require the ability to cooperate, coordinate, and
negotiate with each other, in much the same way that we cooperate, coordinate,
and negotiate with other people in our everyday lives.
This book is about multiagent systems. It addresses itself to the two key prob-
lems hinted at above.
How do we build agents that are capable of independent, autonomous action
in order to successfully carry out the tasks that we delegate to them?
How do we build agents that are capable of interacting (cooperating, coordi-
nating, negotiating) with other agents in order to successfully carry out the
tasks that we delegate to them, particularly when the other agents cannot
be assumed to share the same interests/goals?
The first problem is that of agent design, and the second problem is that of society
design. The two problems are not orthogonal - for example, in order to build a
society of agents that work together effectively, it may help if we give members
of the society models of the other agents in it. The distinction between the two
issues is often referred to as the micro/macro distinction. In the remainder of this
book, I address both of these issues in detail.
Introduction
Researchers in multiagent systems maybe predominantly concerned with engi-
neering systems, but this is by no means their only concern. As with its stable
mate AI, the issues addressed by the multiagent systems field have profound
implications for our understanding of ourselves. AI has been largely focused on
the issues of intelligence in individuals. But surely a large part of what makes us
unique as a species is our social ability. Not only can we communicate with one
another in high-level languages, we can cooperate, coordinate, and negotiate with
one another. While many other species have social ability of a kind - ants and
other social insects being perhaps the best-known examples - no other species
even begins to approach us in the sophistication of our social ability. In multiagent
systems, we address ourselves to such questions as follow.
How can cooperation emerge in societies of self-interested agents?
What sorts of common languages can agents use to communicate their
beliefs and aspirations, both to people and to other agents?
How can self-interested agents recognize when their beliefs, goals, or actions
conflict, and how can they reach agreements with one another on matters
of self-interest, without resorting to conflict?
How can autonomous agents coordinate their activities so as to coopera-
tively achieve goals?
While these questions are all addressed in part by other disciplines (notably eco-
nomics and the social sciences), what makes the multiagent systems field unique
and distinct is that it emphasizes that the agents in question are computational,
information processing entities.
The remainder of this chapter
The purpose of this first chapter is to orient you for the remainder of the book.
The chapter is structured as follows.
I begin, in the following section, with some scenarios. The aim of these sce-
narios is to give you some feel for the long-term visions that are driving
activity in the agents area.
As with multiagent systems themselves, not everyone involved in the agent
community shares a common purpose. I therefore summarize the different
ways that people think about the 'multiagent systems project'.
I then present and discuss some common objections to the multiagent sys-
tems field.
1.1 The Vision Thing
It is very often hard to understand what people are doing until you understand
what their motivation is. The aim of this section is therefore to provide some
The Vision Thing
motivation for what the agents community does. This motivation comes in the
style of long-term future visions - ideas about how things might be. A word of
caution: these visions are exactly that, visions. None is likely to be realized in the
immediate future. Rut for each of the visions, work is underway in developing the
kinds of technologies that might be required to realize them.
Due to an unexpected system failure, a space probe approaching Sat-
urn loses contact with its Earth-based ground crew and becomes disori-
ented. Rather than simply disappearing into the void, the probe recog-
nizes that there has been a key system failure, diagnoses and isolates
the fault, and correctly re-orients itself in order to make contact with
its ground crew.
They key issue here is the ability of the space probe to act autonomously. First
the probe needs to recognize that a fault has occurred, and must then figure out
what needs to be done and how to do it. Finally, the probe must actually do the
actions it has chosen, and must presumably monitor what happens in order to
ensure that all goes well. If more things go wrong, the probe will be required to
recognize this and respond appropriately. Notice that this is the kind of behaviour
that we (humans) find easy: we do it every day, when we miss a flight or have a flat
tyre while driving to work. But, as we shall see, it is very hard to design computer
programs that exhibit this kind of behaviour.
NASA's Deep Space 1 (DS1) mission is an example of a system that is close to
this kind of scenario. Launched from Cape Canaveral on 24 October 1998, DS1
was the first space probe to have an autonomous, agent-based control system
(Muscettola et ah, 1998). Before DS1, space missions required a ground crew of
up to 3UU staff to continually monitor progress. This ground crew made all neces-
sary control decisions on behalf of the probe, and painstakingly transmitted these
decisions to the probe for subsequent execution. Given the length of typical plan-
etary exploration missions, such a procedure was expensive and, if the decisions
were ever required quickly, it was simply not practical. The autonomous control
system in DS1 was capable of making many important decisions itself. This made
the mission more robust, particularly against sudden unexpected problems, and
also had the very desirable side effect of reducing overall mission costs.
The next scenario is not quite down-to-earth, but is at least closer to home.
A key air-traffic control system at the mam airport of Ruritania sud-
denly fails, leaving flights in the vicinity of the airport with no air-traffic
control support. Fortunately, autonomous air-traffic control systems
in nearby airports recognize the failure of their peer, and cooperate
to track and deal with all affected flights. The potentially disastrous
situation passes without incident.
There are several key issues in this scenario. The first is the ability of systems to
take the initiative when circumstances dictate. The second is the ability of agents
j> Introduction
to cooperate to solve problems that are beyond the capabilities of any individ-
ual agents. The kind of cooperation required by this scenario was studied exten-
sively in the Distributed Vehicle Monitoring Testbed (DVMT) project undertaken
between 1981 and 1991 (see, for example, Durfee, 1988). The DVMT simulates
a network of vehicle monitoring agents, where each agent is a problem solver
that analyses sensed data in order to identify, locate, and track vehicles moving
through space. Each agent is typically associated with a sensor, which has only a
partial view of the entire space. The agents must therefore cooperate in order to
track the progress of vehicles through the entire sensed space. Air-traffic control
systems have been a standard application of agent research since the work of
Cammarata and colleagues in the early 1980s (Cammarata et al, 1983); a recent
multiagent air-traffic control application is the OASIS system implemented for use
at Sydney airport in Australia (Ljunberg and Lucas, 1992).
Well, most uf us are neither involved in designing the control systems for NASA
space probes, nor are we involved in the design of safety critical systems such as
air-traffic controllers. So let us now consider a vision that is closer to most of our
everyday lives.
After the wettest and coldest TTK winter on record, you are in des-
perate need of a last minute holiday somewhere warm and dry. After
specifying your requirements to your personal digital assistant (PDA),
it converses with a number of different Web sites, which sell services
such as flights, hotel rooms, and hire cars. After hard negotiation on
your behalf with a range of sites, your PDA presents you with a package
holiday.
This example is perhaps the closest of all four scenarios to actually being realized.
There are many Web sites that will allow you to search for last minute holidays,
but at the time of writing, to the best of my knowledge, none of them engages
in active real-time negotiation in order to assemble a package specifically for you
from a range of service providers. There are many basic research problems that
need to be solved in order to make such a scenario work; such as the examples
that follow.
How do you state your preferences to your agent?
How can your agent compare different deals from different vendors?
What algorithms can your agent use to negotiate with other agents (so as to
ensure you are not 'ripped off')?
The ability to negotiate in the style implied by this scenario is potentially very
valuable indeed. Every year, for example, the European Commission puts out thou-
sands of contracts to public tender. The bureaucracy associated with managing
this process has an enormous cost. The ability to automate the tendering and
negotiation process would save enormous sums of money (taxpayers' money!).
Similar situations arise in government organizations the world over - a good
Some Views of the Field
example is the US military. So the ability to automate the process of software
agents reaching mutually acceptable agreements on matters of common interest
is not just an abstract concern - it may affect our lives (the amount of tax we pay)
in a significant way.
1.2 Some Views of the Field
The multiagent systems field is highly interdisciplinary: it takes inspiration from
such diverse areas as economics, philosophy, logic, ecology, and the social sci-
ences. It should come as no surprise that there are therefore many different views
about what the 'multiagent systems project' is all about. In this section, I will sum-
marize some of the main views.
Agents as a paradigm for software engineering
Software engineers have derived a progressively better understanding of the char-
acteristics of complexity in software. It is now widely recognized that interaction
is probably the most important single characteristic of complex software. Soft-
ware architectures that contain many dynamically interacting components, each
with their own thread of control and engaging in complex, coordinated proto-
cols, are typically orders of magnitude more complex to engineer correctly and
efficiently than those that simply compute a function of some input through a
single thread of control- Unfortunately, it turns out that many (if not most) real-
world applications have precisely these characteristics. As a consequence, a major
research topic in computer science over at least the past two decades has been
the development of tools and techniques to model, understand, and implement
systems in which interaction is the norm. Indeed, many researchers now believe
that in the future, computation itself will be understood chiefly as a process of
interaction. Just as we can understand many systems as being composed of essen-
tially passive objects, which have a state and upon which we can perform opera-
tions, so we can understand many others as being made up of interacting, semi-
autonomous agents. This recognition has led to the growth of interest in agents
as a new paradigm for software engineering.
As I noted at the start of this chapter, the trend in computing has been - and
will continue to be - toward ever more ubiquitous, interconnected computer sys-
tems. The development of software paradigms that are capable of exploiting the
potential of such systems is perhaps the greatest challenge in computing at the
start of the 21st century. Agents seem a strong candidate for such a paradigm.
Agents as a tool for understanding human societies
In Isaac Asimov's popular Foundation science fiction trilogy, a character called
Hari Seldon is credited with inventing a discipline that Asimov refers to as 'psy-
8 Introduction
chohistory'. The idea is that psychohistory is a combination of psychology, his-
tory, and economics, which allows Seldon to predict the behaviour of human soci-
eties hundreds of years into the future. In particular, psychohistory enables Sel-
don to predict the imminent collapse of society. Psychohistory is an interesting
plot device, but it is firmly in the realms of science fiction. There are far too many
variables and unknown quantities in human societies to do anything except pre-
diet very broad trends a short term into the future, and even then the process is
notoriously prone to embarrassing errors. This situation is not likely to change
in the foreseeable future. However, multiagent systems do provide an interesting
and novel new tool for simulating societies, which may help shed some light on
various kinds of social processes. A nice example of this work is the EOS project
(Doran and Palmer, 1995). The aim of the EOS project was to use the tools of
multiagent systems research to gain an insight into how and why social complex-
ity emerged in a Palaeolithic culture in southern France at the time of the last
ice age. The goal of the project was not to directly simulate these ancient soci-
eties, but to try to understand some of the factors involved in the emergence of
social complexity in such societies. (The EOS project is described in more detail
in Chapter 12.)
1.3 Objections to Multiagent Systems
No doubt some readers are already sceptical about multiagent systems, as indeed
are some in the international computer science research community. In this sec-
tion, therefore, I have attempted to anticipate and respond to the most commonly
voiced objections to multiagent systems.
Is it not all just distributed/concurrent systems?
The concurrent systems community have for several decades been investigat-
nig the properties of systems thai contain multiple interacting components, and
have been developing theories, programming languages, and tools for explaining,
modelling, and developing such systems (Ben-Ari, 1990; Holzmann, 1991; Magee
and Kramer, 1999). Multiagent systems are - by definition - a subclass of con-
current systems, and there are some in the distributed systems community who
question whether multiagent systems are sufficiently different to 'standard' dis-
tributed/concurrent systems to merit separate study. My view on this is as follows.
First, it is important to understand that when designing or implementing a multi-
agent system, it is essential to draw on the wisdom of those with experience in
distributed/concurrent systems. Failure to do so invariably leads to exactly the
kind of problems that this community has been working for so long to overcome.
Thus it is important to worry about such issues as mutual exclusion over shared
resources, deadlock, and livelock when implementing a multiagent system.
Objections to Multiagent Systems 9
In multiagent systems, however, there are two important twists to the concur -
rent systems story.
First, because agents are assumed to be autonomous - capable of making
independent decisions about what to do in order to satisfy their design
objectives - it is generally assumed that the synchronization and coordi-
nation structures in a multiagent system are not hardwired in at design
time, as they typically are in standard concurrent/distributed systems.
We therefore need mechanisms that will allow agents to synchronize and
coordinate their activities at run time.
Second, the encounters that occur among computing elements in a multi-
agent system are economic encounters, in the sense that they are encounters
between self-interested entities. In a classic distributed/concurrent system,
all the computing elements are implicitly assumed to share a common goal
(of making the overall system function correctly). In multiagent systems, it is
assumed instead that agents are primarily concerned with their own welfare
(although of course they will be acting on behalf of some user/owner).
For these reasons, the issues studied in the multiagent systems community have
a rather different flavour to those studied in the distributed/concurrent systems
community. We are concerned with issues such as how agents can reach agree-
ment through negotiation on matters of common interest, and how agents can
dynamically coordinate their activities with agents whose goals and motives are
unknown. (It is worth pointing out, however, that I see these issues as a natural
next step for distributed/concurrent systems research.)
Is it not all just artificial intelligence (AI)?
The multiagent systems field has enjoyed an intimate relationship with the arti-
ficial intelligence (AI) field over the years. Indeed, until relatively recently it was
common to refer to multiagent systems as a subfield of AI; although multiagent
systems researchers would indignantly - and perhaps accurately - respond that AI
is more properly understood as a subfield of multiagent systems. More recently,
it has become increasingly common practice to define the endeavour of AI itself
as one of constructing an intelligent agent (see, for example, the enormously suc-
cessful introductory textbook on AI by Stuart Russell and Peter Norvig (Russell
and Norvig, 1995)). There are several important points to be made here:
First, AI has largely (and, perhaps, mistakenly) been concerned with the com-
ponents of intelligence: the ability to learn, plan, understand images, and so
on. In contrast the agent field is concerned with entities that integrate these
components, in order to provide a machine that is capable of making inde-
pendent decisions, it may naively appear that in order to build an agent,
we need to solve all the problems of AI itself: in order to build an agent,
we need to solve the planning problem, the learning problem, and so on
10 Introduction
(because our agent will surely need to learn, plan, and so on). This is not the
ease. As OreriElzioni succinctly put it: 'Intelligent agents are ninety-nine pei-
cent computer science and one percent AT (Etzioni, 1996). When we build
an agent to carry out a task in some environment, we will very likely draw
upon AI techniques of some sort - but most of what we do will be standard
computer science and software engineering. For the vast majority of appli-
cations, it is not necessary that an agent has all the capabilities studied in
AI - for some applications, capabilities such as learning may even be unde-
sirable. In short, while we may draw upon AI techniques to build agents, we
do not need to solve all the problems of AI to build an agent.
Secondly, classical AI has largely ignored the social aspects of agency. I hope
you will agree that part of what makes us unique as a species on Earth is not
simply our undoubted ability to learn and solve problems, but our ability to
communicate, cooperate, and reach agreements with our peers. These kinds
of social ability - which we use every day of our lives - are surely just as
important to intelligent behaviour as are components of intelligence such
as planning and learning, and yet they were not studied in AI until about
1980.
Is it not all just economics/game theory?
Game theory is a mathematical theory that studies interactions among self-
interested agents (Binmore, 1992). It is interesting to note that von Neumann,
one of the founders of computer science, was also one of the founders of game
theory (Neumann and Morgenstern, 1944); Alan Turing, arguably the other great
figure in the foundations of computing, was also interested in the formal study
of games, and it may be that it was this interest that ultimately led him to write
his classic paper Computing Machinery and Intelligence, which may be seen as the
foundation of AI as a discipline (Turing, 1963). However, since these beginnings,
game theory and computer science went their separate ways for some time. Game
theory was largely - though by no means solely - the preserve of ecoiiuiiiists, who
were interested in using it to study and understand interactions among economic
entities in the real world.
Recently, the tools and techniques of game theory have found many applica-
tions in computational multiagent systems research, particularly when applied
to problems such as negotiation (see Rosenschein and Zlotkin (1994), Sandholm
(1999) and Chapters 6 and 7). Indeed, at the time of writing, game theory seems
to be the predominant theoretical tool in use for the analysis of multiagent sys-
tems. An obvious question is therefore whether multiagent systems are properly
viewed as a subfield of economics/game theory. There are two points here.
First, many of the solution concepts developed in game theory (such as Nash
equilibrium, discussed in Chapter 6), were developed without a view to com-
putation. They tend to be descriptive concepts, telling us the properties of
Objections to Multiagent Systems 11
an appropriate, optimal solution without telling us how to compute a solu-
tion. Moreover, it turns out that the problem of computing a solution is
often computationally very hard (e.g. NP-complete or worse). Multiagent sys-
tems research highlights these problems, and allows us to bring the tools
oi computer science (.e.g. computational compiexiiy tneory (uarey anu jonn-
son, 1979; Papadimitriou, 1994)) to bear on them.
Secondly, some researchers question the assumptions that game theory
makes in order to reach its conclusions. In particular, debate has arisen in
the multiagent systems community with respect to whether or not the notion
of a rational agent, as modelled in game theory, is valid and/or useful for
understanding human or artificial agent societies.
(Please note that all this should not be construed as a criticism of game theory,
which is without doubt a valuable and important tool in multiagent systems, likely
to become much more widespread in use over the coming years.)
Is it not all just social science?
The social sciences are primarily concerned with understanding the behaviour of
human societies. Some social scientists are interested in (computational) multi-
agent systems because they provide an experimental tool with which to model
human societies. In addition, an obvious approach to the design of multiagent
systems - which are artificial societies - is to look at how a particular function
works in human societies, and try to build the multiagent system in the same way.
(An analogy may be drawn here with the methodology of AI, where it is quite com-
mon to study how humans achieve a particular kind of intelligent capability, and
then to attempt to model this in a computer program.) Is the multiagent systems
field therefore simply a subset of the social sciences?
Although we can usefully draw insights and analogies from human societies, it
does not follow that we can build artificial societies in exactly the same way. It
is notoriously hard to precisely model the behaviour of human societies, simply
because they are dependent on so many different parameters. Moreover, although
it is perfectly legitimate to design a multiagent system by drawing upon and mak-
ing use of analogies and metaphors from human societies, it does not follow that
this is going to be the best way to design a multiagent system: there are other
tools that we can use equally well (such as game theory - see above).
It seems to me that multiagent systems and the social sciences have a lot to say
to each other. Multiagent systems provide a powerful and novel tool for modelling
and understanding societies, while the social sciences represent a rich repository
of concepts for understanding and building multiagent systems - but they are
quite distinct disciplines.
12 Introduction
Notes and Further Reading
There are now many introductions to intelligent agents and multiagent systems.
Ferber (1999) is an undergraduate textbook, although it was written in the early
1990s, and so (for example) does not mention any issues associated with the
Web. A first-rate collection of articles introducing agent and multiagent systems
is Weili (1999). Many of these articles address issues in much more depth than is
possible in this book. I would certainly recommend this volume for anyone with
a serious interest in agents, and it would make an excellent companion to the
present volume for more detailed reading.
Three collections of research articles provide a comprehensive introduction
to the field of autonomous rational agents and multiagent systems: Bond and
Gasser's 1988 collection, Readings in Distributed Artificial Intelligence, introduces
almost all the basic problems in the multiagent systems field, and although some
of the papers it contains are now rather dated, it remains essential reading (Bond
and Gasser, 1988); Huhns and Singh's more recent collection sets itself the ambi-
tious goal of providing a survey of the whole of the agent field, and succeeds
in this respect very well (Huhns and Singh, 1998). Finally, Bradshaw (1997) is a
collection of papers on software agents.
For a general introduction to the theory and practice of intelligent agents, see
Wooldridge and Jennings (1995), which focuses primarily on the theory of agents,
but also contains an extensive review of agent architectures and programming
languages. A short but thorough roadmap of agent technology was published as
Jennings et ai (1998).
Class reading: introduction to Bond and Gasser (1988). This article is probably
the best survey of the problems and issues associated with multiagent systems
research yet published. Most of the issues it addresses are fundamentally still
open, and it therefore makes a useful preliminary to the current volume. It may
be worth revisiting when the course is complete.
Objections to Multiaqent Systems 13
Exercises
(1) [Class discussion.]
Moore's law - a well-known dictum in computing - tells us that the number of tran-
sistors that it is possible to place on an integrated circuit doubles every 18 months. This
suggests that world's net processing capability is currently growing at an exponential rate.
Within a few decades, it seems likely that computers will outnumber humans by several
orders of magnitude - for every person on the planet there will be tens, hundreds, perhaps
thousands or millions of processors, linked together by some far distant descendant of
today's Internet. (This is nol fancif ul thinking: Just exti'dpoldte fruiii the record of the past
five decades.)
In light of this, discuss the following.
What such systems might offer - what possibilities are there?
What are the challenges to make this vision happen?
The aim of this chapter is to give you an understanding of what agents are, and
some of the issues associated with building them. In later chapters, we will see
specific approaches to building agents.
An obvious way to open this chapter would be by presenting a definition of the
term agent. After all, this is a book about multiagent systems - surely we must all
agree on what an agent is? Sadly, there is no universally accepted definition of the
term agent, and indeed there is much ongoing debate and controversy on this very
subject. Essentially, while there is a general consensus that autonomy is central
to the notion of agency, there is little agreement beyond this. Part of the difficulty
is that various attributes associated with agency are of differing importance for
different domains. Thus, for some applications, the ability of agents to learn from
their experiences is of paramount importance; for other applications, learning is
not only unimportant, it is undesirable
l
.
Nevertheless, some sort of definition is important - otherwise, there is a danger
that the term will lose all meaning. The definition presented here is adapted from
Wooldridge and Jennings (1995).
An agent is a computer system that is situated in some environment,
and that is capable of autonomous action in this environment in order
to meet its design objectives.
Michael Georgeff, the main architect of the PRS agent system discussed in later chapters, gives
the example of an air-traffic control system he developed; the clients of the system would have been
horrified at the prospect of such a system modifying its behaviour at run time...
16 Intelligent Agents
Figure 2.1 An agent in its environment. The agent takes sensory input from the environ-
ment, and produces as output actions that affect it. The interaction is usually an ongoing,
non-terminating one.
Figure 2.1 gives an abstract view of an agent. In this diagram, we can see the
action output generated by the agent in order to affect its environment. In most
domains of reasonable complexity, an agent will not have complete control over
its environment. It will have at best partial control, in that it can influence it. From
the point of view of the agent, this means that the same action performed twice in
apparently identical circumstances might appear to have entirely different effects,
and in particular, it may fail to have the desired effect. Thus agents in all but the
most trivial of environments must be prepared for the possibility of failure. We
can sum this situation up formally by saying that environments are in general
assumed to be non-deterministic.
Normally, an agent will have a repertoire of actions available to it. This set of
possible actions represents the agents effectoric capability: its ability to modify
its environments. Note that not all actions can be performed in all situations. For
example, an action 'lift lable
1
is only applicable in situations where the weighl
of the table is sufficiently small that the agent can lift it. Similarly, the action
'purchase a Ferrari' will fail if insufficient funds are available to do so. Actions
therefore have preconditions associated with them, which define the possible sit-
uations in which they can be applied.
The key problem facing an agent is that of deciding which of its actions it
should perform in order to best satisfy its design objectives. Agent architectures,
of which we shall see many examples later in this book, are really software
architectures for decision-making systems that are embedded in an environment.
At this point, it is worth pausing to consider some examples of agents (though
not, as yet, intelligent agents).
Control systems
First, any control system can be viewed as an agent. A simple (and overused)
example of such a system is a thermostat. Thermostats have a sensor for detect-
Environments
17
ing room temperature. This sensor is directly embedded within the environment
(i.e. the room), and it produces as output one of two signals: one that indicates
that the temperature is too low, another which indicates that the temperature is
OK. The actions available to the thermostat are 'heating on' or 'heating off'. The
action 'heating on' will generally have the effect of raising the room temperature,
but this cannot be a guaranteed effect - if the door to the room is open, for exam-
ple, switching on the heater may have no effect. The (extremely simple) decision-
making component of the thermostat implements (usually in electro-mechanical
hardware) the following rules:
too cold heating on,
temperature OK heating off.
More complex environment control systems, of course, have considerably richer
decision structures. Examples include autonomous space probes, fly-by-wire air-
craft, nuclear reactor control systems, and so on.
Software demons
Second, most software demons (such as background processes in the Unix operat-
ing system), which monitor a software environment and perform actions to modify
it, can be viewed as agents. An example is the X Windows program xbi f f. This
utility continually monitors a user's incoming email, and indicates via a GUI icon
whether or not they have unread messages. Whereas our thermostat agent in the
previous example inhabited a physical environment - the physical world - the
xbi ff program inhabits a software environment. It obtains information about n tt program inhabits a software
this environment by carrying out software functions (by executing system pro-
grams such as 1 s, for example), and the actions it performs are software actions
(changing an icon on the screen, or executing a program). The decision-making
component is just as simple as our thermostat example.
To summarize, agents are simply computer systems that are capable of
autonomous action in some environment in order to meet their design objectives.
An agent will typically sense its environment (by physical sensors in the case of
agents situated in part of the real world, or by software sensors in the case of soft-
ware agents), and will have available a repertoire of actions that can be executed
to modify the environment, which may appear to respond non-deterministically
to the execution of these actions.
2A Environments
Russell and Norvig suggest the following classification of environment properties
(Russell and Norvig, 1995, p. 46)!
18 Intelligent Agents
Accessible versus inaccessible. An accessible environment is one in which the
agent can obtain complete, accurate, up-to-date information about the environ-
ment's state. Most real-world environments (including, for example, the every-
day physical world and the Internet) are not accessible in this sense.
Deterministic versus non-deterministic. A deterministic environment is one in
which any action has a single guaranteed effect - there is no uncertainty about
the state that will result from performing an action.
Static versus dynamic. A static environment is one that can be assumed to
remain unchanged except by the performance of actions by the agent. In con-
trast, a dynamic environment is one that has other processes operating on it,
and which hence changes in ways beyond the agent's control. The physical world
is a highly dynamic environment, as is the Internet.
Discrete versus continuous. An environment is discrete if there are a fixed, finite
number of actions and percepts in it.
We begin our discussion with accessibility. First, note that in extreme cases, the
laws of physics prevent many environments from being completely accessible.
For example, it may be that as I write, the surface temperature at the North Pole
of Mars is -100 C, but the laws of physics will prevent me from knowing this
fact for some time. This information is thus inaccessible to me. More mundanely,
in almost any realistic environment uncertainty is inherently present.
The more accessible an environment is, the simpler it is to build agents that
operate effectively within it. The reason for this should be self-evident. Ultimately,
a 'good' agent is one that makes the 'right' decisions. The quality of decisions
that an agent can make is clearly dependent on the quality of the information
available to it. If little, or inaccurate information is available, then the agent's
decision is uninformed, and is hence likely to be poor. As more complete an<1
accurate information becomes available, the potential to make a good decision
increases.
The next source of complexity we consider is determinism. An environment is
deterministic if the outcome of any action performed is uniquely defined, and
non-deterministic otherwise. Non-determinism can seem an unusual property to
attribute to environments. For example, we usually imagine that software envi-
ronments, governed as they are by precise rules, are paradigms of determinism.
Non-determinism captures several important aspects of such environments as
follows.
Non-determinism captures the fact that agents have a limited 'sphere of
influence' - they have at best partial control over their environment.
Similarly, actions are typically performed by agents in order to bring about
some desired state of affairs. Non-determinism captures the fact that actions
can fail to have the desired result.
Environments
19
Clearly, deterministic environments are preferable from the point of view of the
agent designer to non-deterministic environments. If there is never any uncer-
tainty about the outcome of some particular action, then an agent need never
stop to determine whether or not a particular action had a particular outcome,
and thus whether or not it needs to reconsider its course of action. In particular,
in a deterministic environment, an agent designer can assume that the actions
performed by an agent will always succeed: they will never fail to bring about
their intended effect.
Unfortunately, as Russell and Norvig (1995) point out, if an environment is
sufficiently complex, then the fact that it is actually deterministic is not much
help. To all intents and purposes, it may as well be non-deterministic. In practice,
almost all realistic environments must be regarded as non-deterministic from an
agent's perspective.
Non-determinism is closely related to dynamism. Early artificial intelligence
research on action selection focused on planning algorithms - algorithms that,
given a description of the initial state of the environment, the actions available to
an agent and their effects, and a goal state, will generate a plan {i.e. a sequence
of actions) such that when executed from the initial environment state, the plan
will guarantee the achievement of the goal (Allen et al, 1990). However, such
planning algorithms implicitly assumed that the environment in which the plan
was being executed was static - that it did not change except through the perfor-
mance of actions by the agent. Clearly, many environments (including software
environments such as computer operating systems, as well as physical environ-
ments such as the real world), do not enjoy this property - they are dynamic, with
many processes operating concurrently to modify the environment in ways that
an agent has no control over.
From an agent's point of view, dynamic environments have at least two impor-
tant properties. The first is that if an agent performs no external action between
times to and t\, then it cannot assume that the environment at t\ will be the same
as it was at time to- This means that in order for the agent to select an appropriate
action to perform, it must perform information gathering actions to determine the
stale uf the environment (Moore, 1990). In a static environment, there is no need
for such actions. The second property is that other processes in the environment
can 'interfere' with the actions it attempts to perform. The idea Is essentially the
concept of interference in concurrent systems theory (Ben-Ari, 1990). Thus if an
agent checks that the environment has some property <p and then starts execut-
ing some action a on the basis of this information, it cannot in general guarantee
that the environment will continue to have property qp while it is executing a.
lese properties suggest that static environments will be inherently simpler to
design agents for than dynamic ones. First, in a static environment, an agent need
only ever perform information gathering actions once. Assuming the information
it gathers correctly describes the environment, and that it correctly understands
the effects of its actions, then it can accurately predict the effects of its actions
20 Intelligent Agents
on the environment, and hence how the state of the environment will evolve.
(This is in fact how most artificial intelligence planning algorithms work (Lif schitz,
1986).) Second, in a static environment, an agent never needs to worry about
synchronizing or coordinating its actions with those of other processes in the
environment (Bond and Gasser, 1988).
The final distinction made in Russell and Norvig (1995) is between discrete and
continuous environments. A discrete environment is one that can be guaranteed
to only ever be in a finite number of discrete states; a continuous one may be
in uncountably many states. Thus the game of chess is a discrete environment -
there are only a finite (albeit very large) number of states of a chess game. Russell
and Norvig (1995) give taxi driving as an example of a continuous environment.
Discrete environments are simpler to design agents for than continuous ones,
for several reasons. Most obviously, digital computers are themselves discrete-
state systems, and although they can simulate continuous systems to any desired
degree of accuracy, there is inevitably a mismatch between the two types of sys-
tems. Some information must be lost in the mapping from continuous environ-
ment to discrete representation of that environment. Thus the information a
discrete-state agent uses in order to select an action in a continuous environ-
ment will be made on the basis of information that is inherently approximate.
Finally, with finite discrete state environments, it is in principle possible to enu-
merate all possible states of the environment and the optimal action to perform
in each of these states. Such a lookup table approach to agent design is rarely
possible in practice, but it is at least in principle possible for finite, discrete state
environments.
In summary, the most complex general class of environments are those that
are inaccessible, non-deterministic, dynamic, and continuous. Environments that
have these properties are often referred to as open (Hewitt, 1986).
Environmental properties have a role in determining the complexity of the agent
design process, but they are by no means the only factors that play a part. The sec-
ond important property that plays a part is the nature of the interaction between
agent and environment.
Originally, software engineering concerned itself with what are known as 'func-
tional' systems. A functional system is one that simply takes some input, performs
some computation over this input, and eventually produces some output. Such
systems may formally be viewed as functions / : / 0 from a set I of inputs
to a set O of outputs. The classic example of such a system is a compiler, which
can be viewed as a mapping from a set / of legal source programs to a set O of
corresponding object or machine code programs.
One of the key attributes of such functional systems is that they terminate.
This means that, formally, their properties can be understood in terms of pre-
conditions and postconditions (Hoare, 1969). The idea is that a precondition qp
represents what must be true of the program's environment in order for that pro-
gram to operate correctly. A postcondition (p represents what will be true of the
Environments 21
program's environment after the program terminates, assuming that the precon-
dition was satisfied when execution of the program commenced. A program is
said to be completely correct with respect to precondition q? and postcondition
(/> if it is guaranteed to terminate when it is executed from a state where the pre-
condition is satisfied, and, upon termination, its postcondition is guaranteed to
be satisfied. Crucially, it is assumed that the agent's environment, as character-
ized by its precondition cp, is only modified through the actions of the program
itself. As we noted above, this assumption does not hold for many environments.
Although the internal complexity of a functional system may be great (e.g. in the
case of a compiler for a complex programming language such as Ada), functional
programs are, in general, comparatively simple to correctly and efficiently engi-
neer. For example, functional systems lend themselves to design methods based
on 'divide and conquer'. Top-down stepwise refinement (Jones, 1990) is an exam-
ple of such a method. Semi-automatic refinement techniques are also available,
which allow a designer to refine a high-level (formal) specification of a functional
system down to an implementation (Morgan, 1994).
Unfortunately, many computer systems that we desire to build are not func-
tional in this sense. Rather than simply computing a function of some input and
then terminating, many computer systems are reactive, in the following sense:
Reactive systems are systems that cannot adequately be described
by the relational or functional view. The relational view regards pro-
grams as functions.. .from an initial state to a terminal state. Typically,
the main role of reactive systems is to maintain an interaction with
their environment, and therefore must be described (and specified) in
terms of their on-going behaviour.. .[EJvery concurrent system.. .must
be studied by behavioural means. This is because each individual mod-
ule in a concurrent system is a reactive subsystem, interacting with its
own environment which consists of the other modules.
(Pnueli, 1986)
There are at least three current usages of the term reactive system in computer
science. The first, oldest, usage is that by Pnueli and followers (see, for example,
Pnueli (1986), and the description above). Second, researchers in AI planning take
a reactive system to be one that is capable of responding rapidly to changes in its
environment - here the word 'reactive' is taken to be synonymous with 'respon-
sive' (see, for example, Kaelbling, 1986). More recently, the term has been used to
denote systems which respond directly to the world, rather than reason explicitly
about it (see, for example, Connah and Wavish, 1990).
Reactive systems are harder to engineer than functional ones. Perhaps the
most important reason for this is that an agent engaging in a (conceptually)
non-terminating relationship with its environment must continually make local
decisions that have global consequences. Consider a simple printer controller
agent. The agent continually receives requests to have access to the printer, and
22 Intelligent Agents
is allowed to grant access to any agent that requests it, with the proviso that it
is only allowed to grant access to one agent at a time. At some time, the agent
reasons that it will give control of the printer to process p\, rather than pi, but
that it will grant p? access at some later time point. This seems like a reasonable
decision, when considered in isolation. But if the agent always reasons like this,
it will never grant p2 access. This issue is known as fairness (Francez, 1986). In
other words, a decision that seems entirely reasonable in a local context can have
undesirable effects when considered in the context of the system's entire history.
This is a simple example of a complex problem. In general, the decisions made
by an agent have long-term effects, and it is often difficult to unders tand such
long-term effects.
One possible solution is to have the agent explicitly reason about and predict
the behaviour of the system, and thus any temporally distant effects, at run-time.
But it turns out that such prediction is extremely hard.
Russell and Subramanian (1995) discuss the essentially identical concept of
episodic environments. In an episodic environment, the performance of an agent
is dependent on a number of discrete episodes, with no link between the perfor-
mance of the agent in different episodes. An example of an episodic environment
would be a mail sorting system (Russell and Subramanian, 1995). As with reactive
systems, episodic interactions are simpler from the agent developer's perspective
because the agent can decide what action to perform based only on the current
episode - it does not need to reason about the interactions between this and future
episodes.
Another aspect of the interaction between agent and environment is the con-
cept of real time. Put at its most abstract, a real-time interaction is simply one
in which time plays a part in the evaluation of an agent's performance (Russell
and Subramanian, 1995, p. 585). It is possible to identify several different types
of real-time interactions:
those in which a decision must be made about what action to perform within
some specified time bound;
those in which the agent must bring about some state of affairs as quickly
as possible;
those in which an agent is required to repeat some task, with the objective
being to repeat the task as often as possible.
If time is not an issue, then an agent can deliberate for as long as required in order
to select the 'best' course of action in any given scenario. Selecting the hest course
of action implies search over the space of all possible courses of action, in order
to find the 'best'. Selecting the best action in this way will take time exponential in
the number of actions available to the agent
2
. It goes without saying that for any
2
If rhc agent has n actions available to it, then it has n! courses of action available to it (assuming
no duplicate actions).
Intelligent Agents 23
realistic environment, such deliberation is not viable. Thus any realistic system
must be regarded as real-time in some sense.
Some environments are real-time in a much stronger sense than this. For exam-
ple, the PRS, one of the best-known agent systems, had fault diagnosis on NASA's
Space Shuttle as its initial application domain (Georgeff and Lansky, 1987). In
order to be of any use, decisions in such a system must be made in milliseconds.
rents
We are not used to thinking of thermostats or Unix demons as agents, and cer-
lainly not as intelligent agents. So, when do we consider an agent to be intelligent?
The question, like the question 'what is intelligence?' itself, is not an easy one to
answer. One way of answering the question is to list the kinds of capabilities that
we might expect an intelligent agent to have. The following list was suggested in
Wooldridge and Jennings (1995).
Reactivity. Intelligent agents are able to perceive their environment, and respond
in a timely fashion to changes that occur in it in order to satisfy their design
objectives.
Proactiveness. Intelligent agents are able to exhibit goal-directed behaviour by
taking the initiative in order to satisfy their design objectives.
Social ability. Intelligent agents are capable of interacting with other agents (and
possibly humans) in order to satisfy their design objectives.
These properties arc more demanding than they might at first appear. To sec
why, let us consider them in turn. First, consider proactiveness: goal-directed
behaviour. It is not hard to build a system that exhibits goal-directed behaviour -
we do it every time we write a procedure in Pascal, a function in C, or a method in
Java. When we write such a procedure, we describe it in terms of the assumptions
on which it relies (formally, its precondition) and the effect it has if the assump-
tions are valid (its postcondition). The effects of the procedure are its goal: what
the author of the software intends the procedure to achieve. If the precondition
holds when the procedure is invoked, then we expect that the procedure will exe-
cute correctly: that it will terminate, and that upon termination, the postcondition
will be true, i.e. the goal will be achieved. This is goal-directed behaviour: the pro-
cedure is simply a plan or recipe for achieving the goal. This programming model
is fine for many environments. For example, it works well when we consider func-
tional systems, as discussed above.
But for non-functional systems, this simple model of goal-directed program-
ming is not acceptable, as it makes some important limiting assumptions. In par-
ticular, it assumes that the environment does not change while the procedure is
executing. If the environment does change, and, in particular, if the assumptions
24 Intelligent Agents
(precondition) underlying the procedure become false while the procedure is exe-
cuting, then the behaviour of the procedure may not be defined - often, it will
simply crash. Also, it is assumed that the goal, that is, the reason for executing
the procedure, remains valid at least until the procedure terminates. If the goal
does not remain valid, then there is simply no reason to continue executing the
procedure.
In many environments, neither of these assumptions are valid. In particular,
in domains that are too complex for an agent to observe completely, that are
multiagent (i.e. they are populated with more than one agent that can change the
environment), or where there is uncertainty in the environment, these assump-
tions are not reasonable. In such environments, blindly executing a procedure
without regard to whether the assumptions underpinning the procedure are valid
is a poor strategy. In such dynamic environments, an agent must be reactive, in
just the way that we described above. That is, it must be responsive to events that
occur in its environment, where these events affect either the agent's goals or the
assumptions which underpin the procedures that the agent is executing in order
to achieve its goals.
As we have seen, building purely goal-directed systems is not hard. As we shall
see later, building purely reactive systems - ones that continually respond to their
environment - is also not difficult. However, what turns out to be hard is building
a system that achieves an effective balance between goal-directed and reactive
behaviour. We want agents that will attempt to achieve their goals systematically,
perhaps by making use of complex procedure-like patterns of action. But we do
not want our agents to continue blindly executing these procedures in an attempt
to achieve a goal either when it is clear that the procedure will not work, or when
the goal is for some reason no longer valid. In such circumstances, we want our
agent to be able to react to the new situation, in time for the reaction to be of
some use. However, we do not want our agent to be continually reacting, and
hence never focusing on a goal long enough to actually achieve it.
On reflection, it should come as little surprise that achieving a good balance
between goal-directed and reactive behaviour is hard. After all, it is comparatively
rare to find humans that do this very well. This problem - of effectively integrating
goal-directed and reactive behaviour - is one of the key problems facing the agent
designer. As we shall see, a great many proposals have been made for how to
build agents that can do this - but the problem is essentially still open.
Finally, let us say something about social ability, the final component of flexible
autonomous action as defined here. In one sense, social ability is trivial: every
day, millions of computers across the world routinely exchange information with
both humans and other computers. But the ability to exchange bit streams is
no I really social ability. Consider that in the human world, comparatively few of
our meaningful goals can be achieved without the cooperation of other people,
who cannot be assumed to share our goals - in other words, they are themselves
autonomous, with their own agenda to pursue. To achieve our goals in such sit-
Agents and Objects
uations, we must negotiate and cooperate with others. We may be required to
understand and reason about the goals of others, and to perform actions (such
as paying them money) that we would not otherwise choose to perform, in order
to get them to cooperate with us, and achieve our goals. This type of social ability
is much more complex, and much less well understood, than simply the ability to
exchange binary information. Social ability in general (and topics such as nego-
tiation and cooperation in particular) are dealt with elsewhere in this book, and
will not therefore be considered here. In this chapter, we will be concerned with
the decision making of individual intelligent agents in environments which may
be dynamic, unpredictable, and uncertain, but do not contain other agents.
2.3 Agents and Objects
Programmers familiar with object-oriented languages such as Java, C++, or
Smalltalk sometimes fail to see anything novel in the idea of agents. When one
stops to consider the relative properties of agents and objects, this is perhaps not
surprising.
There is a tendency.. .to think of objects as 'actors' and endow them
with human-like intentions and abilities. It's tempting to think about
objects 'deciding' what to do about a situation, [and] 'asking' other
objects for information.... Objects are not passive containers for state
and behaviour, but are said to be the agents of a program's activity.
(NeXT Computer Inc., 1993, p. 7)
Objects are defined as computational entities that encapsulate some state, are
able to perform actions, or methods on this state, and communicate by message
passing. While there are obvious similarities, there are also significant differences
between agents and objects. The first is in the degree to which agents and objects
tonomous. Recall that the defining characteristic of object-oriented pro-
gramming is the principle of encapsulation - the idea that objects can have con-
trol over their own internal state. In programming languages like Java, we can
declare instance variables (and methods) to be private , meaning they are only
accessible from within the object. (We can of course also declare them publ i c,
meaning that they can be accessed from anywhere, and indeed we must do this
for methods so that they can be used by other objects. But the use of publ i c
instance variables is usually considered poor programming style.) In this way, an
object can be thought of as exhibiting autonomy over its state: it has control over
it. But an object does not exhibit control over its behaviour. That is, if a method m
is made available for other objects to invoke, then they can do so whenever they
wish - once an object has made a method publ ic, then it subsequently has no
control over whether or not that method is executed. Of course, an object vnust
make methods available to other objects, or else we would be unable to build a
26 Intelligent Agents
system out of them. This is not normally an issue, because if we build a system,
then we design the objects that go in it, and they can thus be assumed to share a
'common goal'. But in many types of multiagent system (in particular, those that
contain agents built by different organizations or individuals), no such common
goal can be assumed. It cannot be taken for granted that an agent i will execute
an action (method) a just because another agent j wants it to - a may not be in
the best interests of i. We thus do not think of agents as invoking methods upon
one another, but rather as requesting actions to be performed. If j requests i to
perform a, then i may perform the action or it may not. The locus of control with
respect to the decision about whether to execute an action is thus different in
agent and object systems. In the object-oriented case, the decision lies with the
object that invokes the method. In the agent case, the decision lies with the agent
that receives the request. This distinction between objects and agents has been
nicely summarized in the following slogan.
Objects do it for free; agents do it because they want to.
Of course, there is nothing to stop us implementing agents using object-oriented
techniques. For example, we can build some kind of decision making about
whether to execute a method into the method itself, and in this way achieve a
stronger kind of autonomy for our objects. The point is that autonomy of this
kind is not a component of the basic object-oriented model.
The second important distinction between object and agent systems is with
respect to the notion of flexible (reactive, proactive, social) autonomous be-
haviour. The standard object model has nothing whatsoever to say about how to
build systems that integrate these types of behaviour. Again, one could object that
we can build object-oriented programs that do integrate these types of behaviour.
But this argument misses the point, which is that the standard object-oriented
programming model has nothing to do with these types of behaviour.
The third important distinction between the standard object model and our
view of agent systems is that agents are each considered to have their own thread
of control - in the standard object model, there is a single thread of control in
the system. Of course, a lot of work has recently been devoted to concurrency in
object-oriented programming. For example, the Java language provides built-in
constructs for multi-threaded programming. There are also many programming
languages available (most of them admittedly prototypes) that were specifically
designed to allow concurrent object-based programming. But such languages do
not capture the idea of agents as autonomous entities. Perhaps the closest that
the object-oriented community comes is in the idea of active objects.
An active object is one that encompasses its own thread of control
Active objects are generally autonomous, meaning that they can exhibit
some behaviour without being operated upon by another object. Pas-
obiects. on the other hand, can only undergo a state change when
explicitly acted upon.
Agen ts and Expert Systems 2 7
Jooch, 1994, p. 91)
Thus active objects arc essentially agents that do not necessarily have the ability
to exhibit flexible autonomous behaviour.
To summarize, the traditional view of an object and our view of an agent have
at least three distinctions:
agents embody a stronger notion of autonomy than objects, and, in partic-
ular, they decide for themselves whether or not to perform an action on
request from another agent;
agents are capable of flexible (reactive, proactive, social) behaviour, and the
standard object model has nothing to say about such types of behaviour;
and
a multiagent system is inherently multi-threaded, in that each agent is
assumed to have at least one thread of control.
2.4 Agents and Expert Systems
Expert systems were the most important AI technology of the 1980s (Hayes-Roth
etal, 1983). An expert system is one that is capable of solving problems or giving
advice in some knowledge-rich domain (Jackson, 1986). A classic example of an
expert system is MYCIN, which was intended to assist physicians in the treatment
of blood infections in humans. MYCIN worked by a process of interacting with a
user in order to present the system with a number of (symbolically represented)
facts, which the system then used to derive some conclusion. MYCIN acted very
much as a consultant: it did not operate directly on humans, or indeed any other
environment. Thus perhaps the most important distinction between agents and
expert systems is that expert systems like MYCIN are inherently disembodied. By
this, I mean that they do not interact directly with any environment: they get their
information not via sensors, but through a user acting as middle man. In the same
way, they do not act on any environment, but rather give feedback or advice to a
third party. In addition, expert systems are not generally capable of cooperating
with other agents.
In summary, the main differences between agents and expert systems are as
follows:
'classic' expert systems are disembodied - they are not coupled to any envi-
ronment in which they act, but rather act through a user as a 'middleman';
expert systems are not generally capable of reactive, proactive behaviour;
and
expert systems are not generally equipped with social ability, in the sense
of cooperation, coordination, and negotiation.
38 Intelligent Agents
Despite these differences, some expert systems (particularly those that perform
real-time control tasks) look very much like agents. A good example is the
ARCHON system, discussed in Chapter 9 (Jennings et ah, 1996a).
2.5 Agents as Intentional Systems
One common approach adopted when discussing agent systems is the intentional
stance. With this approach, we 'endow' agents with mental states: beliefs, desires,
wishes, hope, and so on. The rationale for this approach is as follows. When
explaining human activity, it is often useful to make statements such as the fol-
lowing.
Janine took her umbrella because she believed it was going to rain.
Michael worked hard because he wanted to finish his book.
These statements make use of a folk psychology, by which human behaviour is
predicted and explained through the attribution of attitudes, such as believing and
wanting (as in the above examples), hoping, fearing, and so on (see, for example,
Stich (1983, p. 1) for a discussion of folk psychology). This folk psychology is well
established: most people reading the above statements would say they found their
meaning entirely clear, and would not give them a second glance.
The attitudes employed in such folk psychological descriptions are called the
intentional notions
3
. The philosopher Daniel Dennett has coined the term inten-
tional system to describe entities 'whose behaviour can be predicted by the method
of attributing belief, desires and rational acumen' (Dennett, 1978, 1987, p. 49).
Dennett identifies different 'levels' of intentional system as follows.
A first-order intentional system has beliefs and desires (etc.) but no
beliefs and desires about beliefs and desires. ... A second-order inten-
tional system is more sophisticated; it has beliefs and desires (and no
doubt other intentional states) about beliefs and desires (and other
intentional states) - both those of others and its own.
(Dennett, 1987, p. 243)
One can carry on this hierarchy of intentionality as far as required.
Now we have been using phrases like belief, desire, intention to talk about
computer programs. An obvious question is whether it is legitimate or useful
to attribute beliefs, desires, and so on to artificial agents. Is this not just anthro-
pomorphism? McCarthy, among others, has argued that there are occasions when
the intentional stance is appropriate as follows.
'Unfortunately, the word 'intention' is used in several different ways in logic and the philosophy
of mind. First, there is the BDI-like usage, as in 'I intended to kill him'. Second, an intentional notion
is one of the attitudes, as above. Finally, in logic, the word intension (with an 's') means the internal
conrent of a concept, as opposed to its extension. In what follows, the intended meaning should
always be clear from context.
Agents as Intentional Systems 29
To ascribe beliefs, free will, intentions, consciousness, abilities, or wants
to a machine is legitimate when such an ascription expresses the
same information about the machine that it expresses about a per-
son. It is useful when the ascription helps us understand the struc-
ture of the machine, its past or future behaviour, or how to repair
or improve it. It is perhaps never logically required even for humans,
but expressing reasonably briefly what is actually known about the
state of the machine in a particular situation may require mental qual-
ities or qualities isomorphic to them. Theories of belief, knowledge
and wanting can be constructed for machines in a simpler setting than
for humans, and later applied to humans. Ascription of mental quali-
ties is most straightforward for machines of known structure such as
thermostats and computer operating systems, but is most useful when
applied to entities whose structure is incompletely known.
(McCarthy, 1978) (The underlining is from Shoham (1990).)
What objects can be described by the intentional stance? As it turns out, almost
any automaton can. For example, consider a light switch as follows.
It is perfectly coherent to treat a light switch as a (very cooperative)
agent with the capability of transmitting current at will, who invariably
transmits current when it believes that we want it transmitted and not
otherwise; flicking the switch is simply our way of communicating our
desires.
(Shoham, 1990, p. 6)
And yet most adults in the modern world would find such a description absurd -
perhaps even infantile. Why is this? The answer seems to be that while the inten-
tional stance description is perfectly consistent with the observed behaviour of a
light switch, and is internally consistent,
.. .it does not buy us anything, since we essentially understand the
mechanism sufficiently to have a simpler, mechanistic description of
its behaviour.
(Shoham, 1990, p. 6)
Put crudely, the more we know about a system, the less we need to rely on ani-
mistic, intentional explanations of its behaviour - Shoham observes that the move
from an intentional stance to a technical description of behaviour correlates well
with Piaget's model of child development, and with the scientific development
of humankind generally (Shoham, 1990). Children will use animistic explanations
of objects - such as light switches - until they grasp the more abstract techni-
cal concepts involved. Similarly, the evolution of science has been marked by a
gradual move from theological/animistic explanations to mathematical ones. My
30 Intelligent Agents
own experiences of teaching computer programming suggest that, when faced
with completely unknown phenomena, it is not only children who adopt animistic
explanations. It is often easier to teach some computer concepts by using expla-
nations such as 'the computer does not know...', than to try to teach abstract
principles first.
An obvious question is then, if we have alternative, perhaps less contentious
ways of explaining systems: why should we bother with the intentional stance?
Consider the alternatives available to us. One possibility is to characterize the
behaviour of a complex system by using the physical stance (Dennett, 1996, p. 36).
The idea of the physical stance is to start with the original configuration of a
system, and then use the laws of physics to predict how this system will behave.
When I predict that a stone released from my hand will fall to the
ground, I am using the physical stance. I don't attribute beliefs and
desires to the stone; I attribute mass, or weight, to the stone, and rely
on the law of gravity to yield my prediction.
(Dennett, 1996, p. 37)
Another alternative is the design stance. With the design stance, we use knowledge
of what purpose a system is supposed to fulfil in order to predict how it behaves.
Dennett gives the example of an alarm clock (see pp. 37-39 of Dennett, 1996).
When someone presents us with an alarm clock, we do not need to make use of
physical laws in order to understand its behaviour. We can simply make use of
the fact that all alarm clocks are designed to wake people up if we set them with
a time. No understanding of the clock's mechanism is required to justify such an
understanding - we know that all alarm clocks have this behaviour.
However, with very complex systems, even if a complete, accurate picture of the
system's architecture and working is available, a physical or design stance expla-
nation of its behaviour may not be practicable. Consider a computer. Although we
might have a complete technical description of a computer available, it is hardly
practicable to appeal to such a description when explaining why a menu appears
when we click a mouse on an icon. In such situations, it may be more appropriate
to adopt an intentional stance description, if that description is consistent, and
simpler than the alternatives.
Note that the intentional stance is, in computer science terms, nothing more
than an abstraction tool. It is a convenient shorthand for talking about complex
systems, which allows us to succinctly predict and explain their behaviour without
having to understand how they actually work. Now, much of computer science is
concerned with looking for good abstraction mechanisms, since these allow sys-
tem developers to manage complexity with greater ease. The history of program-
ming languages illustrates a steady move away from low-level machine-oriented
views of programming towards abstractions that are closer to human experience.
Procedural abstraction, abstract data types, and, most recently, objects are exam-
ples of this progression. So, why not use the intentional stance as an abstraction
Abstract Architectures for Intelligent Agents 31
tool in computing - to explain, understand, and, crucially, program complex com-
puter systems?
For many researchers this idea of programming computer systems in terms of
mentalistic notions such as belief, desire, and intention is a key component of
agent-based systems.
2.6 Abstract Architectures for Intelligent Agents
We can easily formalize the abstract view of agents presented so far. First, let us
assume that the environment may be in any of a finite set E of discrete, instanta-
neous states:
Notice that whether or not the environment'really is' discrete in this way is not too
important for our purposes: it is a (fairly standard) modelling assumption, which
we can justify by pointing out that any continuous environment can be modelled
by a discrete environment to any desired degree of accuracy.
Agents are assumed to have a repertoire of possible actions available to them,
which transform the state of the environment. Let
Ac = {a, of',...}
be the (finite) set of actions.
The basic model of agents interacting with their environments is as follows. The
ment starts in some state, and the agent begins by choosing an action to
perform on that state. As a result of this action, the environment can respond with
a number of possible states. However, only one state will actually result - though
of course, the agent does not know in advance which it will be. On the basis of
this second state, the agent again chooses an action to perform. The environment
responds with one of a set of possible states, the agent then chooses another
action, and so on.
A run, r, of an agent in an environment is thus a sequence of interleaved envi-
ronment states and actions:
r : e
0
Let
% be the set of all such possible finite sequences (over E and Ac);
' H
Ac
be the subset of these that end with an action; and
"R
E
be the subset of these that end with an environment state.
We will use r,r',... to stand for members of %.
In order to represent the effect that an agent's actions have on an environment,
we introduce a state transformer function (cf. Fagin etal., 1995, p. 154):
Ac
- P(E).
3 2 I n t e l l i g e n t Agents
Thus a state transformer function maps a run (assumed to end with the action of
an agent) lo a set of possible environment stales - those thai could result from
performing the action.
There are two important points to note about this definition. First, environ-
ments are assumed to be history dependent. In other words, the next state of
an environment is not solely determined by the action performed by the agent
and the current state of the environment. The actions made earlier by the agent
also play a part in determining the current state. Second, note that this definition
allows for non-determinism in the environment. There is thus uncertainty about
the result of performing an action in some state.
If T(r) = 0 (where r is assumed to end with an action), then there are no
possible successor states to r. In this case, we say that the system has ended its
run. We will also assume that all runs eventually terminate.
Formally, we say an environment Env is a Lriple Env = (E,eo, T), where is a
set of environment states, e
0
e E is an initial state, and T is a state transformer
function.
We now need to introduce a model of the agents that inhabit systems. We model
agents as functions which map runs (assumed to end with an environment state)
to actions (cf. Russell and Subramanian, 1995, pp. 580, 581):
Ag : H
E
- Ac.
Thus an agent makes a decision about what action to perform based on the history
of the system that it has witnessed to date.
Notice that while environments are implicitly non-deterministic, agents are
assumed to be deterministic. Let 3k.(g be the set of all agents.
We say a system is a pair containing an agent and an environment. Any system
will have associated with it a set of possible runs; we denote the set of runs of
agent Ag in environment Env by 1L{Ag,Env). For simplicity, we will assume that
'RiAg, Env) contains only terminated runs, i.e. runs r such that r has no possible
successor states: T(r) = 0. (We will thus not consider infinite runs for now.)
Formally, a sequence
represents a run of an agent Ag in environment Env = (E, e
0
, T) if
(1) in is the initial state of Env,
Abstract Architectures for Intelligent Agents 33
Two agents Ag\ and Agi are said to be behaviourally equivalent wilh respect
to environment Env if and only if H(Ag\,Env) = 3l(Ag2,Env), and simply
behaviourally equivalent if and only if they are behaviourally equivalent with
respect to all environments.
Notice that so far, I have said nothing at all about how agents are actually imple-
mented; we will return to this issue later.
Purely reactive agents
Certain types of agents decide what to do without reference to their history. They
base their decision making entirely on the present, with no reference at all to the
past. We will call such agents purely reactive, since they simply respond directly
to their environment. (Sometimes they are called tropistic agents (Genesereth and
Nilsson, 1987): tropism is the tendency of plants or animals to react to certain
stimulae.)
Formally, the behaviour of a purely reactive agent can be represented by a func-
tion
Ag : E Ac.
It should be easy to see that for every purely reactive agent, there is an equivalent
'standard' agent, as discussed above; the reverse, however, is not generally the
case.
Our thermostat agent is an example of a purely reactive agent. Assume, without
loss of generality, that the thermostat's environment can be in one of two states -
either too cold, or temperature OK. Then the thermostat is simply defined as
follows:
I heater off if e = temperature OK,
Ag{e) = i
I heater on otherwise.
Perception
Viewing agents at this abstract level makes for a pleasantly simple analysis. How-
ever, it does not help us to construct them. For this reason, we will now begin
to refine our abstract model of agents, by breaking it down into sub-systems in
exactly the way that one does in standard software engineering. As we refine our
view of agents, we find ourselves making design choices that mostly relate to the
subsystems that go to make up an agent - what data and control structures will be
present. An agent architecture is essentially a map of the internals of an agent - its
data structures, the operations that may be performed on these data structures,
and the control flow between these data structures. Later in this book, we will dis-
cuss a number of different types of agent architecture, with very different views
on the data structures and algorithms that will be present within an agent. In the
remainder of this section, however, we will survey some fairly high-level design
decisions. The first of these is the separation of an agent's decision function into
perception and action subsystems: see Figure 2.2.
I
34 Intelligent Agents
Figure 2.2 Perception and action subsystems.
The idea is that the function see captures the agent's ability to observe its envi-
ronment, whereas the action function represents the agent's decision-making
process. The see function might be implemented in hardware in the case of an
agent situated in the physical world: for example, it might be a video camera or
an infrared sensor on a mobile robot. For a software agent, the sensors might
be system commands that obtain information about the software environment,
such as Is , f iriyer, or suclilike. The output of the see function is a percept - a
perceptual input. Let Per be a (non-empty) set of percepts. Then see is a function
see :E Per
which maps environment states to percepts, and action is a function
action : Per* Ac
which maps sequences of percepts to actions. An agent Ag is now considered to
be a pair Ag = {see,action), consisting of a see function and an act ion function.
These simple definitions allow us to explore some interesting properties of
agents and perception. Suppose that we have two environment states, e\ e E and
e-i E, such that e\ * 62, but see{e\) = seeiez). Then two different environ-
ment states are mapped to the same percept, and hence the agent would receive
the same perceptual information from different environment states. As far as
the agent is concerned, therefore, e\ and e2 are indistinguishable. To make this
example concrete, let us return to the thermostat example. Let x represent the
statement
'the room temperature is OK'
and let y represent the statement
'John Major is Prime Minister'.
Abstract Architectures for Intelligent Agents 35
If these are the only two facts about our environment that we are concerned
with, then the set E of environment states contains exactly four elements:
Thus in state e\, the room temperature is not OK, and John Major is not Prime
Minister; in state e
2
, the room temperature is not OK, and John Major is Prime
Minister. Now, our thermostat is sensitive only to temperatures in the room. This
room temperature is not causally related to whether or not John Major is Prime
Minister. Thus the states where John Major is and is not Prime Minister are literally
indistinguishable to the thermostat. Formally, the see function for the thermostat
would have two percepts in its range, p\ and pi, indicating that the temperature
is too cold or OK, respectively. The see function for the thermostat would behave
as follows:
Given two environment states e e E and e' e E, let us write e ~ e' if
see(e) = see(e'). It is not hard to see that ' - ' is an equivalence relation over
environment states, which partitions E into mutually indistinguishable sets of
states. Intuitively, the coarser these equivalence classes are, the less effective is
the agent's perception. If | ~ | = |[ (i.e. the number of distinct percepts is equal to
the number of different environment states), then the agent can distinguish every
state - the agent has perfect perception in the environment; it is omniscient. At the
other extreme, if | ~| 1, then the agent's perceptual ability is non-existent - it
cannot distinguish between any different states. In this case, as far as the agent
is concerned, all environment states are identical.
Agents with state
We have so far modelled an agent's decision function as from sequences of envi-
ronment states or percepts to actions. This allows us to represent agents whose
decision making is influenced by history. However, this is a somewhat unintuitive
representation, and we shall now replace it by an equivalent, but somewhat more
natural, scheme. The idea is that we now consider agents that maintain state - see
Figure 2.3.
These agents have some internal data structure, which is typically used to
record information about the environment state and history. Let / be the set of all
internal states of the agent. An agent's decision-making process is then based, at
least in part, on this information. The perception function see for a state-based
agent is unchanged, mapping environment states to percepts as before:
36 Intelligent Agents
Figure 2.3 Agents that maintain state.
The action-selection function action is denned as a mapping
action : I Ac
from internal states to actions. An additional function next is introduced, which
maps an internal state and percept to an internal state:
next: I x Per I.
The behaviour of a state-based agent can be summarized in the following way. The
agent starts in some initial internal state io. It then observes its environment state
e, and generates a percept see(e). The internal state of the agent is then updated
via the next function, becoming set to next{io,see(e)). The action selected by
the agent is then action{next(io,see(e))). This action is then performed, and
the agent enters another cycle, perceiving the world via see, updating its state via
next, and choosing an action to perform via action.
It is worth observing that state-based agents as defined here are in fact no
more powerful than the standard agents we introduced earlier. In fact, they are
identical in their expressive power - every state-based agent can be transformed
into a standard agent that is behaviourally equivalent.
2.7 How to Tell an Agent What to Do
We do not (usually) build agents for no reason. We build them in order to carry
out tasks for us. In order to get the agent to do the task, we must somehow
communicate the desired task to the agent. This implies that the task to be carried
out must be specified by us in some way. An obvious question is how to specify
How to Tell an Agent What to Do 37
these tasks: how to tell the agent what to do. One way to specify the task would
be simply to write a program for the agent to execute. The obvious advantage of
this approach is that we are left in no uncertainty about what the agent will do; it
will do exactly what we told it to, and no more. But the very obvious disadvantage
is that we have to think about exactly how the task will be carried out ourselves -
if unforeseen circumstances arise, the agent executing the task will be unable
to respond accordingly. So, more usually, we want to tell our agent what to do
without telling it how to do it. One way of doing this is to define tasks indirectly,
via some kind of performance measure. There are several ways in which such a
performance measure can be defined. The first is to associate utilities with states
of the environment.
Utility functions
A utility is a numeric value representing how 'good' the state is: the higher the
utility, the better. The task of the agent is then to bring about states that maximize
utility - we do not specify to the agent how this is to be done. In this approach, a
task specification would simply be a function
u : E - R
which associates a real value with every environment state. Given such a perfor-
mance measure, we can then define the overall utility of an agent in some partic-
ular environment in several different ways. One (pessimistic) way is to define the
utility of the agent as the utility of the worst state that might be encountered by
the agent; another might be to define the overall utility as the average utility of all
states encountered. There is no right or wrong way: the measure depends upon
the kind of task you want your agent to carry out.
The main disadvantage of this approach is that it assigns utilities to local states;
it is difficult to specify a long-term view when assigning utilities to individual
states. To get around this problem, we can specify a task as a function which
assigns a utility not to individual states, but to runs themselves:
u : n - R.
If we are concerned with agents that must operate independentl y over long peri-
ods of time, then this approach appears more appropriate to our purposes. One
well-known example of the use of such a utility function is in the Tileworld
(Pollack, 1990). The Tileworld was proposed primarily as an experimental envi-
ronment for evaluating agent architectures. It is a simulated two-dimensional grid
environment on which there are agents, tiles, obstacles, and holes. An agent can
move in four directions, up, down, left, or right, and if it is located next to a tile, it
can push it. An obstacle is a group of immovable grid cells: agents are not allowed
to travel freely through obstacles. Holes have to be filled up with tiles by the agent.
An agent scores points by filling holes with tiles, with the aim being to fill as many
38 Intelligent Agents
Figure 2.4 Three scenarios in the Tileworld are (a) the agent detects a hole ahead, and
begins to push a tile towards it; (b) the hole disappears before the agent can get to it -
the agent should recognize this change in the environment, and modify its behaviour
appropriately; and (c) the agent was pushing a tile north, when a hole appeared to its
right; it would do better to push the tile to the right, than to continue to head north.
holes as possible. The Tileworld is an example of a dynamic environment: starting
in some randomly generated world state, based on parameters set by the experi-
menter, it changes over time in discrete steps, with the random appearance and
disappearance of holes. The experimenter can set a number of Tileworld parame-
ters, including the frequency of appearance and disappearance of tiles, obstacles,
and holes; and the choice between hard bounds (instantaneous) or soft bounds
(slow decrease in value) for the disappearance of holes. In the Tileworld, holes
appear randomly and exist for as long as their life expectancy, unless they dis-
appear because of the agent's actions. The interval between the appearance of
successive holes is called the hole gestation time. The performance of an agent in
the Tileworld is measured by running the Tileworld testbed for a predetermined
number of time steps, and measuring the number of holes that the agent succeeds
in filling. The performance of an agent on some particular run is then denned as
u(r) =
number of holes filled in r
number of holes that appeared in r
This gives a normalized performance measure in the range 0 (the agent did not
succeed in filling even one hole) to 1 (the agent succeeded in filling every hole that
appeared). Experimental error is eliminated by running the agent in the environ-
ment a number of times, and computing the average of the performance.
Despite its simplicity, the Tileworld allows us to examine several important
capabilities of agents. Perhaps the most important of these is the ability of an
agent to react to changes in the environment, and to exploit opportunities when
they arise. For example, suppose an agent is pushing a tile to a hole (Figure 2.4(a)),
when this hole disappears (Figure 2.4(b)). At this point, pursuing the original objec-
tive is pointless, and the agent would do best if it noticed this change, and as a
consequence 'rethought' its original objective. To illustrate what I mean by rec-
ognizing opportunities, suppose that in the same situation, a hole appears to the
How to Tell an Agent What to Do 39
right of the agent (Figure 2.4(c)). The agent is more likely to be able to fill this hole
than its originally planned one, for the simple reason that it only has to push the
tile one step, rather than four. All other things being equal, the chances of the
hole on the right still being there when the agent arrives are four times greater.
Assuming that the utility function u has some upper bound to the utilities it
assigns (i.e. that there exists a k e i such that for all r e H, we have u(r) ^ k),
then we can talk about optimal agents: the optimal agent is the one that maximizes
expected utility.
Let us write P(r | Ag,Env) to denote the probability that run r occurs when
agent Ag is placed in environment Env. Clearly,
Then the optimal agent Ag
O
pt in an environment Env is defined as the one that
maximizes expected utility:
This idea is essentially identical to the notion of maximizing expected utility in
decision theory (see Russell and Norvig, 1995, p. 472),
Notice that while (2.1) tells us the properties of the desired agent Ag
O
pt, it sadly
does not give us any clues about how to implement this agent. Worse still, some
agents cannot be implemented on some actual machines. To see this, simply note
that agents as we have considered them so far are just abstract mathematical
functions Ag : :R