AOSE 2 – Agents are patterns

I will try to answer dcoop’s comments on my first post on AOSE. I think I’ve answered his points 1 and 2 in my previous post. Here I will try to ellaborate on his 3rd point, namely, why and how I feel that agents are a step forward from objects.

I don’t think that agents are a step forward from objects. I said in my first post that many authors have stated that agents are the new step beyond objects. But I am not one of them. As I explained in my first post on AOSE, I think that agents are better viewed as a pattern. Yes, GoF style. The agent pattern is useful when you need a software entity to behave in a highly autonomous way. Agent-orientation is not a paradigm, and definitely will not displace objects as mainstream design and programming approach.

Some years ago it was fashionable to discuss components. Many people threw themselves into long discussions on “what components are”. OOPSLA panels were held on this. Papers written. I cannot see any progress with regard to answering this question. Some people keep saying that components are beautified objects; others say that components are nothing to do with objects. I have my own ideas on this, but they didn’t come from any of the multiple contradicting, ill-defined, partial answers that I have read elsewhere.

Agents are in the same situation now.

The agent fad will pass in a few years and nobody will spend too much time wondering what agents are, or trying to build an agent-oriented programming language <kidding>in which you’ll have to send a message to a pixel agent to turn it blue</kidding>, or worrying about the agent-oriented paradigm. People will revert to writing software using real-life, proven, robust object-oriented approaches.

Or perhaps it will not. Perhaps agents are the next big thing, as structured programming and OO have been. I see this as extremely unlikely, but I am not going to commit the error of trying to predict the future. In any case, if some time agents become the next big thing, I bet it will take years to come. I would say decades.

Some people think that agents and objects must coexist in the same environment. That means that, in a sofware system we will have agents and also objects. Agents and objects will interact with each other. We will create agents for those pieces of software that need to behave in a highly autonomous, situated and rational fashion, and objects for everything else. Do you think this makes sense? I think it does. But this is not different from what we already have. You design blackboards, pipelines, commands, controllers, decorators for things that need to behave in a blackboardish, pipelineish, commandish, controllerish, decoratorish fashion, and objects for everything else. You need to realise that blackboards, pipelines, commands, controllers and decorators are just patterns, i.e. structures embodied by clusters of objects that are interrelated in a specific way and that play specific roles. Blackboards, pipelines, commands, controllers and decorators are abstractions that we, as software designers, think of, understand and create, but ultimately they are expressed to the computer as clusters of objects. Now try to apply the same to agents. It works!

I love playing the devil’s advocate, so I will argue at this point that objects are also composed of smaller things, namely variables and functions, and that these things are what the computer understands, so objects mean nothing to the computer, which only understands much more primitive constructs. Fair enough. If agents don’t exist but as patterns, then objects don’t exist either.

The difference is seamlessness and universality. We can use objects for high-level analysis, objects for design, objects for programming… Objects for business process reengineering, my god! Objects are universal. They are so simple that they can be used for very simple things (a pixel on screen is an object, and this works) and also for highly complex ones (a database server engine is an object). Aggregation and delegation allow this. Agents can’t do this. Agents are useful to model things at some levels, but we cannot conceive a software engineering environment in which we can seamlessly use agents to model any kind of thing regardless of its granularity and level of abstraction. Agents are not universal because they are more complex than objects. This makes them powerful, but also less flexible. In my view, this makes phrases such as “agent-oriented paradigm” or “agent-oriented software engineering” not very meaningful.

In summary: agents are fine as a niche technology. They are highly specialised constructs that are optimal for a few specific areas and useless for everything else. Just look at the examples in agent books or papers: they are always drawn from a few fields. They typically involve searching or some kind of distributed negotiation such as auctions. Nobody is trying to design an operating system using agents! Or a word processor! Or a payroll system! You can design little parts of these with agents, true, but not the whole thing. This is why agents are a niche technology.


0 Responses to “AOSE 2 – Agents are patterns”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Follow me on Twitter



%d bloggers like this: