agentzero: a framework for simulating and …am/media/publications/agentzero...agentzero: a...

15
AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit, and Amnon Meisels Department of Computer Science Ben-Gurion University of the Negev, Be’er-Sheva, Israel {bennyl,levitv,am}@cs.bgu.ac.il Abstract. Applications of Multi-Agent Systems (MAS) are versatile, from solving distributed combinatorial problems through playing graph- ical games, to performing agents-based simulation. The present paper discuss a new versatile MAS simulation and analysis tool which has several specialized APIs focuses on a specific application domains like Distributed Constraint Reasoning (DCR), Game Theory, ABM, etc. AgentZero is specifically designed for the specification, implementation, and evaluation of distributed algorithms and simulation. AgentZero pro- vides full support to researchers in the form of an extensive agent-based environment for algorithmic research that includes a distributed run-time environment, built-in performance measures that are automatically used by all algorithms, and visualization tools that help design and understand the behavior of complex scenarios. The API of the AgentZero simulator is described and important architectural decisions that enable analysis and smooth implementation of a variety of algorithms are explained and described. In the context of agent-oriented software engineering (AOSE), AgentZero exemplifies two aspects: an agent-based simulation environ- ment and tools, and a variety of development and runtime aids for agent- based algorithms and systems. Keywords: Simulator · Multi-agent system · Distributed constraint rea- soning 1 Introduction A Multi-Agent System [1] (MAS) is a distributed system composed of multiple autonomous agents. An agent is an independent software entity which strives to reach a goal; the goal can be either private or shared by several agents. To reach its goal, an agent can communicate with other agents by using message passing. An agent has its own local memory and in most cases the information that an agent holds can be classified into the following categories: public data – which the agent is willing to share with other agents; private data – which the agent would like to keep for itself; and tradable data – which is kept private but can be traded with other agents with the purpose of influencing them to perform a desired action.

Upload: others

Post on 22-May-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for Simulating andEvaluating Multi-Agent Algorithms

Benny Lutati, Vadim Levit, and Amnon Meisels

Department of Computer ScienceBen-Gurion University of the Negev, Be’er-Sheva, Israel

{bennyl,levitv,am}@cs.bgu.ac.il

Abstract. Applications of Multi-Agent Systems (MAS) are versatile,from solving distributed combinatorial problems through playing graph-ical games, to performing agents-based simulation. The present paperdiscuss a new versatile MAS simulation and analysis tool which hasseveral specialized APIs focuses on a specific application domains likeDistributed Constraint Reasoning (DCR), Game Theory, ABM, etc.AgentZero is specifically designed for the specification, implementation,and evaluation of distributed algorithms and simulation. AgentZero pro-vides full support to researchers in the form of an extensive agent-basedenvironment for algorithmic research that includes a distributed run-timeenvironment, built-in performance measures that are automatically usedby all algorithms, and visualization tools that help design and understandthe behavior of complex scenarios. The API of the AgentZero simulatoris described and important architectural decisions that enable analysisand smooth implementation of a variety of algorithms are explained anddescribed. In the context of agent-oriented software engineering (AOSE),AgentZero exemplifies two aspects: an agent-based simulation environ-ment and tools, and a variety of development and runtime aids for agent-based algorithms and systems.

Keywords: Simulator ·Multi-agent system · Distributed constraint rea-soning

1 Introduction

A Multi-Agent System [1] (MAS) is a distributed system composed of multipleautonomous agents. An agent is an independent software entity which strives toreach a goal; the goal can be either private or shared by several agents. To reachits goal, an agent can communicate with other agents by using message passing.An agent has its own local memory and in most cases the information that anagent holds can be classified into the following categories: public data – whichthe agent is willing to share with other agents; private data – which the agentwould like to keep for itself; and tradable data – which is kept private but canbe traded with other agents with the purpose of influencing them to perform adesired action.

Page 2: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

2 Benny Lutati et al.

Agent-oriented systems have many applications asides from Distributed Con-straint Reasoning [2]. In the robotics field for example, the agent-oriented ap-proach is used to coordinate robots performing complex actions cooperatively.In the navigation field – applications like Waze [3] are a multi-agent systemdesigned to help drivers navigate by sharing information available to differentagents. Managing and working with big data is also a field where the agent-oriented approach plays a crucial role. The Map Reduce paradigm [4] wheredifferent agents process different parts of the data in order to extract needed in-formation is becoming the de facto framework for storing and processing massivedata.

MAS applications deployment and testing are inherently complicated. Dis-tributed programming is a resource consuming task in terms of time and cost. Adistributed environment is hard to predict. Therefore when analyzing distributedalgorithms or applications one will have a hard time factoring out the influenceof the environment. An even harder task is to control the environment prop-erties in order to check the application under different conditions e.g., with orwithout message loss, with or without data corruption, varying network speed,etc. For these reasons, simulation tools form an important measure to be usedwhen developing and examining MAS applications and algorithms. This paperpresents an innovative general purpose multi-agent simulation environment thatincludes a convenient API for designing, implementing, and testing distributedagent based algorithms.

The AgentZero framework is a MAS simulator tailored for the research com-munity. The framework includes a convenient API for different disciplines (i.e.,DCR [5], Graphical Games [6], Agent-Based Modeling [7], stochastic MAS sim-ulations, etc.) which allows a mild learning curve of algorithm implementationand of behavior characteristics. Despite the offered simplicity, the framework al-lows its users a fine grained control over the simulated environment. In addition,AgentZero is bundled with a diverse set of features aimed to help its users studythe behavior and the impact of designed algorithms on diverse environments.An innovative feature of AgentZero is the ability to combine several disciplinestogether under a single simulation. For example, an Agents-Based Model can beconstructed that uses smart DCR-based agents running a search algorithm. Thiscan enable researchers to study the behavior and influence of smart agents onmodels that closely resemble real world problems.

The realm of multi-agents simulation has moved up in the last decade. Fromsupporting a multi-agents framework that enables programming and running theagents and communication among them, to the much wider world of enabling thedesign and analysis of complex distributed algorithms for multi-agents. Theseinclude a wide range of logical scenarios – from playing games on a graph of self-interested agents, to modeling simple reactive agents to a complex environment.

The generic and general concept of a multi-agents system is introduced in Sec-tion 2, by describing several common settings and properties of different multi-agent systems, as well as the way AgentZero realizes these settings. Section 3includes an example implementation of a DCR algorithm that uses AgentZero,together with a short explanation of the simulation behind the scenes. The de-

Page 3: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for MAS Simulation 3

tails of the simulated execution of AgentZero are briefly reviewed in Section 4,followed by a comparison of AgentZero to different tools that are available inthe MAS domain, in Section 5.

2 Common MAS Properties

A common MAS architecture entails the implementation of every agent as an au-tonomies application. Consequently, architectures for multi-agent systems com-monly include a message passing mechanism in support of agent communication.In most cases one can think about agents as if they each hold a partial view ofa large model, for example, in the DCR field each agent holds its local set ofconstraints which together represent a constraint satisfaction or optimizationproblem. One can think of game-theoretic agents (players) as each holding aset of actions and a partial view of the payoff function. ABM agents, althoughcommonly thought of as unrelated to the above two agent types, exhibit simi-lar characteristics where the large model is the world they are operating in andtheir local parts contain their individual properties. Correctly modeling the com-mon parts of the multi-agent architecture plays a key role in creating a generalpurpose MAS simulation and research framework like AgentZero.

2.1 Agents Cooperation and Privacy

A typical distributed multi-agent setting assumes that the knowledge of agentsabout their environment is limited in scope. Agents can influence the actionsof one another using message passing by exposing information, performing ne-gotiation, etc. The cooperation level of the agents varies. At one end there arefully cooperative agents that can be generally described as agents that agree tofollow a common protocol for the sake of a shared goal, while at the other endself-interested agents can be thought of as agents that try to maximize only theirown gain. Between these two ends reside the agents of Agents-Based Modeling(ABM [7]) which react to changes in their surrounding in a way that can bethought of as partially-cooperative.

2.2 Execution Modes

An important attribute of any multi-agent system is its mode of execution.There are two primary modes of execution: asynchronous, and synchronous [8].The asynchronous mode is the more general case. In this mode, there is noassumption of synchronization between the agents. The sent messages will getto their destination eventually. As in TCP [9], there are no assumptions onthe message ordering between different agents, but in case that an agent sendstwo messages one after the other to the same recipient – the message that wassent first will arrive first. This mode is similar to the way the internet networkoperates. The synchronous mode is an iterative-like mode, in a way of thinking.In this mode the agents operate in a round by round fashion. Any message sentat round i will reach its destination at round i+1. Agents are aware of the round

Page 4: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

4 Benny Lutati et al.

at which they operate and are assumed to process and respond to all messagesfrom round i before round i+1 starts. In a real network, a synchronous executioncan be achieved by using different a variety of synchronization techniques [10].This type of execution is applicable in many cases including computer games,online bidding, and stochastic simulations.

3 MAS Simulation via Agent Zero

AgentZero is a java-based, extensible MAS simulator and research tool. It pro-vides a simulated agent execution environment and application analysis support.It is composed of a high performance and modular execution system togetherwith an extensive set of analysis tools. The framework has several specializedAPIs already included (e.g., DCR, Game Theoretic, ABM, etc.) which make thedevelopment of related agents a breeze – more APIs are relatively easy to createby 3rd parties. AgentZero provides an intuitive programming API. It has thecapabilities to simulate a multi-agent environment on a single computer and toattach many types of statistical profilers, debug assisting tools and visualizationsinto the simulated environment. AgentZero has an advanced experiment defini-tion API which allows it users to easily create wide range of experiments andeven combine agents from different disciplines together (e.g., run ABM simula-tion on a predefined world, reduce the resulted world state to a DCOP problem,solve this problem, reduce the results back to a world state and continue theABM simulation) On this matter, AgentZero is a good example of practicalMAS development and engineering aids.

3.1 AgentZero modularity

In order for a simulator to be useful for a wide range of applications it must becapable of supplying generic services which can be applied to any agent-orientedapplication implemented on top of it. AgentZero’s design goal was to define widerange of generic services that can be automatically used by all implemented ap-plications and algorithms. These services, applied to a wide range of applicationswith different inherent structures, are the basis for the usability of the simula-tor as a research tool for investigating and performing comparative evaluationof agent-oriented driven applications. Principles of the design of AgentZero arelisted below:

– Simple agent design - following a simple API, the agent has access to a set ofcomprehensive utilities and can be implemented in a way that is indifferentto the execution mode and to the collected statistics. Fundamental actionsof the agents are automatically monitored by the system in order to provideuseful statistics – this reduces to a minimum the need to write code that isunrelated to the actual agent behavior.

– Powerful message passing mechanism – messages are passed by value andare conveniently handled in an RPC fashion; statistical message delays [11]can be applied in order to measure the application’s behavior under different

Page 5: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for MAS Simulation 5

network conditions without slowing down the actual execution. Additionalutilities included in the mechanism, e.g., automatic idle detection and mes-sage timestamps.

– Both Synchronous and Asynchronous executions are supported out of thebox. A lot of effort has made to optimize the execution system, it has theability to scale to a large number of agents (limited only by the machinememory). In addition it automatically adapt its CPU usage and executionstrategy to the algorithm it executing in order to achieve better performance.

– Generic performance measurements – Measuring performance of a distributedapplication is a crucial and challenging task. For example, the total executiontime of a distributed algorithm in a simulated environment provides littleinformation when the number of agents exceeds the number of concurrentcomputational cores in the system. Providing a measure of all non-concurrentactions (e.g., NCSC [12]) is both technically challenging and prone to mis-takes. In this respect, AgentZero provides standard, application independentmeasurements.

– Real incomplete information – A typical distributed multi-agent setting as-sumes that the knowledge of agents about their environment is limited inscope. In simulated agent-based environments (such as AgentZero), this lim-itation is enforced by the framework, leading to realistic implementation ofalgorithms and applications.

– General purpose tools and modules - as more algorithms and applicationsare introduced, the number of re-occurring parts used as building blocks,increases. These can include a set of preprocessing procedures, common datastructures, and benchmark problem structures. Providing such services, toolsand pluggable modules do more than just simplifying the work of applicationand algorithm designers; it also generates a common ground for the referenceresearch community to facilitate comparison among implementations.

3.2 DCR Agent Implementation Example

To comprehend how a good API can ease the pain of agent development andanalysis let us now step through an example of an implementation of a well-known DCR algorithm: SBT - Synchronous Back Tracking [13]. The algorithmassumes that constraints map join assignments to either “satisfiable” or “incon-sistent” constraints, which makes the problem a Distributed Constraint Satisfac-tion Problem. The SBT approach for solving this type of problem is the simplestpossible. This algorithm make the following common assumptions:

– Every agent handles only one variable (which means that in this simpleexample an agent and a variable can be treated as the same thing).

– The domain of the variables is represented as a set of natural numbers.– Only binary constraints are available in the given problem.– The agents are lexicographically ordered. That is, agent i precedes agent j

in the total ordering if i < j.

Given the previous assumptions, Algorithm 1 is the SBT pseudo code. Thealgorithm’s starting point can be seen in the initialize method. This method is

Page 6: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

6 Benny Lutati et al.

Algorithm 1: Synchronous Backtracking

Data: Code for agent controlling variable iProcedure initialize()

if first agent thenlet cpa be an empty partial assignmentassignCPA(cpa)

Procedure assignCPA(cpa)if exists v s.t. cpa ∪ {< i, v >} is consistent then

if cpa is complete thensend [“TERMINATE”, “SOLUTION FOUND”, cpa] to all agents

elsesend [“CPA”, cpa] to next agent

elsebacktrack(cpa)

Procedure backtrack(cpa)if first agent then

send [“TERMINATE”, “NO-SOLUTION”] to all agentselse

send [“BACKTRACK”, cpa] to previous agent

When Received CPA(cpa)assignCPA(cpa)

When Received BACKTRACK(cpa)remove local assignment from cpabacktrack(cpa)

When Received TERMINATE(reason, cpa)end agent execution

the first to be called by each agent; any other operations that the agent mayperform will be in response to receiving a message. The first agent initializes thesearch by creating a CPA, assigning its variable on the CPA and sending the CPAto the next agent. Every agent that receives the CPA tries to assign its variablewithout violating constraints with the assignments on the CPA. If the agentsucceeds to find such an assignment to its variable, it appends the assignmentto the tuple on the CPA and sends it to the next agent. If it cannot find aconsistent assignment, it sends the CPA back to the previous agent to change itsassignment, thus performing a chronological backtrack. An agent that receives abacktrack message removes the assignment of its variable and tries to reassign itwith a consistent value. The algorithm ends successfully if the last agent managesto find a consistent assignment for its variable. The algorithm realizes that nosolution exists if the first agent encounters an empty domain [13].

Written in Java, Algorithm 2 presents an SBT implementation correspondingto the pseudo code shown in Algorithm 1. The previously mentioned pseudo codeassumptions still apply and most of the algorithm’s pseudo-code can be directlytranslated into AgentZero API.

Page 7: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for MAS Simulation 7

Algorithm 2: Synchronous Backtracking - Agent Zero Implementation

public class SBTAgent extends DCRAgent {public void s t a r t ( ) {

i f ( i sF i r s tAgen t ( ) )assignCPA (new Assignment ( ) ) ;

}void assignCPA ( Assignment cpa ) {

for ( I n t e g e r v : getDomain ( ) )i f ( cpa . i sCons i s tentWith ( get Id ( ) , v ) ) {

cpa . a s s i g n ( get Id ( ) , v ) ;i f ( cpa . i s F u l l ( ) ) f i n i s h ( cpa ) ;else send ( ”CPA” , cpa ) . toNextAgent ( ) ;return ;

}backtrack ( cpa ) ;

}void backtrack ( Assignment cpa ) {

i f ( i sF i r s tAgen t ( ) ) f in i shWithNoSolut ion ( ) ;else send ( ”BACKTRACK” , cpa ) . toPreviousAgent ( ) ;

}@WhenReceived ( ”CPA” )void handleCPA ( Assignment cpa ) {

assignCPA ( cpa ) ;}@WhenReceived ( ”BACKTRACK” )void handleBacktrack ( Assignment cpa ) {

cpa . unass ign ( get Id ( ) ) ;backtrack ( cpa ) ;

}}

3.3 Implementation Details

The following covers the part of the API related to agent implementation as canbe seen in Algorithm 2. Agents in AgentZero extend the DCRAgent abstractclass – this class provides an extensive domain specific language for agents andthe following features:

– Single initialization point – every agent defines a start method which willget automatically called as soon as the agent is started.

– Message sending – using the API: send(< message−name >, < message−args >).to*(. . .). This send method is a variadic method which followsthe fluent API [14] characteristics and returns a mediation object whichallow the user to explicitly supply the message recepients using methodslike: toNextAgent, toNeighbores, etc.

Page 8: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

8 Benny Lutati et al.

– Message to method binding – in the above example one may notice the usageof the @WhenReceived(< message − name >) annotation. This syntaxwill cause the agent to automatically call the annotated method when amessage with name equals to the name specified in the annotation arrives.This behavior resembles RPC behavior, which makes it very easy to managemessages.

– Termination signaling – instead of handling the termination of the agentitself, the SimpleAgent includes many useful “finish*” methods which auto-matically broadcast a termination signal. Due to the fact that AgentZero is asimulated MAS environment, several of the “finish*” methods also supportsubmitting the algorithm’s results, which can then be tested for correctnessor aggregated into a final report.

– Automatic Statistic Collection – almost all known DCR related statisticmeasures are automatically and transparently collected – this allow the codeto stay true to the original pseudo-code without compromising analyzability.

4 Technical aspects of Simulated Execution

AgentZero simulates a complex MAS network using CPU user space threads.An extension that offers a limited execution on GPU threads (Kernels) is inprogress. In the following section, a technical overview of the execution simula-tion is described.

4.1 Underlying Execution Environment

In order to be able to transparently collect statistics and provide powerful exe-cution services AgentZero maintain a lightweight implementation of operating-system-like architecture. In its core, the execution system is a user-space-threadsimplementation along with a smart adaptive multi-threaded scheduler. This al-lows AgentZero to execute a virtually unlimited number of agents with goodperformance. When the execution starts, a configuration file (which is editablevia easy to use user interface) is read by the system, the configuration file de-scribes the existence of modules (which corresponds to kernel drivers) and theirneeded parameters. The configured modules are loaded into the system and getinitialized, then the pseudo-operating-system boots and starts to execute theagents. Since objects in java are passed by reference, to build a local agent mem-ory, all messages which are passed between agents are automatically deep-copied.This structure together with supporting modules allows AgentZero to supporta diversity of discipline-related MAS architectures. AgentZero comes bundledwith many module implementations, the module implementations themselvesare not closely coupled with the system, this makes the creation of new mod-ules and algorithms via 3rd party implementers very easy, as one needs not careabout the execution environment internal architecture and its comprising com-ponents. In fact, many of the modules which AgentZero comes bundled withwere contributed by the BGU DCR group members while working with the tool.AgentZero has an extensive documentation where you can find all the standardmodule names.

Page 9: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for MAS Simulation 9

4.2 Front-End

An important aspect which is often missed or neglected by other research toolsand MAS frameworks is the front-end and the ease of use both for new andfor advanced users. AgentZero walks the extra mile by providing simple andpowerful front end for developers and researchers.

Developement User Interface During the development phase, the developerhas certain needs that cannot be fully satisfied without a proper user interface.For example, to optimize the algorithm the developer has a need to watch sta-tistical data immediately after each execution. To debug the algorithm, it canbe helpful to be able to see the problem, view run-time logs and even sometimeslook at visualizations to better understand the way in which the algorithm works.AgentZero attempts at addressing all these needs via an interactive Eclipse plu-gin.

Visualizations One of the best ways for understanding how an algorithm (oran application) works is to observe visualizations which represent different pointsof view on the algorithm’s execution. An important feature of AgentZero is itsability to visualize the simulated environment. Visualizing an application exe-cution is a two steps process, analysis step and visualization step. The first stepincludes monitoring an execution by watching the side-effects it induces on theenvironment, marking important events and distributing them into continuousframes to be interpreted by the visualization step. In Synchronous executionthis step is relatively easy. In asynchronous mode where each agent uses its own“timezone” this step requires a much more complicated mechanism. AgentZeroalleviates the Non Concurrent Steps of Computation [12] (NCSC) statistic col-lection algorithm in order to associate events with frames. Each agent has itsown step count, when a message from agent with step-count i is received by asecond agent with step-count j AgentZero interpolates the events in betweenthis transition such that they are correctly associated to correct frames. Fig. 1shows one of AgentZero’s available visualizations - the network traffic visualiza-tion which allows the user to understand the impact that each agent has on thesimulated network.

Page 10: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

10 Benny Lutati et al.

Fig. 1. Network Visualization

5 Comparison to related MAS simulators

AgentZero is a relatively new addition to the available MAS tools in generaland to the DCR research field in particular. In the following we briefly describeseveral existing tools and compare them to AgentZero.

DisChoco [15] a Java platform for solving Distributed Constraints Reasoning(DCR) problems developed by Redouane Ezzahir and Mohamed Wahbi itcame with relatively extensive library of problem generators and uses aninternal communication simulator, it also has the ability to deploy the agentsin a real distributed system.

FRODO [16] is a Java open-source framework for distributed combinatorialoptimization, initially developed at the Articial Intelligence Laboratory (LIA)of cole Polytechnique Fdrale de Lausanne (EPFL), Switzerland. FRODOcomes with several built in algorithms and a suite of problem generators forbenchmarking.

MASS The Multi-Agent Simulation Suite (MASS[17]) is a software packageintended to enable modelers to utilize the tools of agent-based simulation invarious fields, without having to develop heavy programming skills using adedicated programming language. MASS is a generic MAS simulation suite.

In Table 1 we compare the different multi-agent simulation tools along vari-ous functionality, usability, and practical criteria. Our observations indicate thatAgentZero, although generic and applicable to many domains, specifically intro-duces benefits for the DCR simulation domain. Note that AgentZero supports

Page 11: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for MAS Simulation 11

most of the features provided by existing simulation tools and also provides asimple, extensive and better streamlined user experience and research facilities.

15

DisChoco FRODO MASS AgentZero

Fu

nct

ion

alit

y

Automatic statistic collection

Yes, but limited to

predefined set of

statistics

Yes, but limited to

predefined set of

statistics

No. Yes.

Execution modes – supported out of the box

Asynchronous. Asynchronous and

Synchronous.

Synchronous. Asynchronous and

Synchronous.

Extendibility of the system (without changing the actual framework code)

No. Possible, but

complicated.

Very extendible

via programming

and on some cases

via wizards.

Very extendible,

many module

types available.

Out-of-the box statistics, execution visualizations and tools

We were able to

find one visualiza-

tion, several statis-

tics.

No visualizations,

several statistics.

Contains a suite

for defining statis-

tics and visualiza-

tions by hand.

Several visualiza-

tions and statis-

tics.

Possibility to write non DCR related agents

Based on Choco

which is a general

MAS.

Yes. Yes. Yes.

Simulation of local memory on local execution

No, sharing point-

ers to messages.

No, sharing point-

ers to messages.

No. Achieved by deep-

copying the mes-

sages automatical-

ly.

Support for execution timeouts

Unknown. Yes – only in local

mode.

Yes. Yes.

Tools for analyzing results

The UI shows

some options but

they are not im-

plemented.

No. Yes. Yes.

Page 12: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

12 Benny Lutati et al.

16

Usa

bil

ity

Agent Programming Language

Java Java and XML FABLES (dedi-

cated language)

Java

Documentation

No. Yes, including

online tutorial.

Complete, also of-

fers courses for

paying customers

Yes, including

online tutorial.

Learning curve

Without documen-

tation – very

steep.

Steep. Moderate-steep,

requires learning a

new programming

language and for

some operations

Java knowledge is

still required.

Moderate.

Open source

Yes Yes The source is

available for pay-

ing customers.

Yes

User interface installation and overall usage

Desktop applica-

tion – our version

were mostly non-

functional and suf-

fer from frequent

crushes.

Desktop applica-

tion – we didn’t

find it developer

friendly.

Eclipse integration

for development

and desktop appli-

cation for working

with the execution

itself. Overall the

UI looks com-

plete.

Eclipse plugin

worked well. The

desktop user inter-

face is helpful for

new users.

Page 13: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for MAS Simulation 1317

Dis

trib

ute

d S

earc

h S

pec

ific

Ability to reproduce an experiment

Yes. Yes. Yes. Yes.

Ability to run large experiments

Agent per thread

only, thus limited

size problems.

Agent per thread

only, thus limited

size problems.

Yes, supports ex-

ecution locally, on

local cluster and

grid middleware.

Virtually unlimited

number of agents.

Automatic Problem and Scenario Generation – built-in and external

Built-in and sup-

port receiving

problems in a

dedicated format.

Only built-in or

by DisChoco.

This tool does not

specialize in

DCR, thus no

built-in problem

generators are

available.

Yes.

Does coding an agent with the framework resemble the pseudo code

Partially. No. Yes, with

FABLES the code

highly resembles

the pseudo-code.

Yes – although

there are some java-

related boiler plate

code needed.

Ease of creating an experiment

Not complicated,

contains UI for

building the ex-

periment.

Very Easy, sim-

ple XML struc-

ture.

Very easy – con-

tains relatively

easy to use UI.

Very Easy, simple

XML structure with

helpful UI.

Portable problem format

Yes. Yes. No. With dedicated

problem generator

module.

Support for simulation of message delays, message corruption or message

loss

All of the above. No. FABLES does not

have fixed com-

munication

scheme, one

would have to im-

plement those fea-

tures by himself

as part of the

model which can

be rather difficult.

All of the above us-

ing dedicated mod-

ules

Table 1. Comparison of different MAS simulation tools

Page 14: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

14 Benny Lutati et al.

6 Summary

The present paper introduces AgentZero a generic multi-purpose MAS simula-tion and analysis tool which has a convenient API for several common disciplinesincluding DCR. For the DCR aspect, an example of an agent implementing dis-tributed constraints satisfaction search was presented. In order to alleviate theburden of design and testing of MAS agents, a simulation tool like AgentZero is anecessity. In its core, AgentZero is an Agent-based simulator which include set ofAPIs specializes in different agent oriented environments. It exposes a relativelysimple and intuitive API for implementing agents and has the ability to measurethe efficiency of the behavior of agents following the algorithmic protocol in thesimulated environment. AgentZero provides a solution for researchers investigat-ing the behavior of different algorithms as it enables comparative simulated stud-ies without the need to set up a large costly and complicated network of agents.For this reason it serves as one of the main research tools at the BGU DCR groupand it is used by students in several DCR related courses. One can say that MASsimulators are an essential tool for every MAS development and testing environ-ment and not only specific to the DCR area. One may also comment on the needfor them to be adjustable and extensible, as suggested by AgentZero. A lot hasbeen learned while developing and applying AgentZero. On the technical side wehave learned about different models for simulation of multi-agent system envi-ronments. The design and development process has started from the simple butresource wasteful agent per thread model and ended up by developing our own“pseudo-operating-system” which yields much better performance and abilities.From our users we learned that the most difficult task related to writing appli-cations on top of a multi agent system (a.k.a., agents) is the debugging process.Having a locally simulated environment makes it possible to use general purposedebugging tools. Still, this task remains difficult. AgentZero was already usedin research setting [18–20]. AgentZero is continuously maintained, and we in-tend to keep extending it. One example is the addition of support for a dynamicexecution environment, where agents and agent properties can be dynamicallychanged over time. Another example includes the addition of built-in supportfor scenario logging and reconstruction a feature that we hope will reduce thecomplexity of debugging the agents’ execution.

References

1. Weiss, G., ed.: Multiagent Systems: A Modern Approach to Distributed ArtificialIntelligence. MIT Press, Cambridge, MA, USA (1999)

2. Meisels, A.: Distributed Search by Constrained Agents. Volume 382 of Studies inComputational Intelligence. Springer (2011)

3. Waze: Free community-based mapping, traffic & navigation app. url:http://www.waze.com (2014)

4. Chu, C., Kim, S.K., Lin, Y., Yu, Y., Bradski, G., Ng, A., Olukotun, K.: Map-reducefor machine learning on multicore. Advances in neural information processingsystems 19 (2007) 281

Page 15: AgentZero: A Framework for Simulating and …am/media/publications/AgentZero...AgentZero: A Framework for Simulating and Evaluating Multi-Agent Algorithms Benny Lutati, Vadim Levit,

AgentZero: A Framework for MAS Simulation 15

5. Yokoo, M.: Distributed constraint satisfaction: foundations of cooperation in multi-agent systems. Springer-Verlag, London, UK (2001)

6. Kearns, M.J., Littman, M.L., Singh, S.P.: Graphical models for game theory. In:UAI. (2001) 253–260

7. Bonabeau, E.: Agent-based modeling: Methods and techniques for simulating hu-man systems. Proceedings of the National Academy of Sciences of the UnitedStates of America 99(Suppl 3) (2002) 7280–7287

8. Herlihy, M., Rajsbaum, S., Tuttle, M.: Unifying synchronous and asynchronousmessage-passing models. In: Principles of distributed computing, ACM (1998)133–142

9. Cerf, V.G., Khan, R.E.: A protocol for packet network intercommunication. IEEEtransactions on communications 22 (1974) 637–648

10. Awerbuch, B.: Complexity of network synchronization. JACM 32(4) (1985) 804–823

11. Zivan, R., Meisels, A.: Message delay and discsp search algorithms. AMAI 46(4)(2006) 415–439

12. Meisels, A., Kaplansky, E., Razgon, I., Zivan, R.: Comparing performance of dis-tributed constraints processing algorithms. In: DCR. (2002) 86–93

13. Zivan, R., Meisels, A.: Synchronous vs asynchronous search on discsps. In: EUMAS,Citeseer (2003)

14. Fowler, M.: Domain-Specific Languages. Addison-Wesley Signature Series(Fowler). Pearson Education (2010)

15. Ezzahir, R., Bessiere, C., Belaissaoui, M., Bouyakhf, H.: Dischoco: A platform fordistributed constraint programming. In: DCR. (2007) 16–27

16. Petcu, A.: Frodo: A framework for open/distributed constraint optimization. In:Swiss Federal Institute of Technology (EPFL). (2006)

17. Gulyas, L., Bartha, S., Kozsik, T., Szalai, R., Korompai, A., Tatai, G.: The multi-agent simulation suite (mass) and the functional agent-based language of simula-tion (fables). In: SwarmFest, Turin, Italy (2005)

18. Grubshtein, A., Meisels, A.: Finding a nash equilibrium by asynchronous back-tracking. In: Principles and Practice of Constraint Programming, Springer (2012)925–940

19. Levit, V., Grinshpoun, T., Meisels, A., Bazzan, A.L.C.: Taxation search in booleangames. In: AAMAS. (2013) 183–190

20. Peri, O., Meisels, A.: Synchronizing for performance - dcop algorithms. In:ICAART. (2013) 5–14