"Controlling complexity is the essence of programming" (Brian Kernigan).
"We can only understand something if we can program it" (Gregory Chaitin).
The concept of agent
An agent is a computational entity residing in a dynamic environment that has the ability to autonomously perceive and act on that environment. In this way, it is capable of accomplishing a set of objectives or carrying out certain tasks for which it was designed.
This software engineering paradigm has emerged with great force in recent years, as it is particularly suitable for solving complex problems, mainly in the field of artificial intelligence. It also constitutes a very suitable way for the creation of real-world models.
The decomposition of a problem into agents represents the most radical form of application of the "divide and conquer" philosophy, where each agent deals with a part of the problem and where all agents collaborate and coordinate their activities for the achievement of a final goal.
Types of agents
There are many types of agents. Some examples are:
Search.
Transaction.
Help or assistance.
Information filtering.
Monitoring.
Presentation.
Security (restrictive, vigilant, etc.).
Interface (to interact with the user).
Servers (offer their services to other agents).
Clients (use the information and services of server agents).
Intermediaries: For example, those that act between client and server agents, such as broker agents (that offer complete transactions) and directory agents (that offer a directory of the services offered by other agents).
Characteristics of agents
An agent is a computational entity that has the following identifying characteristics:
Autonomy.
An agent acts on its own, without external intervention (human or from other agents), while possessing control over its internal state and actions.
Sociability.
It is the ability to interact with other agents (including humans) and with the environment of the system. Maximum sociability occurs when agents collaborate in pursuit of a common goal.
Reactivity.
Agents "perceive" or are sensitive to the environment in which they are immersed and react to the changes that take place in it, performing actions and/or modifying their internal state.
Knowledge.
An agent, at all times, has knowledge of its internal state and of its environment. Based on that knowledge it is able to approach its objectives autonomously.
Intelligence.
An agent behaves according to an internal logic, which is put into action according to the situation of the environment or its internal state.
Initiative (proactivity).
An agent has initiative to act in order to achieve its objectives. At each moment (depending on its sensitivity to the environment) it decides whether or not to act and whether or not to modify its internal state. This internal process is called "deliberation".
Additional characteristics that agents may possess are:
Adaptability.
It is the ability to change its behavior based on its experiences (learning). The behavior could be open-ended, i.e., not predictable.
Mobility.
A mobile agent is one that can physically move around the nodes of a network or move (or act) in other environments. Its purpose would be to better share resources, distribute process load, etc.
Traditional development with agents
Historically, agent-oriented programming has been supported by the integration of two paradigms: the object-oriented paradigm and the logical paradigm. An agent was constructed as an object and its behavior was implemented by means of logical clauses. An example of such an approach is JavaLog, a language mixture of Java (object-oriented programming) and Prolog (logic programming), in which an agent is a Java object that references a logic module (containing the logic clauses).
Although there are currently many applications implemented with agent technology, the topic has not yet reached sufficient maturity and popularity, mainly due to:
The great acceptance and diffusion achieved with object technology.
The variety of existing methodologies.
The difficulty of analysis and design. These tasks are complex, as they require the definition of a specific ontology of the system, the tasks of the agents, the interrelation between agents and the methods of cooperation (delegation, negotiation, etc.).
The difficulty of use, having to resort to specialized languages, tools or platforms. And also that they are usually not fully adapted to the needs of each problem.
An example of a development tool is Agent Buildar Pro (from Reticular Systems, which generates Java agents.
Well-known development platforms are JADE (Java Agent Development) and IMPACT (Interactive Maryland Platform for Agents Collaborating Together).
Agents vs. Objects
There is a certain analogy between the object paradigm and the agent paradigm:
Agents can be considered as autonomous active objects.
Both implement abstractions, although the level of abstraction in the case of agents is higher than in the case of objects.
An important difference is that object-oriented methodologies cannot be used directly in agent orientation.
Agents vs. Processes
Agents are reminiscent of processes in a multiprocess system (e.g., an operating system). But the difference is that an agent has autonomy, it "knows" when to act, while a process must be explicitly invoked to act.
Agents normally act concurrently. On the issue of access to shared resources, by different agents, the same problems arise as in concurrent programming.
Intelligent agents
The term "intelligent agent" came into use in the 1980's in the subdomain of artificial intelligence called "distributed artificial intelligence" (DAI). Its concept was that of an object with built-in or self-contained intelligence. In DAI, intelligent agents have collective and cooperative behavior.
Agents and software interoperability
Agent technology has been proposed as a system for achieving software interoperability, using a common ontology:
Agents encapsulate programs in a knowledge representation language called KIF (Knowledge Interchange Format).
The communication between agents is done through a language called KQML (Knowledge Query and Manipulation Language).
Multi-agent system
It consists of the following elements:
A set of agents, representing the perceptual and active entities of the system.
An environment in which the agents (the active entities) "live" and in which the objects (the passive entities) handled by the agents also reside.
A set of communication relations between the agents.
A multi-agent system may contain cooperative and non-cooperative agents.
A non-cooperative agent is an agent that acts independently of the other agents and performs a certain predetermined task.
A cooperative agent is one that collaborates with other agents. Cooperative agents can form groups. Each group can be considered as a higher-level cooperative agent, whose components are sub-agents. A system with cooperative agents makes it possible to address and solve problems that are beyond the capabilities of individual agents.
In both cases, each agent (whether cooperative or not) always contributes to the overall functioning of the system.
Agent Development with MENTAL
MENTAL is a language of supreme level of abstraction, of universal paradigm, which enables agent-oriented programming without any additional resources. There is absolutely no need for any specific language that contemplates agent systems or any knowledge representation system. With MENTAL everything is simpler.
Aspects to highlight in the development with agents with MENTAL are the following:
Definition.
An agent is defined by one or more conditional generic expressions, as in event-driven programming. These expressions govern its behavior or logic. They are activated when the part of the environment to which the agent is sensitive, or its internal state, changes. The part relating to the "action" associated with the event is implemented by other active expressions (procedures, functions, rules, etc.), which are of a secondary or subordinate type.
Once again, generic expressions constitute the integrating element of programming paradigms.
Communication between agents.
No direct communication language is needed between agents. Communication can be done indirectly through abstract space. This method is simpler and more flexible, and has the additional advantage that one agent can communicate with several agents at the same time, since agents are sensitive to abstract space.
Paradigm integration.
As MENTAL is a universal language, it allows integrating agent-oriented programming with other paradigms. In fact, the boundary between different paradigms is blurred: all paradigms are manifestations of the same semantic primitives.
Software interoperability.
Software interoperability should not be based on a particular paradigm such as agent-oriented programming. It must be based on something deeper and more general. It is easily achieved through the universal ontology of MENTAL primitives.
MENTAL also allows the development of high-level resources such as:
Virtual agents (agents built from components of other agents).
Parameterized generic agents, from which specific agents can be created.
Hierarchical agents (agents that can activate or deactivate other agents).
Dynamic agents (agents that change their behavior).
Agents that generate other agents (meta-agents).
Intelligent agents, for artificial intelligence.
Etc.
Addenda
FIPA (Foundation for Intelligent Physical Agents)
This is the organization that defines the standards in agent-oriented software engineering: ontologies (i.e., concepts and their relationships), agent interaction protocols, etc. Its Web address is: http://www.fipa.org
Bibliography
Ferber, Jacques. Multi-Agent Systems. An introduction to Distributed Artificial Intelligence. Addison-Wesley, 1999.
Huntbach, Matthew M; Ringwood, Graem A. Agent-Oriented Programming: from Prolog to Guarded Definite Clauses. Springer, 1999.
Lesnick, Leslie L.; Moore, Ralph E. Creación de Agentes Inteligentes en Internet. Anaya Multimedia, 1997.
Nilsson, Nils J. Inteligencia Artificial. Una nueva síntesis. McGraw Hill/Interamericana de España, 2004.
Weiss, G. Multiagent Systems. A modern approach to distributed artificial intelligence. The MIT Press, 1999.
Wooldridge, M; Jenings, N.; Kinny, D. The Gaia Methodology for Agent-Oriented Analysis and Design. International Journal of Autonomous Agents and Multi-Agent Systems, 2000.