81
Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena [email protected] Software Engineering Lab (LES) – PUC-Rio October 2004 – SBES’04

Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena [email protected] Software Engineering Lab (LES) – PUC-Rio

Embed Size (px)

Citation preview

Page 1: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Ongoing Research on Software Engineering for Multi-Agent

Systems

Carlos José Pereira de [email protected]

Software Engineering Lab (LES) – PUC-Rio

October 2004 – SBES’04

Page 2: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 2

Presentation Overview

• Software Agents: Motivation

• Perspectives on Software Engineering for MASs

• MAS-SE at LES– MAS Modeling (two approaches)– Developing Method based on Aspects– Technology Evaluation– Technology Transfer

• Future research directions at LES

• Conclusions

Page 3: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 3

The Scenario

• With the advances in network-based applications, the introduction of autonomous components in software systems has become usual

• Software systems will be– Everywhere– Always connected– Always active to perform something on the user’s

behalf

Page 4: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 4

New Characteristics of Software Systems1

• Situatedness– Components execute in the context of an environment, and

they can influence and be influenced by it

• Openness– Systems have decentralized management and can

dynamically change their structure

• Locality in control– Components represent autonomous and proactive loci of

control

• Locality in interactions– Components interact with each other accordingly to local

patterns1 F. Zambonelli, H.V.D. Parunak. Towards a Paradigm Change in Computer Science and Software Engineering: A Synthesis. Knowledge Engineering Review, 2004.

Page 5: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 5

Software Agents

• The complexity introduced by this new kind of software systems goes beyond the capabilities of traditional software engineering abstractions, such as objects and components

• Software Agent– An agent is an interactive computer system that is situated in some environment, and that is capable of autonomous action in this environment in order to meet its design objectives2

2 M. Wooldridge, N.R. Jennings. Intelligent Agents: Theory and Practice. Knowledge Engineering Review 10(2), 1995, pp. 115-152.

Page 6: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 6

O que são Sistemas Multi-Agentes?

• No ponto de vista de IA– Um sistema multi-agente é uma sociedade de

agentes (agentes IA) individuais, que interagem por meio de troca de conhecimento e de negociação para alcançar um objetivo local ou global

• No ponto de vista de ES– Um sistema multi-agente é um sistema de software

composto por diversos locos de controle (agentes ES) encapsulados e independentes, que interagem no contexto específico de uma aplicação

Page 7: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 7

Agency Characteristics

• Characteristics of multi-agent systems include– Autonomy

• Capable of acting without direct external intervention

– Interactivity• Communicates with the environment and other agents

– Adaptation• Capable of responding to other agents and/or its

environment to some degree

– Pro-activity• Goal-oriented - it does not simply react to the

environment

Page 8: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 8

Agency Characteristics (cont’d)

• Characteristics of multi-agent systems include– Learning

• Modify its behavior based on its experience

– Rationality• Able to choose an action based on internal goals

– Mobility• Able to transport itself from one environment to another

Page 9: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 9

Evolution of SE Paradigms

Time

Abstractions determined by the machine architecture

Abstractions determined by the problem domain

• Assembly Languages

• Functional Abstraction

• Structured Programming

• Object-Orientation

• Components

• Design Patterns

• ...

• Software Agents

Page 10: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 10

Today’s Technological Environment

• The advances in Internet technologies increased the demand for the development of distributed, heterogeneous and complex systems

• The evolution of the Web towards a Semantic Web is creating contents that can be directly manipulated by processes

• Software agents embody distribution and heterogeneity and, thus, they are indicated as the new abstraction for the engineering of complex distributed systems

Page 11: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 11

The Multi-Agent Paradigm

• The Multi-Agent paradigm offers– A decomposition model

– An abstraction for software development based on the problem domain

– A model of system development as a composition of organizational units

– A decentralization model to reduce the unit coupling

Page 12: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 12

Experimental Development since 1998

• AulaNet Learning Management System

• 2BuyNet e-Business (B2C)

• VBroker e-Business (B2C)

• VMarket e-Business (C2C)

• iDeal e-Business (B2B)

• CommercePipe e-Business (C2B)

• PortalWare Knowledge Management

• SkillO Skill Management

• WebClipper Web Crawling

Page 13: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 13

The State of the Art of SE-MAS

• Software Engineering for Multi-agent Systems at a very early stage– Several proposals, little agreement– AOSE/AAMAS, SELMAS/ICSE– JAAMAS

• Ad-hoc or proprietary development

• Lack of an assessment of the impacts of the agent technology on software development

• There is a need to develop a proper Software Engineering for the Agent Paradigm

Page 14: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 14

Research Topics

• Agent-oriented requirements analysis and specification

• Best practice in agent-oriented development

• Engineering large-scale agent systems

• Experiences with field-tested agent systems

• Formal methods for agent-oriented systems, including specification and verification logics

Page 15: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 15

Research Topics (cont’d)

• Implications of agent-oriented software on organizational and social structures within and between companies (e.g. changes in roles, responsibilities, transparency, business processes and decision schemes)

• Integration of agent-oriented software into existing business processes and implications on business process re-engineering

• Market and other economic models in agent systems engineering

Page 16: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 16

Research Topics (cont’d)

• Methodologies for agent-oriented analysis and design

• Model checking for agent-oriented systems

• Model-driven architecture (MDA) for MAS

• Practical coordination and cooperation frameworks for agent systems

• Refinement and synthesis techniques for agent-based specifications

• Relationship of AOSE to other SE paradigms (e.g., OO)

Page 17: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 17

Research Topics (cont’d)

• Re-use approaches for agent-oriented software, including design patterns, frameworks, components, and architectures

• Software development environments and CASE tools for AOSE

• Standard APIs for agent programming

• Standardizations for AOSE

• UML and agent systems

• Verification and validation techniques for agent-based systems

Page 18: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 18

MAS-SE at LES

• MAS Conceptual Framework– TAO

• MAS Modeling– ANote– MAS-ML

• Developing Methods and Frameworks– Aspect-oriented agent patterns

Page 19: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 19

MAS Conceptual Frameworks

• Describe the structure of the abstractions of MAS

• Examples– KAoS, d'Inverno and Luck, Yu and Schmidt

• Issues– The description of the interplay between these

abstractions

– The description of the other MAS abstractions surrounding the agent, such as environment and organization

– The use of the abstractions to guide the creation of models

Page 20: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 20

The TAO Conceptual Meta-model

• Defines a core set of MAS abstractions– The entities that may be described in MAS, their

properties and the relationships associated with them (structural aspects of MAS)

– The creation and destructions of entities and also defines domain-independent behavior (dynamic aspects of MAS)

• Defines a core set of MAS relationships

• TAO groups together the abstractions that are frequently described in the literature for MAS

Page 21: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 21

The TAO3

• Abstractions– Agent, object, environment, organization and role

• Relationships– Inhabit, ownership, play, control, dependency,

association, aggregation/composition and specialization

3 V. Silva et al. Taming Agents and Objects in Software Engineering. In: Garcia et al. (eds.) Software Engineering for Large-Scale Multi-Agent Systems, LNCS 2603, 2003, pp. 1-26.

Page 22: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 22

MAS Modeling languages and methodologies

• MAS modeling languages that do not extend UML– Gaia, MaSE– ANote (Choren et al, SELMAS 2004), CAMLE (Shan

and Zhu, SELMAS 2004)

• MAS modeling languages that extend UML– AUML, AORML– MAS-ML (Silva et al, LNCS 2940, 2004)

• Methodologies that use or extend MAS modeling languages– MESSAGE, Prometheus

Page 23: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 23

MAS Modeling Languages that Do Not Extend UML

• Issues– Do not have a conceptual framework

– Overuse or lack information on diagrams (scattered design of the system)

– Miss the definition of the non-agent entities (environmental resources)

– Do not explicitly show the agency properties such as adaptation or autonomy

Page 24: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 24

MAS Modeling Languages that Extend UML

• Issues– Do not explicitly define the extensions applied to

the UML meta-model

– Do not define guidelines to implement the systems modeled using the language

– Do not model the same of the structural aspects and dynamic aspects frequently described in MAS

– Heavy

Page 25: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 25

The ANote4

• Lightweight, agent-oriented notation language

• Focus– Specification of systems with distributed

computing, agents and knowledge representation (ontology)

• Characteristics– Agent-centric / Agency features– Goal-oriented– Design views

4 R. Choren, C. Lucena. Modeling Multi-agent Systems with ANote. Journal of Software and Systems Modeling, 2004.

Page 26: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 26

ANote Conceptual Meta-model

Page 27: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 27

Views

• Each concept defines a perspective or view

• ANote defines seven views each of which has its own representation (diagram)

Page 28: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 28

ANote Goal View

• Provides an initial identification of a tree of goals that outline the functions performed by the agents

• They are specified from elaborations, process descriptions and system problem (functional decomposition)

Page 29: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 29

ANote Agent View

• Specifies the agent types of the multi-agent application solution and their relationships (system structural base)

• They are specified from the logical subdivision of the system’s functional goals

Page 30: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 30

ANote Ontology View

• Identifies the non-agent components of the system, specified with an ontology

• They are specified from the system environment resources, their relationships and functions (object-oriented approach)

• UML Class Diagram used as notation

Page 31: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 31

ANote Scenario View

• Captures agent behavior in specific contexts

• Describe how goals can be achieved by an ordering of actions and events

• It specifies the normal course of action and the alternative paths of execution (emergent context)

• Shows the agents, interactions and plans involved in achieving a goal in a context (enterprise modeling)

• Scenario table used as notation

Page 32: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 32

ANote Planning (Action) View

• Specifies the execution states, or actions, an agent has to perform to compute an action plan (derived from a scenario that illustrated a goal)

• It allows the modeling of the agents’ workflows

Page 33: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 33

ANote Interaction (Message) View

• Shows the structural organization of agents that send and receive messages while executing an action plan

• It allows the modeling of the interaction protocols (conversation graphs)

Page 34: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 34

ANote Organization View

• Specifies the multi-agent system implementation unit that offers services (set of goals), accessed by an interface (set of message protocols)

• There is no basic approach to split the agents into logical organizations (it is not a property of the abstraction, but a design decision)

Page 35: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 35

ANote Diagrams in a Nutshell

Page 36: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 36

ANote Diagrams in a Nutshell

Page 37: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 37

Some Usage Examples

• Agent Marketplace

• Web-based Insurance System

• Basic Railcar Control System

• Trading Agent Competition (TAC)

Page 38: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 38

Ongoing Research on ANote

• Tool support– Graphical tool– Internal XML representation– Eclipse Platform plug-in

• Translation (from model to code) support– MAS Framework (TAC)– Transformation from ANote models XML

representations to MAS Framework

Page 39: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 39

The MAS-ML5

• Extended UML notation language

• Focus– Specification of the structural and dynamic aspects

of MAS through a conservative extension of UML

• Characteristics– Agent/organization-centric (based on TAO meta-

model)– UML extension– Structural and dynamic aspects

5 V.T. Silva, C.J.P. Lucena. From a Conceptual Framework to a Multi-Agent System Modeling Language. Journal of Autonomous Agents and Multi-Agent Systems 9(1/2), 2004, pp. 145-189.

Page 40: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 40

MOF Architecture

Meta-model layer

Domain model layer

Meta-meta-model layer

Instance layer

MOF meta-meta-model

ER meta-meta-model

UML meta-model

TAOmeta-model

MAS-MLmeta-model

instantiation

MAS-MLmodels

unification

Page 41: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 41

The MAS-ML Meta-model

DutyRight

Features Classifier

Structural Feature Behavioral Feature

Belief Goal

Axiom

Operation

Property

Class AgentClass ObjectRoleClass

OrganizationClass

AgentPlan

Meta-classes of UML meta-model

New meta-classes

New stereotypes

Legend

AgentRoleClass

AgentAction 1..* *

1..**

sender receiver1 *

Element

AgentProtocol

AgentMessage

1..*

*

Constraintpostconditionpostcondition

preconditionprecondition

0..1 0..10..10..1

*

**

*

EnvironmentClass

ActiveEnvironmentClass

PassiveEnvironmentClass

Page 42: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 42

The MAS-ML Meta-model

Class

AgentClass

ObjectRoleClassOrganizationClass

AgentRoleClass

EnvironmentClassdefine

play

1

1..*0..*

define

1 sub-org

play 1..*1

play in

0..*

1..*

1..*1inhabit

1

0..*

inhabit

inhabit

1

0..*

play1

0..*

0..*1

sub-org

0..* 1

play in play in

0..*

0..*

Relationship

Directed Relationship

Classifier

Element

Association

Dependency Ownership Inhabit Control Play Generalization

1..*Meta-classes of UML meta-model

New meta-classes

Legend

Page 43: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 43

MAS-ML Class Diagram

• Represents the relationships between the classes and other MAS entities

Second-hand BooksImported Books

Item

Book

Virtual Marketplace

inhabit

specialization

associationAgentA

AgentB

Organization A

Organization A

Object / Environment

Agent

Organization

Legend:

Page 44: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 44

MAS-ML Organization Diagram

• Models the organizations and the relationships between the organizations and other MAS entities

Page 45: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 45

MAS-ML Role Diagram

• Models the roles and the relationships between the roles

Page 46: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 46

MAS-ML Sequence Diagram

• Represents the interactions between the MAS instances and the intra-actions defined by each instance

• New elements to represent interactions– The concept of message was extended– New stereotypes associated with messages were

created– Extensions to model protocols were defined

• New elements to represent intra-actions– Extensions to model the execution of plans and

actions were defined

Page 47: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 47

MAS-ML Sequence Diagram

• New pathnames and icons

Page 48: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 48

Bob/buyerOfBooks/Bookfinder/Place-A : UserAgent/Buyer/

GeneralStore/VirtualMarketplace

Search for organization

Check_organization_goals

Check_organization_roles

Entering organization

BrandNewBookstore/marketOfUsedBooks/Bookfinder/Place-A :Second-handBookstore/MarketOfUsedGoods/

GeneralStore/VirtualMarketplace

Request (OrgGoals)

Get_organization_goals

Managing entrance

Inform (OrgGoals)

Request (OrgRoles)

Get_organization_roles

Inform (OrgRoles)

Select_role_to_play

Inform (RoleToPlay)

Register_itself_in_organization

Bob/buyerOfSecond-handBooks/Bookfinder/Place-A : UserAgent/BuyerOfSecond-handBooks/

GeneralStore/VirtualMarketplace<<role_commitment>>

Inform (Buyer_of_second_hand_books)

Entering organization

Search_for_announcement

Request (Announcement)

...

Place-A : VirutalMarketplace

getOrganizations()

Vector

plan

action

message stereotype

methodinvocation

environmentagent

organization

Page 49: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 49

Some Usage Examples

• Simple Matching System

• Agent Marketplace

• Paper Submission and Reviewing System

• Simple Supply-chain Management System

Page 50: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 50

Ongoing Research on MAS-ML

• Preliminary approach to code generation

• Tool support– Graphical tool– Create the MAS-ML DTD based on the extended

MAS-ML grammar– Transform XMI based on MAS-ML DTD into XMI

based on UML DTD– MAS-ML Formalization– MAS-ML Analyzer

Page 51: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 51

The Aspect-Oriented Agents6

6 Garcia, A. F.; Lucena, C. J. P.; Cowan, D. D.; Agents in Object-Oriented Software Engineering. In Software: Practice & Experience, Elsevier, vol. 34, Issue 5 , pp. 489 - 521, May 2004.

• Agents with aspect-orientation

• Focus– Specification of an architecture and of a pattern

language for agents using the aspect-oriented approach

• Characteristics– Aspect-oriented– Architectural Method (kernel and agenthood

properties)– Pattern language

Page 52: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 52

The Architectural Problem

• The agent properties are not orthogonal– Crosscut each other and the agent’s basic

functionality

Collaboration

Mobility Learning

Roles

Interaction

Adaptation Autonomy

Basic Functionality

architectural component

Page 53: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 53

The Architectural Problem (cont’d)

• Multiple agent types heterogeneous architectures

Collaboration

Mobility

Roles

Interaction

Adaptation Autonomy

Basic Functionality

A Reactive Information Agent

Interaction

Adaptation Autonomy

Learning

Roles

A Cognitive User Agent

Basic Functionality

Need for a more flexiblearchitectural approach

Page 54: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 54

The Design Problem

Co

llab

ora

tio

n

Agentgoals...

addGoal()executePlan()…

InterfaceAgent

receiveInstruction()monitor()...

InformationAgent

search(Keyword)search(Keywords)…

UserAgent

getUser()checkPreference()…

Role

agentsprotocol

Caller

sendRequest()receiveResponse()...

Answerer

receiveRequest()sendResponse()...

Plan

goal

preCond()posCond()…

action1()action2()...

Plan1action1()action2()action3()...

Plan2

Basic Functionality

getName()addAgent()…

caller answerer

DB userNameuser

efectorsadaptersthreads

adapters

move()returnHome()

itinerary

processInformation()

LCs

processInformation()

LCs

move()returnHome()startRole()

itineraryremoteEnvironmentsroles

processInf ()startRole()

LCsroles

processInf ()

LCs

sendMsg()receiveMsg()addAdapter()removeAdapter()notifyAdapters()makeDecision()startThread()

roles

startRole()

addAdapter()removeAdapter()notifyAdapters()

Mobility

Collaboration Adaptation

Autonomy

Interaction

Learning

public Result searchKW(String KW) { adaptKnowledge(KW); processInformation(KW); ... ... << searching-specific code >> ... ... if (result = null) { this.move(KW) }}

Page 55: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 55

The Proposed Solution

softwarearchitecture

detailed design

implementation

ArchitecturalMethod

PatternLanguage

ImplementationFramework

Page 56: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 56

The Architectural Method

• Step 1: define the agent kernel

BeliefGoal

Plan

Kernel

Agent

namegoalsplans…

new()addBelief()setGoal()executePlan()...

Legend:

component

Legend:

component

Garcia, A., Kulesza, U., Lucena, C. Aspectizing Multi-Agent Systems: From Architecture to Implementation. “Software Engineering for Multi-Agent Systems III”, Springer LNCS, State-of-the-Art Survey, December 2004. (prelo)

Page 57: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 57

The Architectural Method (cont’d)

• Step 2: Define the agenthood properties

BeliefGoal

Plan

Kernel

Agentnamegoalsplans

new()addBelief()setGoal()executePlan()...

Interaction

GoalCreation

AutonomyExecutionAutonomy

KnowledgeAdaptation

Adaptation

MessageSending

MessageReception

Legend:

aspectual component

crosscutting interface

normal interface

Page 58: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 58

The Architectural Method (cont’d)

• Step 3: define the agent types

KernelKernelKernel

InterfaceAgent

receiveInstruction()monitor()memorize()...

InformationAgent

search(Keyword)search(Keywords)search(Sentences)…

UserAgent

getUser()checkPreference()…

Agent

namebeliefsgoalsplans...

addBelief()addGoal()executePlan()…

Page 59: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 59

The Architectural Method (cont’d)

• Step 4: define the additional properties

KernelKernelKernel

InformationGathering

Learning

InterfaceAgent

receiveInstruction()monitor()memorize()...

InformationAgent

search(Keyword)search(Keywords)search(Sentences)…

UserAgent

getUser()checkPreference()…

CollaborationProtocol

Collaboration

Legend:

aspectual component

crosscutting interface

normal interface

Page 60: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 60

The Pattern Language

absent knowledge

Environment

Agenthood Additional Properties

Autonomy

Mobility

Legend:

Crosscuts

new message

new message

incoming message

new goal

collaborationjoining

agent creation

Kernel

new eventabsent knowledge

new eventoutgoing

message

Roles

Interaction Learning

Adaptation

Page 61: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 61

The Adaptation Pattern

• The Adaptation concern– Observes events– Triggers the adaptation strategy– Adapts the agent knowledge or behavior

• Problem: how to separate the adaptation concern from the other agency concerns?

Page 62: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 62

The Adaptation Pattern (cont’d)C

oll

abo

rati

on

Kernel

Agent Beliefs

nameaddAdapter()removeAdapter()notifyAdapters()

PrimitiveBeliefs

CompositeBeliefs

update()

Observable

addAdapter()removeAdapter()notifyAdapters()

Adapter

adapt()

Observer

goalsplansadaptersaddAdapter()removeAdapter()notifyAdapters()addAgent()removeAgent()executePlan()...

RolecollaboratingAgentscollaborationProtocoladaptersaddAdapter()removeAdapter()notifyAdapters()addAgent()…

Chair

paperssubmissionDeadlinereviewDeadlineaddAgent()removeAgent()…

Reviewer

MyPaper

new()coauthorskeywordspublisherstatus

chairtoReviewPapersreviewDeadlinefillForm()updateForm()getChairName()…

Legend:

Adaptation Concern

Page 63: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 63

The Adaptation Pattern (cont’d)

• Solution

BehaviorAdapation

adapters

adaptBelief()findPlan()adaptSpecificBelief()findSpecificPlan()

Agent

Belief

knowledgeelementsobserved

Aspect

newGoal_()failedPlan_()planFinal_()

changedBelief_()newMsg_()

KnowledgeAdaptation

Adaptation

executePlan()

Plan

Agent

setGoal()

Adapter

adapt() Legend:

_beforeAdvice afterAdvice_ _aroundAdvice_

Page 64: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 64

Method Evaluation

• 4 qualitative studies and 1 quantitative study• 3 prototypes in different application domains• Portalware URL: www.teccomm.les.inf.puc-rio.br/alessandro/portal.zip

• ExpertCommittee URL: www.teccomm.les.inf.puc-rio.br/alessandro/ec.zip

• Aspect-oriented metrics suite– Cohesion, coupling, size, separation of concerns

1. Sant'Anna, C., Garcia, A., Kulesza, U., Lucena, C., Staa, A. Design Patterns as Aspects: A Quantitative Assessment. Proceedings of the SBES’04, Brasília, Brazil, October 2004.2. Garcia, A. et al. Separation of Concerns in Multi-Agent Systems: An Empirical Study. In: "Software Engineering for Multi-Agent Systems II", Springer-Verlag, LNCS 2940, State-of-the-Art Survey, January 2004, pp. 49-72.3. Sant’Anna, C., Garcia, A., Chavez, C., Lucena, C., Staa, A. On the Reuse and Maintenance of Aspect-Oriented Software: An Assessment Framework. Proceedings of the SBES’03, Manaus, Brazil, October 2003.4. Garcia, A., Chavez, C., Torres, V., Lucena, C. Engineering Multi-Agent Systems with Patterns and Aspects. Journal of the Brazilian Computer Society, SBC, Number 1, Volume 8, July 2002, pp. 57-72.

Page 65: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 65

Ongoing Research on Aspect-Oriented Agents

• The generative approach

• More experimentation

• Refinement of patterns (ex: learning and mobility)

Page 66: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 66

Technology Evaluation

Trading Agent Competition

• The Trading Agent Competition (TAC) is an international forum designed to promote and encourage high quality research into the trading agent problem.

• The scenarios– TAC Classic - a "travel agent" scenario based on complex

procurement on multiple simultaneous auctions – TAC SCM - a PC manufacturer scenario based on sourcing of

components, manufacturing of PC's and sales to customers

• The TAC 2004 is the fifth event (Classic).

• The TAC research community:– USA, Canada, Mexico, Brazil, France, UK, Sweden, Netherlands,

Germany, Turkey, Israel, Macau, China, Japan, Australia, etc.

Page 67: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 67

TAC Classic

Page 68: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 68

TAC – Trading Agent Competition

Position Agent AffiliationAverage

ScoreGamesPlayed

1 whitebear04 Cornell University, USA. 4122.11 35

2 Walverine University of Michigan, USA 3848.97 35

3 LearnAgents PUC-Rio, Brazil. 3736.62 35

4 SICS02 SICS, Sweden. 3708.24 35

5 NNN Hebrew University, Israel. 3665.97 35

6 UMTac-04University of Utrecht,

Netherlands.3281.43 35

7 Agent@CSEThe Chinese University

of Hong Kong, China.3262.51 35

8 RoxyBot Brown University, USA. 2015.02 35

Final Scores for TAC CLASSIC (2004).

Page 69: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 69

LearnAgents – A Multi-Agent System for the TAC Classic

CorporateKnowledge

Base

Flight, Hotel, and Ticket Negotiators

Flight, Hotel, and Ticket Sensors

Flight and HotelPrice Predictor

Ordering Agents (Flight & Hotels, Tickets)

Allocator Master+

Allocator Slaves

MonitorAgent

Page 70: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 70

LearnAgents – A Multi-Agent System for the TAC Classic

CPU 1

• Flight, Hotel, Ticket Sensors (3)– Update Prices in the Knowledge Base– Filter the events from the environment

• Flight and Hotel Price Predictor (2)– Flight: Maximum Likelihood– Hotel: Moving Average

• Allocator Master (1)– Calculates 50 allocations per minute– Integer Programming

• Ordering Agent (2)– Decide which allocation to use, and

decides the next strategy.• Flight, Hotel and Ticket Negotiators

(28)– Negotiates based on the strategy

defined by the Ordering Agent– Hotel: MiniMax, Neural Network,

Temporal Difference Learning, LMS Learning

CPU 2

• Monitor Agent (1)– Stores important data from

each agent– Monitor the Performance of

each Agent and the Agency

CPU 3

• Allocator Slave (2)– Calculates Ticket Allocation– Calculates High Price– Integer Programming

Page 71: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 71

• Parameters of the Agents

• Tuning

• Monitor the Performance of each Agent

• Monitor the Performance of the Agency

Page 72: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 72

Some Future Directions at LES

• The generative approach

• Law governing in Multi-agent systems

• Architectures– Component-based– ASF Framework (MAS-ML-based)

• Tool support

• Case study development

Page 73: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 73

Technology Transfer: MindsatWork Ltda.

• Agent-Based WebClipper (instance of a Multi-Agent based Framework)

• A Multi-Agent Based Architecture for the Development of Control and Acquisition Systems (Petrobras, Biogenie)

Page 74: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 74

Technology Transfer: Modulo Security Solutions S.A.

• A Multi-Agent System for Monitoring News about Information Security

• An Agent-Based Remote Analysis of the Vulnerability of a Computer System.

Page 75: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 75

Conclusions

Software Everywhere

Development and adoption of agent technology

• We are in the infancy of SELMAS

Page 76: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 76

References

• TAO Conceptual FrameworkV.T. Silva, A. Brandão, C. Chavez, C. Lucena, P.S.C. Alencar.

Taming Agents and Objects in Software Engineering. In: A. Garcia, et al. (eds.) Software Engineering for Large-Scale Multi-Agent Systems. Lecture Notes in Computer Science, LNCS 2603, 2004, pp. 1-26.

• ANoteR. Choren, C. Lucena. Modeling Multi-agent Systems with

ANote. Journal on Software and Systems Modeling, 2004.R. Choren, C. Lucena. Agent-Oriented Modeling Using ANote.

Proceedings of the 3rd International Workshop on Software Engineering for Large-Scale Multi-Agent Systems, SELMAS, 2004, pp. 74-80.

Page 77: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 77

References (cont’d)

• MAS-MLV.T. Silva, C.J.P. Lucena. From a Conceptual Framework to a

Multi-Agent System Modeling Language. Journal of Autonomous Agents and Multi-Agent Systems, 9(1/2), 2004, pp. 145-189.

V. Silva, R. Choren, C. Lucena. Using the MAS-ML to Model a Multi-Agent System. In: C. Lucena et al. (eds.) Software Engineering for Multi-Agent Systems II. Lecture Notes in Computer Science, LNCS 2940, 2004, pp. 129-138.

• The Aspect-Oriented Architectural MethodA. Garcia, C. Lucena, D. Cowan. Agents in Object-Oriented

Software Engineering. Software: Practice and Experience, Elsevier, 2004, pp. 1-32.

A. Garcia, et al. An Aspect-Based Approach for Developing Multi-Agent Object-Oriented Systems. Proceedings of the 15th Brazilian Symposium on Software Engineering, SBES, 2001, pp. 177-192.

Page 78: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 78

References (cont’d)

• The Aspect-Oriented Agent ArchitectureA. Garcia, U. Kulesza, C. Lucena. Separation of Concerns in

Open Multi-Agent Systems: An Architectural Approach. Proceedings of the 3rd International Workshop on Software Engineering for Large-Scale Multi-Agent Systems, SELMAS, 2004, pp. 120-129.

• Case StudiesK. Silva, R. Choren, C. Lucena. Applying A Note to modeling

Multi Agent Systems - A Case Study in E-Business. Proceedings of the IASTED International Conference on Software Engineering, SE, 2004, pp. 148-167.

F. Melo, et al. Deploying Agents with the CORBA Component Model. In: W. Emmerich, A.L. Wolf (eds.) Component Deployment. Lecture Notes in Computer Science, LNCS 3083, 2004, pp. 234-247.

Page 79: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 79

References (cont’d)

• Case Studies (cont’d)V. Silva, R. Choren, C. Lucena. A UML Based Approach for

Modeling and implementing Multi-Agent Systems. Proceedings of the 3rd International Conference on Autonomous Agents and Multi-Agent Systems, AAMAS, 2004.

A. Garcia, et al. Engineering Multi-Agent Systems with Aspects and Patterns. Journal of the Brazilian Computer Society, Special Issue on Software Engineering and Databases, 8(1), 2002, pp. 57-72.

A. Garcia, et al. Separation of Concerns in Multi-Agent Systems: An Empirical Study. In: C. Lucena, et al. (eds.) Software Engineering for Multi-Agent Systems II. Lecture Notes in Computer Science, LNCS 2940, 2004, pp. 49-72.

Page 80: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 80

References (cont’d)

• TACJose Alberto R. P. Sardinha, Ruy L. Milidiú, Carlos J. P. Lucena,

Patrick M. Paranhos, Pedro Cunha. LearnAgents - A multi-agent system for the TAC Classic. Poster Session at AAMAS'2004 - Trading Agent Competition, New York, NY, July 2004.

Jose Alberto R. P. Sardinha, Alessandro F. Garcia, Carlos J. P. Lucena, Ruy L. Milidiú. On the Incorporation of Learning in Open Multi-Agent Systems: A Systematic Approach. Sixth International Bi-Conference Workshop on Agent Oriented Information Systems(AOIS-2004) at CAiSE 2004, Riga, Latvia, Jun 2004. (to appear)

Page 81: Ongoing Research on Software Engineering for Multi-Agent Systems Carlos José Pereira de Lucena lucena@inf.puc-rio.br Software Engineering Lab (LES) – PUC-Rio

Software Engineering Lab (LES) – PUC-Rio 81

Thank You

Prof. Carlos José Pereira de [email protected]

Software Engineering Lab (LES)http://www.les.inf.puc-rio.br