Overloading "Agents"

Multi-Agent Systems

First, an informal description of multi-agent systems:

Autonomous agents and multi-agent systems represent a new way of analysing, designing, and implementing complex software systems. The agent-based view offers a powerful repertoire of tools, techniques, and metaphors that have the potential to considerably improve the way in which people conceptualise and implement many types of software (N Jennings, 1998).

Researchers sometimes use the term agent-oriented programming to describe cognitive, often proactive and communicative independent units. "The mental state of agents is described formally in an extension of standard epistemic logics: beside temporalizing the knowledge and belief operators, agent-oriented programming introduces operators for obligation, decision, and capability" (Y Shoham, 1993). Agents may be virtual social avatars for human beings, an agent may be described as any program that acts on behalf of a human user (NM Kamik, 1998). They may hold beliefs, and have desires and intentions in formalised BDI systems (A Rao, 1995). Agents may cooperate in reactive or decision-theoretic planning decisions.

Multi-Agent System Implementations

Many agent-oriented programming languages are based on the Prolog-like logical goal reduction approach where rules are used to reduce, in depth-first way, a selected goal (R Bordini, 2009).

3APL (K Hindriks, 1999) incorporates features from both imperative and logic programming. The proof as computation model of logic programming is used to implement the querying of beliefs of agents, while imperative programming concepts are used to describe the execution of the goals of an agent. AgentSpeak (A Rao, 1996), elegant logic based abstract agent-oriented programming language for reactive planning systems. Jason (R Bordini, 2007) is a logic-based agent oriented interpreted programming language, and is an extended version of AgentSpeak. DTGolog (C Boutilier, 2000) is for explicit agent programming with decision-theoretic planning.

Critiquing the Hype

Agent-oriented programming is an interesting area in programming language design. Some examples of agent-oriented languages have expressive language constructs and powerful runtime system reasoning techniques to reflect agent domains e.g. social interaction or complex planning. Claims are sometimes made about the agent-oriented programming model that exaggerate its novelty. For example, my interests include the design and implementation of parallel and distributed programming languages, and when the details of agent-oriented languages are divulged, it is clear the programmer has been thrown a poor-mans Erlang, Akka, Scala etc...

Several observers feel that certain aspects of agents are being dangerously over-hyped, and that unless this stops soon, agents will suffer a similar backlash to that experienced by the Artificial Intelligence (AI) community in the 1980s (N Jennings, 1998).

Over its 40-year history, AI has been subject to many and varied criticisms. Perhaps the most persistent and troubling of these is that AI has simply failed to deliver on its promises ... At least part of the answer is also that many AI researchers either ignore or else gloss over the pragmatic concerns of software development ... Software engineering is generally regarded as neither a contributor nor a concern (M Wooldridge, 1997).

Agent projects are often initialised with no clear goals in mind. With no goals, there are also no criteria for assessing the success or otherwise of the initiative, and no way of telling whether the project is going well or badly. The net result is that catastrophic project failure can occur seemingly out of the blue (M Wooldridge, 1998).

Agent Programming Model Comparisons

Agents are Objects

Jade (F Bellifemine, 1999) is an example of a widely known agent-oriented language in the agent systems community. Agent programming in Jade is similar to object oriented programming, with a few differences:

Object Oriented Agent oriented Primitive type Object Agent State parameters Unconstrained Beliefs, capabilities, choices Process of computation Message passing & response methods Message passing & response methods Message types Unconstrained Inform, request, offer, decline Constraints of methods None Honesty, consistency



Table from Object Oriented vs Agent Oriented Programming (Y Shoham, 1993)

Multi-Agent Systems are Concurrent or Distributed Systems

The actor programming model is popularised by the successful Erlang language. An observation often overlooked is the commonality between actors and agents. They both communicate with message passing, they have independent beliefs (isolated internal state), and are scheduled either independently. StackOverflow is a good place to seek clarification on the differences: "Is it reasonable to view highly autonomous actors as agents?".

What can established parallel programming models and well-engineered distributed systems offer the agent community? A great deal, in fact. Three popular programming models for parallelism are the actor model in Erlang (J Armstrong, 1996), the continuation-passing style in Cilk (R Blumofe, 1996) and parallel message passing with MPI (W Gropp, 1999). Moreover, mult-agent system implementations can benefit from distributed systems literature e.g. load balancing agents (from (A Zain, 2005)) and automatic recovery of dead agents (from (M Logan, 2010)).

Erlang VM: A industry quality distributed VM for Actors (aka Agents)

Take the Erlang virtual machine as a case study. It can be deployed at large scale, on clusters or wide are networks, and the Erlang runtime system supports the high level programming features e.g. supervision behaviours for fault tolerance. That is to say actors can:

be started dynamically

live short or long lives

communicate with other actors with message passing

be proactive or reactive

be automatically restarted if they fail.

This sounds like a very useful VM for a multi-agent system, right?

An analogy would be to view Jade as Erlang with a formalised communication language for actors. Indeed, Jade agents use Agent Communication Language (ACL) (FIPA ACL, 2002) to cooperate. There exists a FIPA implementation in Erlang called eXAT (A Stefano, 2009), and I would especially encourage the reader to inspect the micro-benchmark Jade vs eXAT language comparison in Figure 3 of (A Stefano, 2009) --- spoiler: functional programming is shorter and much cleaner.

Agent programming encourages modularity (as do all good programming models)

I occasionally hear people describe agent-oriented programming as a good way to write modular code. That is, agents should be small and simple, and the intelligence emerges from their cooperative goal seeking. I ask: "who does not write modular code!". The advantages of treating a software system as modular rather than monolithic are well understood. Modularity allows for the problem to be decomposed into simpler components which are easier to build, maintain and understand. Every sanely design programming language provides mechanisms that enable good developers to write modular programs by composing smaller building blocks.

Implementing the Amazon Web Store with Agents

Take an example of Amazon's online store. I Imagine there are thousands of simple web services, that take a simple input (e.g. ISBN number), and return a simple output, maybe a record for a book. You might describe the web services as having a goal: wait for an ISBN number, then search through multiple data sources for a book, and return what it has found. Is this a distributed multi-agent system with magical reasoning powers to bewilder and delight its users? That's not how an Amazon engineer would describe it.

Douse the Agent Lingo

It is not enough to say that a programming language is agent oriented because it encourages modular code. It is not enough to say that it is agent oriented because those units have self-beliefs, live long lives and cooperatively pass messages. It is not an agent framework just because you can deploy it on a cluster or wide area network. A framework is worthy of the "agent" label if for example, its runtime system performs reduction on user code, and orders the execution of units using reasoning techniques (3APL, Jason, DTGolog...).

The other option open to the community is to knowingly use the "agent" tag more liberally. And that is fine. But we must then all accept its ambiguous nature, and carefully scrutinise the reasoning powers of agent systems on a case by case basis.