[communications in computer and information science] networked digital technologies volume 88 ||...

9
Agent Behavior Diagram for Intelligent Agents Michal Radeck´ y, Petr Gajdoˇ s, and Radoslav Fasuga Department of Computer Science, FEI, VSB - Technical University of Ostrava, 17. listopadu 15, 708 33, Ostrava-Poruba, Czech Republic {michal.radecky,petr.gajdos,radoslav.fasuga}@vsb.cz Abstract. This paper describes our approach of modeling and devel- oping Multi-Agent System (MAS) which extends traditional approach of process modeling. An Extended UML Activity Diagram has been pro- posed. Mentioned diagram makes the basis of the specification of agents behaviors and plays an important role within the process of agent recon- figuration. Keywords: Agent, ABD, Agent Behavior Diagram, UML, Activity Diagram. 1 Introduction The MAS technology is quite youthful field of computer science that occurs on the borders where “Software Engineering”, “Artificial Intelligence” and other computer, natural and social science areas meet. The MAS technology is based on the concepts of the Complex Systems (e.g. macromolecules, ants colony, eco- nomical systems), and on the facilities and capabilities of software information systems [2][11][12][13]. The MAS can be formed as a general information system that is composed from a number of autonomous elements (called Agents ). In this context, the Multi-agent System is a framework for agents, their lives, their communication and mobility and it is an environment where the goals of the particular agents should be obtained too. From the perspective of the standard information sys- tems, the Agent are components of such systems. These components have spe- cial features like autonomy or intelligence, which is consistent with the essential properties of MAS. The typical applications of this Multi-agent technology are the large systems with a big volume of decentralization and autonomy of their elements. The overall behavior of whole system that is based on the MAS tech- nology is formed by internal behaviors; by internal processes in the context of this research, of several elements (agents) and also by the communication between all of these elements. This paper covers research concerned with the internal agent specification based on processes inspired by standard business process approach. The main aim of this research is to offer the tool for modeling agent behaviors which should be close to common users without special knowledge about MAS. On the other hand, this modeling approach should be formed on the formal grounds that offer wide utilization. F. Zavoral et al. (Eds.): NDT 2010, Part II, CCIS 88, pp. 333–341, 2010. c Springer-Verlag Berlin Heidelberg 2010

Upload: eyas

Post on 08-Dec-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

Agent Behavior Diagram for Intelligent Agents

Michal Radecky, Petr Gajdos, and Radoslav Fasuga

Department of Computer Science, FEI, VSB - Technical University of Ostrava,17. listopadu 15, 708 33, Ostrava-Poruba, Czech Republic{michal.radecky,petr.gajdos,radoslav.fasuga}@vsb.cz

Abstract. This paper describes our approach of modeling and devel-oping Multi-Agent System (MAS) which extends traditional approach ofprocess modeling. An Extended UML Activity Diagram has been pro-posed. Mentioned diagram makes the basis of the specification of agentsbehaviors and plays an important role within the process of agent recon-figuration.

Keywords: Agent, ABD, Agent Behavior Diagram, UML, ActivityDiagram.

1 Introduction

The MAS technology is quite youthful field of computer science that occurs onthe borders where “Software Engineering”, “Artificial Intelligence” and othercomputer, natural and social science areas meet. The MAS technology is basedon the concepts of the Complex Systems (e.g. macromolecules, ants colony, eco-nomical systems), and on the facilities and capabilities of software informationsystems [2][11][12][13].

The MAS can be formed as a general information system that is composedfrom a number of autonomous elements (called Agents). In this context, theMulti-agent System is a framework for agents, their lives, their communicationand mobility and it is an environment where the goals of the particular agentsshould be obtained too. From the perspective of the standard information sys-tems, the Agent are components of such systems. These components have spe-cial features like autonomy or intelligence, which is consistent with the essentialproperties of MAS. The typical applications of this Multi-agent technology arethe large systems with a big volume of decentralization and autonomy of theirelements. The overall behavior of whole system that is based on the MAS tech-nology is formed by internal behaviors; by internal processes in the context of thisresearch, of several elements (agents) and also by the communication between allof these elements. This paper covers research concerned with the internal agentspecification based on processes inspired by standard business process approach.The main aim of this research is to offer the tool for modeling agent behaviorswhich should be close to common users without special knowledge about MAS.On the other hand, this modeling approach should be formed on the formalgrounds that offer wide utilization.

F. Zavoral et al. (Eds.): NDT 2010, Part II, CCIS 88, pp. 333–341, 2010.c© Springer-Verlag Berlin Heidelberg 2010

Page 2: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

334 M. Radecky, P. Gajdos, and R. Fasuga

2 Modeling of the Agent Behavior

Each agent is determined by its own objectives and the way to meet these ob-jectives is founded on the internal behavior of a given agent. From our pointof view, the internal behavior of such agent is specified by the algorithm – anorder of activities, conditions, forks, sub-algortihms, etc. The term algorithm issimilar to a business process term according to this research. The agent lives,behaves and reacts to stimulus and environment, according to the requirementsof the algorithm. Any agent in the MAS has the main internal life process conse-quent on the agent’s classification from the reactive and proactive point of view.It is necessary to take into account the fact that each agent is an absolutelyautonomous element of MAS and thus the internal behavior have to be basedonly on the processes, activities, knowledge and facilities that belong to a givenagent. Then, the result behavior of whole MAS is formed by communication ofseparated agents and by the interconnection of several internal agent behaviors.This interaction is realized through the use of message passing adapted to thedemands of MAS.

In the context of MAS modeling and agents behavior, the term Agent ex-presses only the “type of agents”. The real separate agents are the instancesof this type. It is analogous with the terms Class and Object from the objectoriented approaches. The real agents (instances of agent Classes) are not issuesof MAS design and modeling phase but they will appear in the implementationphase, simulation and operation of a given MAS.

2.1 Agent Behavior Diagram

The UML (Unified Modeling Language) is an essential tool suitable for processmodeling. This standardized methodology is, both on the business level andanalytic level of description [7,9]. It can be applicable for modeling of the in-ternal behavior of agents as well. However, traditional UML approach can betoo complex to express a simple communication pattern among agents. Thisusually results in unclear formalization of activity diagrams. Proposed AgentBehavior Diagram comes from UML activity diagram and uses Petri Nets forits formalization.

The Agent Behavior Diagrams could contain all the elements of the standardUML Activity Diagrams, and moreover some new elements that can be usedin the agent modeling process. These new elements are primary concerned withmessage passing between agents or with other specific attributes of MAS. In earlyphases of development, these extensions are supported by the implementation ofspecial “send/receive activities” which include an additional information aboutmessage content and message receiver/sender identification, see the Figure 1.The decision elements from standard activity diagrams are improved too. Acomplex example of utilization of a mentioned elements is depicted on Figure 2.

The modified “decision elements” and their output edges can hold the ex-tra information. This information is usable for message-based determination offollowing control flow of the behavior led to the agent’s objectives.

Page 3: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

Agent Behavior Diagram for Intelligent Agents 335

getAgentNameAgent_B

Identification of the Agent (type of agents) acts in thereceiver role during this communication. The receiver can be just one instance of Agent type (Agent_B) or all instances of a given Agent type ([Agent_B]).

Envelope icon for send/receive activity indication.Main activity element shape

with the name of the sended message. This name

represents the message that is unique in the whole MAS.

getAgentNameAgent_A

The illustration of branching based on incoming message

and standard decision element.

Main activity element shape with the name of the

received message. The name of this activity can be

real name of received message (in the case of

one-to-one communication) or it can be replaced by

“<<unknown>>” string in the case of multiple or unknown

messages receiving.

<<unknown>><<undefined>>

<<unknown>>Agent_A

[msg: getAgentName from: Agent_A] [msg: getColor

from: Agent_A]

Identification of the Agent acts in the sender role. This name of agent can be replaced by the “<<undefined>>” string in the case of receiving message from unknown or multiple sources.

Fig. 1. The stereotypes of the new communication activities and illustration of decisionpoint. These send/receive activity nodes are able to use beside the other standard activ-ity and process elements. Internal implementation of these new activities is concernedonly with preparation, en/decapsulation and receiving/sending of the message.

2.2 Rules and Relation to the WF-Nets

A couple of rules are bound together with creation process of these diagrams. Atfirst, each process, as well as diagram, have to have just one “initial node” andjust one “final node”. This prerequisite is necessary for the further connectionof the processes together to model overall agent behavior. The demand of the“well-formed” diagrams is also required. There is a set of general structuralrules (e.g. the level of split/join nodes preservation, no crossing of the levels ofcontrol flow) that should be kept in mind during the drawing of diagrams [1].These rules are inspired by WF-Nets that bring ABD close to the Petri Nets.It is able to verify them, to transform them to other forms or to process themby several formal tools. The transformation is not so tricky. The activities andsub-processes are linked to transitions with control-flow places and input/outputobjects are transformed to places. The parts where the messages are received or

Page 4: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

336 M. Radecky, P. Gajdos, and R. Fasuga

Fig. 2. Example of agent internal process modeled by ABD. Special elements for send-ing and receiving of messages are there, as well as decision element with communicationbased conditions. Also, the extended activity and sub-process elements with definitionof input and output objects are placed within this process model. It illustrates Caragent behavior during parking process.

sent can be a more complex, it is necessary to add some special transitions tothe net. The Figure 3 shows an example of mapping a part of ABD to WF-Net- Petri Net. The transformation of control flow is simple and fully covers controlstructures from ABD, it is activities and subprocesses are transitions with placesbetween them. If the activities or subprocesses are generators or consumers of aset of objects, it is necessary to add object flow into the WF-Net too.

Thanks to these rules, the well applicable and formalized expressions of al-gorithms are obtained. This example is based on the internal process, model ofinternal agent behavior, described by ABD. The presented two elements are theparts of the Car agent behavior during parking process.

The simple, clear and formal definition of the internal agent behavior is aprecondition for moving to the next phases of the multi-agent software process.Thanks to the new stereotypes established in the Agent Behavior Diagram andother additional information, it should be able to generate other types of dia-grams (e.g. sequential diagrams, maps of the agents communication) as well asthe source code templates of the agents and MAS automatically (e.g. interfaces ofagents, class and method templates, BPEL specification [8]). As it is mentioned

Page 5: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

Agent Behavior Diagram for Intelligent Agents 337

I_WOULD_LIKE_TO_PARK[ParkingAgent]car

destination=>

=>msg: SORRY_YOU_ARE_LATEagent: ParkingAgent

msg: OK_USE_PARKPLACEagent: ParkingAgent

Parking<<local>>

carparkplace

car#1: AfterParking

<<unknown>>ParkingAgent

FindingAnotherParkingRange<<local>>

car

car parkplace

#1: NewParkingFound

Receive Msg

Parsing Msg content

Parking FindAnotherParkingRange

parkplace

car

Msg from ParkingAgent

Msg: OK_USE_PARKPLACESender : ParkingAgent

Msg: SORRY_YOU_ARE_LATESender : ParkingAgent

Msg: PARKING_IS_FULLSender : ParkingAgent

Msg: HELLOSender : CarAgent

control-flow condition based on agiven instance of received message

Prepare message

destination

Send message

Msg: I_WOULD_LIKE_TO_PARKReceiver: all ParkingAgents

car

Fig. 3. Example of transformation ABD to WF-Net. Additional places (orange places)are there to provide mapping of input and output objects of activities. It is necessary todistinguish pure control-flow (bold solid lines) of Petri Net theory and object instancesflow (gray dotted lines).

above, the agent internal behavior is specified by the algorithms expressed in theprocesses. Primary, each process is modeled as just one agent Behavior Diagrambased on UML Activity Diagram. Fortunately, the process can be specified bymore than one diagram in the case of multiple Realizations belong to a givenprocess too. The Realizations are the topic of the following text.

3 Internal Agent Structure

Each agent must try to realize its tasks and to solve the upcoming situations inorder to meet its design objectives during its life. From this point of view, thestandard agent is consisted in definite and constricted description of its behav-ior already defined during the modeling phase of the agent. Therefore, there isno way to change the behavior during the agent running. It is able to do this,in the case of Intelligent agent. Such type of agents is based on the main lifeprocess model that specifies just the framework of its behavior. The agent candynamically change the pieces of its own behavior according to the situations.This principle is denoted as behavior reconfiguration approach. The process of re-configuration is founded on the replacement of a given part of the whole agent’sprocess by another one that is the most suitable for current situation and con-ditions. A set of possible applicable behaviors, called Realizations (defined by

Page 6: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

338 M. Radecky, P. Gajdos, and R. Fasuga

Action/Reaction

Agent A

PrimaryProcess

Process 2

Agent B

PrimaryProcess

Process 2

Global Process Repository

Process 5

Process 4 Process 6

restricted extended

Process 1

Process 1

Process 1

Process 3

Process 3Process 3

Fig. 4. Structure and hierarchy of realization specification within agent and MAS itself

agent Behavior Diagram), of each “reconfiguration” point (generally the sub-process node of activity diagrams) is defined for this purpose. These definitionsof the behavior can be distributed on the whole MAS as definitions of processrealizations. They can be saved in some global repository or within the particu-lar agents; actually they can be deliberated in the real-time too. Every process,expect the Primary process, can be specified by more than one diagram (see theFigure 4). Then, each diagram describes one Realization of a given process. Real-izations depend upon knowledge, experiences, environment and states of agents.The Realizations can be stored within agent internal knowledge base or globalMAS repository. Moreover, the agents can extend own sets of Realizations thanksto communication and cooperation with other agents and/or platform facilities.This feature enables agents to learn. The Figure 4 illustrates an example of thestatic processional structures of two agents and global repository. Each agentmust have one Primary process that covers whole life of a given agent. This pri-mary process and its Realization are unique in the context of a given agent. TheABD is able to be transfered between agents and thanks to this they are ableto extend their knowledge base of Realizations. Some principles of inheritancecould be applied there, like extensions or restrictions of a set of Realizations foreach agent.

3.1 Intelligent Selection of Process Realization

The behavior reconfiguration approach represents the way how to implementintelligent agents with respect to processes [4,14]. The idea behind the reconfig-uration comes from the hypothesis, that each sub-process (reconfiguration point)

Page 7: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

Agent Behavior Diagram for Intelligent Agents 339

Control Flow of the AgentBehaviorin the moment of reconfiguration

Processes = Reconfiguration Points

Current position in the Behavior

Applicable Realizationsof a given Process

The most suitableRealization

Control Flow of the AgentBehaviorafter the reconfiguration

All Realizations relatedto a given Process

InapplicableRealizations

Fig. 5. Reconfiguration approach during agent life

can be realized by different ways – Realizations. Reconfiguration algorithm isapplied in time of process firing. Each process requires a set of input objects andcan produce the outputs. The same holds for the Realizations. The ability toconnect these autonomous specifications together (link initial and final elementwith another processes) is provided by rules of ABD construction mentionedabove.

The figure 5 depicts the basic scheme of mentioned reconfiguration method.At the beginning, the set of all processes and their Realizations is defined. Basedon reconfiguration point (process resp. sub-process element of parent behavior– ABD), a set of matching Realizations is formed. Next, the selection phaseis initiated. Depicted selection consists of two steps. The first one represents asimple selection of applicable Realizations, based on input objects occurrences.The second one chooses the most suitable Realization according to input objectsproperties, scores, etc. Methods of multicriterial analysis or logical tools can beused during the selection phase.

The important and expected situation will appear whenever one process cor-responds to the two or more Realizations. The logic tools are responsible forsolving this situation. But before this state, it is necessary to find the Realiza-tions which are applicable to the reconfiguration of a given process. For thispurpose, there are two ways to find them – selection based on the process or onthe logic grounds. The combination of the process and logic approach in recon-figuration algorithm seems to be more effective due to the ability to choose thebest Realization. Simple process approach is not able to select the Realization independence on inner set of properties owned by agents or Objects. On the otherhand, the logic approach is not able to discard all Realizations which cannot beexecuted at the time of Process firing.

Page 8: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

340 M. Radecky, P. Gajdos, and R. Fasuga

Pursuant to these ideas, it is able to define such procedure as an algorithm ofreconfiguration process:

1. The Specification Phase - definition of all Realizations related to the Processthat could be reconfigured.

2. The Selection Phase - checking of the applicable Realizations of a givenProcess and finding the most suitable one.(a) the selection of applicable Realizations - based on Input Objects occur-

rence(b) the finding the most suitable Realizations - based on Input Objects values

and properties, Scores, etc.3. The Execution Phase - chosen Realization firing.

4 Conclusion and Future Work

The extended UML diagrams (ABD) were used to model agents’ behaviors. Thereconfiguration principles were developed and implemented in a new applicationcalled AgentStudio (Designer and Simulator). As case studies, we developedtwo applications “Car Parking System” and “Road Traffic Control System” [3,5]which are based on mentioned approach. The future work attention has to bepaid to imperfect and vague information, its sharing and knowledge storing.Automatic code generation must be improved to reduce human work duringMAS development. Mentioned modeling approach is not a complex methodologyfor MAS development, so it is not a full-value competitor to a huge approachesas Gaia, AUML, Prometheus, etc. The contribution of this modeling approachis focused on understandable and utilizable way to describe the agents behaviorand to communication among the actors of MAS development process.

References

1. van der Aalst, W.M.P.: Verification of Workflow Nets. In: Azema, P., Balbo, G.(eds.) Application and Theory of Petri Nets 1997, pp. 407–426. Springer, Berlin(1997)

2. Kubik, A.: Intelligent Agents. Computer Press, Prague (publication in czech lan-guage)

3. Radecky, M., Gajdos, P.: Traffic Simulation and Intelligent agents. In: Sbornık -IEEE: ICITST 2009, London, pp. 127–132. IEEE, Los Alamitos (2009)

4. Radecky, M., Gajdos, P.: Reconfigurable Intelligent agents. In: Sbornık UKSim2008, pp. 543–548. IEEE, Cambridge (2008)

5. Radecky, M., Gajdos, P.: Intelligent agents for Traffic Simulation. In: SbornikSpringSim ADS 2008, Ottawa, pp. 109–115 (2008), ISBN 1-56555-319-5

6. Radecky, M., Gajdos, P.: Process and Logic Approaches in the Inelligent agentsBehavior. In: Duzı, M., Jaakkola, H., Kiyoki, Y., Kangassalo, H. (eds.) SbornıkInformation Modelling and Knowledge Bases XVIII, pp. 295–300. IOS Press, Am-sterdam, ISBN 978-1-58603-710-9

7. Vondrak, I.: Methods of Business Modeling. VSB-TUO, Ostrava (2004) (lecturenotes in Czech)

Page 9: [Communications in Computer and Information Science] Networked Digital Technologies Volume 88 || Agent Behavior Diagram for Intelligent Agents

Agent Behavior Diagram for Intelligent Agents 341

8. Matjaz, B.J.: Business Process Execution Language for Web Services BPEL andBPEL4WS, 2nd edn. Packt Publishing, Birmingham (2006)

9. Pilone, D., Pitman, N.: UML 2.0 in a Nutshell. O’Reilly Media, Sebastopol (2004)10. Wooldridge, M., Jennings, J.R.: Intelligent agents - Theories, Architectures and

Languages. Springer, Heidelberg (1995)11. Namee, B.M.: A Proposal for an Agent Architecture for Proactive Persistent Non

Player Characters (2001),http://www.cs.tcd.ie/publications/tech.reports/

reports.01/TCD-CS-2001-20.pdf

12. Zambonelli, F.: Developing Multi-Agent Systems: The Gaia Methodology,vol. 12(3). ACM, New York (July 2003)

13. Ferber, J.: Multi Agent Systems. In: An introduction to Distributed Artificial In-telligence. Addison-Wesley Professional, Reading (1993), ISBN 978-0201360486

14. Radecky, M., Gajdos, P.: Process and Logic Approaches in the Inelligent agents Be-havior. In: Du, M., Jaakkola, H., Kiyoki, Y., Kangassalo, H. (eds.) Sbornk Informa-tion Modelling and Knowledge Bases XVIII, pp. 295–300. IOS Press, Amsterdam,ISBN 978-1-58603-710-9