• No results found

MD-AOSE: Model-Driven Agent-Oriented Software Engineering

Introduction, Background, and Problem Statement

2. MD-AOSE: Model-Driven Agent-Oriented Software Engineering

This chapter reviews literature from the areas of AOSE and Distributed Artificial Intelligence (DAI), on the one hand, and model-driven development (MDD) on the other hand. The link between both areas is established through listing relevant work in the domain of AOSE applying principles from MDD.

Structure of this Chapter Section 2.1 gives an overview on the core building blocks (e.g. agent, organization, interaction, etc.) of MASs. Section 2.2 follows by giving a brief overview on the basic principles of MDD and describes how these principles are applied in recent works in the context of AOSE. Section 2.3 concludes this chapter.

2.1 Agent-Oriented Software Engineering

DAI is, in accordance to (Weiss; 1999), the study, construction, and application of multiagent systems (MASs), that is, systems in which several interacting intelligent agents pursue some set of goals or perform some set of tasks. Two lines of research can be distinguished. Firstly, Distributed Problem Solving (DPS) (Durfee; 1999) refers to systems in which a particular complex problem is divided into several smaller sub-problems that are distributed among cooperative agents who interact, plan and work together to achieve the shared goal. Secondly, MASs allow for potentially non-cooperative forms of interaction other than those of DPS systems. In MASs, agents are typically self-interested and do not necessarily share a common goal, but mechanisms like negotiation allow to reach a consensus.

Although every problem can also be solved by a centralized approach, there exist several reasons for using distributed systems. Interactions, for instance, are a necessary ingredient for distributed systems as they pursue the purpose of making problem solving with cooperation easy, to share expertise and knowledge, to work parallel on common and/or distributed problems, to be developed and implemented modularly, and to be fault tolerant through redundancy. Interactions can be distinguished between direct by acting on the environment (i.e. black board systems) and indirect through communication with other agents. The overall aim of distributed problem solving is to reduce the complexity and size of some problems. Three techniques are especially used in this field, i.e. (i) programs are built as modules to reuse them as a black-box, (ii) a technique for handling large problems is the decomposition (i.e. large problems are divided into smaller ones), and (iii) abstraction, which is the process of defining a simpler problem by deleting details of the original problem.

Fig. 2.1: The core MAS building blocks, in accordance to (Jennings; 2001).

2.1.1 Basic Building Blocks of Multiagent Systems

Building high quality software for complex, real world applications turns out to be a very difficult task. So far, a wide range of software engineering paradigms have been proposed in order to reduce the complexity of software. Object-oriented programming (OOP), for example, is such a paradigm.

Although approaches like OOP are a step in the right direction, corresponding to Jennings (1999), they fall short in three main ways:

• The basic building blocks—i.e. the objects—are too fine grained

• The interactions between the objects are defined too rigidly

• The available mechanism for dealing with organizational structure is insufficient

Agent-oriented approaches can significantly enhance the ability to build complex (possibly dis-tributed) software systems. Fields of application for software agents are, for instance but not limited to, electronic markets, computer integrated manufacturing, computer supported collabo-rative work, management, robots, electronic commerce or personal assistance.

One challenge in defining a platform independent language for MASs is to decide, which con-cepts to include and abstract from the target execution platforms that support the architectural style of agent-based systems. The main building blocks of MASs are depicted in Fig. 2.1. Three abstraction levels are distinguished that are in detail discussed in, for instance, (Fischer et al.;

2005). At the organization level (i.e. macro level), mechanisms to structure agent societies are de-scribed. The interaction level (i.e. meso level) mainly focuses on agent communication languages, interaction protocols, and resource allocation. The agent level (i.e. micro level) addresses, for instance, procedures for agent reasoning and learning. The building blocks of MASs are discussed in following in more detail to deepen our understanding and to lay the foundations for further discussions on the core concepts of the proposed DSML4MASlanguage.

2.1. Agent-Oriented Software Engineering 15

2.1.2 Multiagent Systems

Definition 2.1.1 (MAS, according to Bond and Gasser (1988))

The research in MAS is concerned with coordinating intelligent behavior among a collection of (possibly pre-existing) autonomous intelligent agents and how they can coordinate their knowledge, goals, skills, and plans jointly to take action or to solve problems. The agents of a MAS may be working toward a single global goal, or toward separate individual goals that interact.

Bond and Gasser (1988) emphasize on the coordination of autonomous intelligent agents within a MAS toward solving problems that may either base on a single global goal that is desirable for the whole group or a single individual agent. Beside coordination issues, aspects like environment and interaction are important factors to solve problems efficiently. These are addressed by Weiss (1999) in the following definition.

Definition 2.1.2 (MAS, according to Weiss (1999))

In accordance to Weiss (1999), MASs have the following characteristics:

• Multiagent environments provide an infrastructure specifying communication and interac-tion protocols.

• Multiagent system environments are typically open and have no centralized designer.

• Multiagent system environments contain agents that are autonomous and distributed and may be self-interested or cooperative.

Weiss (1999) emphasizes on the MAS’s infrastructure allowing agents to cooperate for solving problems in a distributed manner. For coordination purposes, hereby, the ability to communi-cate using pre-defined interaction protocols is one important feature. In OOSE, objects have a centralized organization and are more integrated to each other in a system, while agents are loosely integrated. Bond and Gasser assume in Definition 2.1.1 that agents always cooperate.

However, especially in open MAS1, where agents can freely enter and leave the system, agents do not necessarily cooperate nor should be considered as trustful. In OOSE, the absence of an object will cause an exception error, while MASs would still be stable, if an agent has left the system.

Further characteristics of MASs are brought in by Jennings et al. (1998).

Definition 2.1.3 (MAS, according to Jennings et al. 1998) A MAS is a system that has the following properties:

• Each agent in a MAS has incomplete information, or capabilities for solving the problem, thus each agent has a limited viewpoint

• There is no centralized control

• Data is decentralized and computation is asynchronous.

Jennings et al. focus in their aforementioned definition on single agents, where each of them has only limited capabilities to solve tasks and acts in an autonomous manner, i.e. it has its own control. Each agent has its own beliefs about the environment that are the base for making decisions in the environment.

Summarizing the definitions in this section, we conclude that a MAS consists of a collection of individual agents, each of them displays a certain amount of autonomy with respect to its actions

1see (Davidsson; 2001) for a detailed categorization of MASs

and perceptions. Overall computation is achieved by autonomous computation within each agent and by interaction (e.g. communication) among them. The capability of the resulting MAS is an emergent functionality that may surpass the capabilities of each individual cooperating agent.

It is a widely supported assumption in the multiagent community that the development of robust and scalable software systems requires autonomous agents that can complete their objectives, while situated in a dynamic and uncertain environment. These agents need to be able to engage in rich, high-level social interactions, and operate within flexible organizational structures (Jennings; 1999). Organizational structures institutionalize anticipated coordination, which is especially useful for medium- and large-scale applications that require limitation of the agents’ communication behavior. Agents acting in such structures can encapsulate the complexity of subsystems and modularize its functionality providing the basis for rapid development and incremental deployment. Even if the definitions given in the previous section differ slightly, each of them naturally comprehends the notion of agent.

2.1.3 Agent

In accordance to Wooldridge (1997), an agent is an encapsulated computer system (e.g. software program, robot) that is situated in some environment, and that is capable of flexible, autonomous action in that environment in order to meet its design objective. Agents are persistent compu-tational entities capable of perceiving and acting upon their environment, in an autonomous manner. They interact and communicate with the environment and other agents and incorporate reasoning techniques (e.g., planning, decision making, and learning) to achieve flexible rational behavior (Wooldridge; 2000a). In the MAS literature, various definitions of the term agent exist (e.g. (Maes; 1995; Hayes-Roth; 1995; Smith et al.; 1994; Shoham; 1997)). We selected two of the most well-known agent definitions for further discussion.

Definition 2.1.4 (Agent, according to Russell and Norvig (1995) )

An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through effectors.

Russell and Norvig presumably gave the most general definition of the term agent. The definition mainly focuses on the interaction of an agent with its environment. Thus, the agent changes the environment through its effectors and reacts to changes through sensors. Even if the interaction with the environment is certainly one important feature of agents, there are further facets that need to be explored. This is done through the most cited definition used in the MAS community.

Definition 2.1.5 (Agent, according to Wooldridge and Jennings (1995b))

Autonomy Agents are able to act independently, i.e, without the intervention of human beings or other agents and exhibit control over their internal states. Thus, the agent makes independent decisions and actions. Furthermore, Wooldridge and Jennings assume that an autonomous agent has its own beliefs, desires and intentions, which are not subservient of other agents.

These beliefs, desires and intentions are necessarily represented within an agent.

Reactivity Agents are able to react on changes in the dynamic environment. This is done in order to satisfy the specific goal in time for the reaction to be useful. So, if the agents become aware that their plans have gone awry, they do not ignore this fact and keep on trying to satisfy their plans, but they respond by choosing an alternative course of action.

2.1. Agent-Oriented Software Engineering 17

Pro-activity Agents are able to exhibit goal-directed behavior by taking the initiative to generate and attempt possible actions in order to reach the specific goal. Proactiveness rules out of entirely passive agents, who never try to do anything. By trying to achieve goals and intentions, the agents will exploit additional goals which can assist the achievement of the former goal or being contrary.

Social Ability Agents are able to interact with other agents or human beings via some agent com-munication language and to cooperate with other agents in order to achieve the specific goal. The exchange of information via communication is not hard to achieve, since every day millions of computers around the world exchange information with other computers or human beings. The exchange of information is not really social ability. Since other agents are also self-interested and autonomous, the agents have to negotiate and cooperate with these agents in order to achieve their goals.

Wooldridge and Jennings consider an agent as autonomous (see (Verhagen; 2000) for a detailed discussion on autonomy) entity that is able to communicate within the environment and other agents in social forms like groups. They are, moreover, capable of acting in a reactive and proactive manner. These agent’s characteristics are called the weak notion of agency. The strong notion of agency (Shoham; 1993), further brings up notions, such as knowledge, belief, intention, and obligation.

2.1.4 Agent Architectures

In order to act in a reactive, autonomous, social and pro-active manner, agents are typically based on complex architectures that support the deliberation on the agent’s objectives. In this section, we focus on different agent’s internal deliberation processes and agent’s architectures, respectively.

In accordance to Wooldridge and Jennings (1995a), three different kinds of architectures exist in the agent community. It is interesting that none of these architectures is directly reflected by standards.

Deliberative Architectures Deliberative architectures are based on the physical-symbol system hypothesis (Newell and Simon; 1976), on the foundations of logic and on theorem provers. It is therefore assumed that an agent has a model of its environment expressed through symbols, which can be used to deduce general intelligent actions. Several different approaches exist (e.g.

Planning agents (Chapman; 1987), Mentalistic Agents) concentrating on different AI techniques for specifying the central agent computational entity. Examples for deliberative architectures are GRATE (Jennings et al.; 1992) and Mecca (Bauer and Stiener; 1998).

Reactive Architectures Reactive architectures result from the limitations imposed by symbolic AI. The types of agents do not model complex reasoning, but instead they are constructed in a way that allows them to react to a changing environment by their instincts. Hence, reactive architectures are associated with observations of behaviors from the animal world. For instance, an ant colony consists of different, but very simple individuals, but the colony itself exhibit more intelligent behavior than one would expect. The subsumption architecture (Brooks; 1991, 1986, 1990) proposes a layered design of competing task accomplishment behaviors. Lower layers exhibit more primitive kinds of behavior and have precedence over layers further up the hierarchy.

Examples for reactive architectures are, for instance, Dynamic Action Selection (Maes; 1989)

or SynthECA (White; 2000). Nevertheless, most researchers agree that reactive agents are not well-suited for many kinds of problems.

Hybrid Architectures Hybrid architectures combine the advantages of the above mentioned paradigms with the aim of an integrated effective and efficient agent behavior. Therefore, AI components and reactive elements are subsumed into one design model. A well known example is INTERRAP (Müller and Pischel; 1993; Müller; 1996), which consists of a layered world model and an execution entity. It distinguishes between purely reactive, planned, and social behaviors.

Other well-known approaches are RAP (Firby; 1995, 1994, 1989) or AIS (Hayes-Roth; 1995) (for more information we refer to (Wooldridge and Jennings; 1995a)).

For the design of agents with rational and flexible problem solving behavior, the belief-desire-intention (BDI) agent architecture (Rao and Georgeff; 1991, 1995; Georgeff et al.; 1999) has been proven successful during the last decade (Bratman; 1987). Three mental attitudes (beliefs, desires, and intentions) allow an agent to act in and to reason about its environment in an effective manner.

Beliefs are reflections of the current state of the world that can change over time. Often, beliefs are based on sensory information and stand for the information the agent has about the environment it inhabits and its own current state, where these beliefs provide a domain dependent abstraction of entities, by highlighting important properties and omitting unnec-essary information (cf. (Braubach et al.; 2005)). Important, beliefs about the world could be incomplete or incorrect, which may result in incorrect interpretation of the state of the world and may lead to incorrect actions.

Goals are an other central concept, following the general idea in accordance to (Pokahr et al.;

2005b) that goals are concrete, momentary desires of an agent. For any goal it has, the agent will perform suitable actions, until it considers the goals as being reached, unreachable, or not wanted anymore.

Intentions stand for desires the agent has committed to achieve. Wooldridge (2000b) annotated that the intuition is that an agent will not, in general, be able to achieve all its desires, even if theses desires are consistent. Ultimately, an agent must therefore fix upon some subset of its desires and commit resources to achieving them. The desires an agent has committed to are called intentions.

Plans represent the behavioral elements of an agent. Plans are in general composed of a head and a body part, where the head specifies the circumstances under which a plan may be selected, e.g. by stating events or goals handled by the plan and preconditions for the execution of the plan. Additionally, the plan head states a context condition that must be true to continue executing the plan. The body provides a predefined course of action, given in a procedural language. When the agent selects a plan for execution, it will execute actions like sending messages, manipulating beliefs, sending messages, executing algorithms, or creating subgoals that may be achieved by other agents through cooperation.

As stated by (Braubach et al.; 2004), viewed from the outside, an agent is a black box that receives and sends messages and acts in its environment. All kinds of events, such as incoming messages or goal events serve as input to the internal reaction and deliberation mechanism, where events are dispatched to plans selected from the plan library. The reaction and deliberation mechanism is the only global component of an agent. All other components are grouped into reusable modules called capabilities (Braubach et al.; 2005).

2.1. Agent-Oriented Software Engineering 19

2.1.5 Organization

Up to now, we mainly focused on agent-centered MASs. However, a lot of research (e.g. (Schillo;

2004; Zambonelli and Parunak; 2002; Parunak and Odell; 2002; Jennings; 2000; Ferber and Gutknecht; 1998)) has be done with respect to organization-centered MAS. Both terms should certainly not be considered as totally separated as suggested by (Ferber et al.; 2004), but rather overlapping as MASs need both, the single autonomous agents, as well as, a society established through organizations or other forms of social groupings. The major advantage of social units like organizations is that those are formed to take advantage of the synergies of its members, resulting in a possibly intelligent entity that enables products and processes that are not possible from any single individual. To deepen our understanding of the term organization in the domain of MASs, we discuss two different definitions and, thereby, illustrate the core aspects of organizations, which are an important concept in PIM4AGENTS.

Definition 2.1.6 (Organization, according to Gasser (1992))

An organization provides a framework for activity and interaction through the definition of roles, behavioral expectations and authority relationships (e. g. control).

The definition given by Gasser is rather general, without especially focusing on the domain of MASs. However, this definition already nicely illustrates the organizational building blocks, like for instance, role, interaction, behavior, and authority. In the domain of organizations, roles are of major importance as they are, in accordance to (Ferber et al.; 2004), an abstract repre-sentation of a functional position of an agent in an organization. The functional position is normally characterized by activities and services required to achieve social objectives. Hence, a role is the abstract representation of a policy, service or function and they typically describe an organizationally-sanctioned structured bundle of activity types (Gasser; 2001).

Yan et al. (2003) distinguish between two perspectives. From the conception perspective, a role is a constraint under which an agent takes part in some interactions and evolves in a certain way. From the implementation perspective, a role is an encapsulation of certain attributes and behaviors of the agent it is bound to. From the society design perspective, roles provide the building blocks of the agent systems, from the agent design perspective, roles specify the expectations of the society with respect to the agent’s activity in the society as the agents behave under their bound roles.

An agent may play several roles within an organization, and on the other hand, a role may be played by several agents. In OOSE, an object class usually has a specific capability or functionality, where an agent could play different roles in different domains or situations. Wooldridge et al.

focuses on an important aspect in their definition.

Definition 2.1.7 (Organization, according to Wooldridge et al. (2000))

We view an organisation as a collection of roles, that stand in certain relationships to one another, and that take part in systematic institutionalised patterns of interactions with other roles.

Wooldridge et al. consider patterns of interactions as, for instance, defined by agent interaction

Wooldridge et al. consider patterns of interactions as, for instance, defined by agent interaction