CEUR Proceedings of the 5th International i* Workshop (iStar 2011) Development of Agent-Driven Systems: from i* Architectural Models to Intentional Agents’ Code Maurício Serrano and Julio Cesar Sampaio do Prado Leite, Departamento de Informática, Pontifícia Universidade Católica do Rio de Janeiro, Rua Marquês de São Vicente 225, Ed. Padre Leonel Franca 13o. andar, Rio de Janeiro, Brasil mauserr@les.inf.puc-rio.br, http://www-di.inf.puc-rio.br/~julio/ Abstract. The intentionality concept can improve the cognitive capacity of software agents, especially if the proposed intentional reasoning engine deals with softgoals at runtime. In this scenario, the use of an intentionality-based technological set to develop agent-driven systems from i* models to code is adequate. In this paper, we propose heuristics to improve the development of agent-driven systems from i* models to Belief-Desire-Intention-based code. Moreover, we apply a fuzzy-logic-based mechanism to deal with softgoals “on the fly”, improving the reasoning engine of intentional agents. We compare our efforts with related work and illustrate our contributions with a case study. Keywords: i* models, model-driven development, intentional agents, transformational heuristics, fuzzy-logic-based reasoning engine. 1 Introduction According to [1], a multi-agent system (MAS) is a system composed of many intelligent agents that work in a collaborative manner in order to achieve their goals. In other words, these intelligent agents tend to automatically find the best solution for the delegated goals – i.e. “without intervention”. Therefore, the agents can assume different responsibilities – normally represented as different roles or capabilities. Moreover, they can perform several tasks by also adapting themselves to better achieve their goals. A multi-agent system can be driven by behavioral agents [2] or intentional agents [3]. On one hand, the former orientation is more appropriate to deal with systems based on agents that can be modeled and implemented by using specific behaviors, such as: eating, sleeping, running, reading, and so on. Therefore, the behavior-based orientation seems proper to represent, for example, self-organization in social colonies (e.g. ant colonies). On the other hand, the latter orientation can improve the reasoning and learning capacity of intelligent agents by using the intentionality abstraction. According to [3], an intentional multi-agent system represents an adequate way to deal with human practical reasoning and to improve the goals formation and human-mental states interpretation. The BDI (Belief-Desire-Intention) model is an intentional model, intensely investigated in the Artificial Intelligence 55 CEUR Proceedings of the 5th International i* Workshop (iStar 2011) field. More recently, this model has been applied to intelligent agents by allowing them to deal with (i) beliefs – i.e. the agent’s knowledge about, for example, the real world or a specific context; (ii) desires – i.e. the goals to be achieved by the agents; and (iii) intentions – i.e. a sequence of tasks that must be performed by the agents to achieve the delegated goals (in the BDI model, intentions have the semantics of actions with the purpose to achieve the desires). In order to guide the development of multi-agent system, TROPOS [4] offers an agent-oriented methodology. This method is centered on the i* Framework [5], which abstractions (e.g. goals, softgoals, tasks, resources, beliefs and others) are used to model the requirements and design details of the MAS under development. There are different approaches [6] [7] centered on the TROPOS methodology that propose solutions to respectively: (i) develop MAS by applying heuristics to go from i* models to BDI-based code; and (ii) perform the development of MAS from organizational architectures in i* to architectures based on agents by also applying some Agent UML diagrams to capture the agents’ intentionality. Section 3 highlights how our work differs from previous work. In this paper, we propose specific design and implementation heuristics to drive the development of MAS from the requirements to code centered on intentional agents. Therefore, we propose: (i) using i* for both the requirements model as well as the design model; and (ii) the implementation of the modeled system based on the BDI model of the JADEX [8], an add-on to the JADE MAS platform. JADEX is also centered on the intentionality abstraction. Moreover, we offer an approach centered on fuzzy-logic to analyze the impacts of tasks on softgoals implemented as a reasoning engine for the intentional agents. This paper is organized in Sections: Section 2 discusses the main objectives of our research; Section 3 presents some scientific contributions; Section 4 summarizes the proposal by presenting the final considerations; and finally, in Section 5 we consider the ongoing and future work. 2 Objectives of the research In order to facilitate the presentation of our research, we use a case study – the Lattes- Scholar [9]. It uses two specific services: (i) the Lattes service [10], which consists of a base of scientific and technological curriculums maintained by the Brazilian Government; and (ii) the well-known Google Scholar service. The objective is to list the publications from an author’s curriculum sorted by the number of citations. We modeled the requirements and the detailed design of Lattes-Scholar by using i*, specifically the Strategic Dependency (SD) and Strategic Rationale (SR) models. Fig. 1 shows the architecture of Lattes-Scholar modeled in i*. There are some differences between the i* modeling and the specification in BDI notation, such as: (i) the i* modeling represents a network of social actors, while the BDI-based specification represents the internal and mental architecture of a unique software agent; and (ii) the i* modeling represents sofgoals as well as how tasks, goals and softgoals impact on these softgoals by using positive and negative contribution links. 56 CEUR Proceedings of the 5th International i* Workshop (iStar 2011) Fig. 1. Lattes-Scholar’s architecture modeling in i* Although there are semantic differences between the models i* and BDI, these models share common concepts, such as: actor/agent, goal, task/intention, belief, resource/belief, and others. Therefore, it is possible to associate the abstractions of these models, as presented in Fig. 2. Table 1 describes some of these (design) transformational heuristics to produce a BDI specification from SD and SR i* models. Fig. 2. Association between i* abstractions and BDI abstractions It is important to consider that – after applying the design heuristics – there are some gaps in the BDI model of the agents, such as types. The software engineer must manually fill in these gaps. Now, our interest is in a lower abstraction level, on which intelligent agents centered on BDI specifications are implemented as intentional agents in JADEX. The JADEX Framework implements a BDI architecture for agents of the JADE platform. The intentions defined in BDI specifications are implemented as Java object classes – i.e. Plan – in JADEX. Furthermore, JADEX is an add-on for the JADE platform, which implements the FIPA agent communication protocol and messages exchange. Fig. 3 illustrates the associations between the abstractions of the BDI specification and the MAS code in JADEX. We omitted the implementation heuristics (from BDI models to JADEX agents’ code) due to lack of space. Basically, the executable agents are implemented as JADEX agents. Non- executable agents (originated from roles and positions) are implemented as capabilities, which are acquired at runtime by software agents of the MAS platform. Desires are translated as goals and maintained or performed according to the tag “type” from the BDI specification. The intentions are translated as plans of agents – i.e. Java classes that extend the “Plan” class of JADEX. Beliefs with 0..1 or 1..1 57 CEUR Proceedings of the 5th International i* Workshop (iStar 2011) cardinalities are translated as beliefs of agents, while beliefs with 0..n or 1..n cardinalities are translated as a set of beliefs. Table 1. Transformational Heuristics: from i* Framework to BDI specification # When it is applied Action Exit (XML Fragment) 01 For each actor (or Create an agent in the system. a tag runnable="yes". Roles and positions have a tag runnable="no". 03 For each softgoal of Create a belief with the 06 For each task that is Create an intention and performed to achieve associate it to a desire [goal_name] a goal of an actor. (goal).