Most systems until now have been centralised : A bit like the old Soviet Union, everything is centrally planned. The trouble is real-life isn’t like that - it’s a market economy with no central control. There’s a story about a Russian Diplomat posted to New York in the 60’s. On a visit to a bakery he asked - who decides how many loaves are baked in the city? The answer is no-one - each baker individually decides how many to bake based on how many he sold the day before. Somehow (almost) everybody gets fed.
Current OO systems are like the Russian’s view: everything is centrally controlled. Agents are more like New-York (or Dublin) city today - a place full of people (agents) acting in their own self interest. Somehow everything works ok. Economists have a theory that backs this up ; in general a set of people acting in their own self interest gives the best solution at a global level. Or, if you prefer it’s a bit like Ants. Individual Ants are stupid, but together they are clever enough to mark a trail to food and carry it back to the Anthill. It’s called Emergent Behaviour - simple programs combining to give the answers to complex problems.
How does Web 2.0 give a push to Agents? Before, Systems were standalone , and everything planned in advance. With Web 2.0 everything is connected and too complex to manage by one person. We need to look at what works successfully in real life. Just as Market economies overcame the ‘Command and control’ of communism, so Agents will overcome the Command and control of Objects. It may not be perfect, but it will be (slightly) better.
Will agents replace Java and .Net ? A sign that ‘the future is already here’ is that when you read the list ‘what makes an agent’ , you may go ‘but we’re doing that now’. Java and .Net have been around for so long now that it’s easy to forget the Object Orientated Programming (OOP) was once a radical new departure. It’s also easy to forget that languages such as C++, Visual Basic 6 and Powerbuilder were once ‘king of the hill’ and commanded respect from your colleagues when you mentioned your latest project was using them.
So what are agents? Compared to Objects :
- Agents act in their own self interest , they may decline a request if they think it makes them better off.Objects always respond to a request.
- Agents have their own thread of control , 1 for each agent. Objects may have their own thread, but most objects don’t. - Agents are pro-active, and seek to improve their lot , according to pre-defined goals.
- Agents are ‘Coarse Grained’ that is, a system will probably have a few agents will a lot of normal , dependent , objects. It’s similar to the way Enterprise Java Beans are used : not everything is an EJB , and there a still lots of Plain Old java Objects.
- Objects are designed from the start to work together. Agents can be written by different people , perhaps with widely different goals in mind.
Just like C++ was a procedural language with object orientated ‘bits’ attached, Agents are currently implmented in languages like Java , with agent-y bits attached. Probably the most useful set of bits is Cougaar. Cougaar is an open source project with a live community at Cougaarforge and an Eclipse based IDE. Cougaar gives you the basic infrastructure for creating and managing agents.
Of course , there’s nothing to stop you building your own agents. According to the above definition, most systems that have workflow tieing together entities making decisions according to their own business rules are not far off being agents. Especially when they have a scheduler (i.e. their own ‘thread of control’).
What do you think? Leave a comment below.