Agent-oriented programming
Programming paradigms |
---|
|
Agent-oriented programming (AOP) is a programming paradigm where the construction of the software is centered around the concept of software agents. In contrast to object-oriented programming which has objects (providing methods with variable parameters) at its core, AOP has externally specified agents (with interfaces and messaging capabilities) at its core. They can be thought of as abstractions of objects. Exchanged messages are interpreted by receiving "agents", in a way specific to its class of agents.
Contents |
History
Historically the concept of Agent-oriented programming and the idea of centering your software around the concept of agent was first used by Yoav Shoham within his Artificial Intelligence studies, in 1990.[1][2] His agents are specific to his own paradigm as they have just one method, with a single parameter. To quote Yoav Shoham from his paper in 1990 for a basic difference between of AOP against OOP:
- ...agent-oriented programming (AOP), which can be viewed as a specialization of object-oriented programming. ...
OOP | AOP | |
---|---|---|
Basic unit | object | agent |
Parameters defining state of basic unit | unconstrained | beliefs, commitments, capabilities, choices.... |
Process of computation | message passing and response methods | message passing and response methods |
Types of message | unconstrained | inform, request, offer, promise, decline.... |
Constraints on methods | none | honesty, consistency.... |
JADE
There are multiple 'frameworks' that implement Shoham's programming paradigm, for the Java-platform one of the frameworks is JADE (http://jade.tilab.com/). Following a very basic example [1] of an Agent that runs code
package helloworld; import jade.core.Agent; public class Hello extends Agent { protected void setup() { System.out.println("Hello World. "); System.out.println("My name is "+ getLocalName()); } public Hello() { System.out.println("Constructor called"); } }
References
- ^ Shoham, Y. (1990) (Technical Report STAN-CS-90-1335). Agent-Oriented Programming. Stanford University: Computer Science Department.
- ^ Shoham, Y. (1993). Agent-Oriented Programming. Artificial Intelligence. pp. 51–92. CiteSeerX: 10.1.1.123.5119.