In multi-agent based simulation of natural and social phenomena computational models are built as multi- agent systems. Describing this kind of phenomena ...
8 Using INGENIAS for Visual Modeling of Complex Agent Based Simulation Systems Juan Pavón and Candelaria Sansores.
Abstract In multi-agent based simulation of natural and social phenomena computational models are built as multiagent systems. Describing this kind of phenomena with a visual language can facilitate the use of these tools by users who are not necessarily experts in computer programming, but in the social and natural sciences. With this purpose, we propose to define such visual language, which is based on well established concepts of agent-oriented software engineering and more concretely on the INGENIAS methodology. Also, replication of simulation models can contribute to improve the reliability of the results and understanding of the system. One of the main problems for facilitate replication is the lack of a simulation integrated environment that supports the whole development process, from conceptual modeling to simulation implementation. We address this issue providing a high-level conceptual modeling abstraction, including transformation tools for simulation development that facilitate the implementation of simulations on different simulation platforms. In this way, agent-based simulation development process is driven by modeling, because users focus on conceptual modeling, while implementation code is generated automatically. We consider that modeling should be application domain oriented and that a generic language itself does not suffice. Thus, we also discuss how specific domain simulation environments could be achieved.
8.1
Introduction
Agent-based modeling (ABM) and simulation is being increasingly used for exploring the complexity of natural and social dynamics. A model in a simulation consists of a specification of the phenomenon we want to study. This could be a mathematical equation, a logical statement or a computer program depending of the simulation technique used. In multi-agent based simulations theoretical models are built like computational models using multi-agent systems (MAS), thus scientists are able to validate their theories by running the models and observing and analyzing the results that arise from agents’ interaction. This approach facilitates the study of how new
174
Juan Pavón and Candelaria Sansores.
phenomena emerge, that is, how the interactions and varied behaviors of individual agents produce structures and patterns. Thus, agent based modeling is well suited for studying systems that are composed of interacting agents and exhibit properties arising from the interactions of the agents that cannot be deduced simply by aggregating the properties of the agents. This is the kind of problems that appear when studying complex adaptive systems. Complex adaptive systems are often characterized by agents interacting or capable of interact with each other in dynamic, nonlinear and unpredictable ways (Holland 1998). From a computer science view, a complex adaptive system is a form of complex multiagent system with adaptive agents. (Gilbert and Troitzsch 1996) states that the agents be themselves complex, which is certainly true for the actor of social systems (like a human being), but in the case of some natural systems (like swarm systems) the actors use to be simple. However, complex MAS are rarely implemented because the system can become easily intractable. Thus, the general approach to study a complex adaptive system is a computer simulation, in which repeated iteration of simple local rules in a population of simple interacting agents leads to complex global phenomena. Concerning implementation of these systems, most agent-based simulation tools available for natural and social scientists are toolkits without a sophisticated underlying MAS model. The main goal of these tools is to assist modelers to implement simple agents that react through changes made to the environment by other agents and interacting indirectly through it. After a survey of simulation tools in the natural and social sciences, we found that most toolkits follow this philosophy, modeling simple, ecologically defined societies with a programming language or with the help of rapid development environments. Although some of these toolkits offer much more than this, not like already implemented features but providing an open implementation to integrate them. Our purpose is to facilitate the use of these tools by natural and social scientists, and the way to do this is to abstract them, as much as possible, from simulation programming issues. According to this, we provide an easily customizable tool for describing phenomena in different domains with a visual language. This language is a visual toolkit-independent language for specifying simulation models. It supports the
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
175
definition of complex agents and considers organizational issues to manage another dimension of complexity (the society of agents and the system’s architecture). The need for a toolkit-independent visual modeling language is mainly supported by model communication and replication requirements. Regarding communication of the models, a common language to describe agent-based models, independent of the implementation platform, could be a better mean of communication between computer science specialists and domain experts than source code, since the latter demands a high effort to understand and interpret the models, sometimes leading to misunderstandings. Also, we are aware of having a universal modeling and simulation language is not feasible, as it has been already discussed in (Gilbert 1996), so our aim is to provide a language that can be customized to particular natural and social domains, by specialization or addition of new elements, which can be defined by the modelers of such domains. With this purpose we adopt an agent-oriented methodology, INGENIAS (Pavón and Gómez-Sanz 2003). This methodology, which is in line and evolves with current efforts at FIPA (http://www.fipa.org) and AgentLink (http://www.agentlink.org) is based on meta-modeling principles and supported by a set of tools for modeling and code generation for multiple platforms. In this sense, it facilitates our approach as it can be easily adapted for our purposes by extending its underlying meta-model. Regarding replication, it contributes to the reliability of the model results and better understanding of the system. As (Axelrod 1997) states, replication is one of the hallmarks of cumulative science. It needs to be confirmed whether the claimed results of a given simulation are reliable in the sense that they can be reproduced by someone starting from scratch. Without this confirmation, it is possible that some published results are simply mistaken due to programming errors, misrepresentation of what was actually simulated, or errors in analyzing or reporting the results. The use of high level modeling language and structured programming tools can assist not only in model design at a more abstract level but in replication as well. These high level tools (for a review, see (Tobias and Hofmann 2004; Marietto et al. 2002), can help to make writing the software easier and less prone to error. However, these tools are still implementation oriented, which implies that the way scientists replicate their models is by passing source code to each other, which demands high effort to understand and
176
Juan Pavón and Candelaria Sansores.
interpret the models, sometimes leading to misunderstandings. Thus, a less ambiguous mechanism is required to facilitate the replication task. Replication and model comparison techniques are reviewed in (Hales et al. 2003). The main of these techniques are those proposed by (Axtell et al. 1996; Axelrod 1997). Our proposal is oriented to provide support for the former of these techniques. This technique implies reimplementation of the models, rewriting models that others have described on papers, so as to understand them more deeply and reproduce the stated results. Our proposal of using a specification language to describe models helps in developing reusable models. Model specification is performed with diagrams in a welldefined graphical specification language which is less ambiguous then natural language descriptions and more abstracted then programming languages. The same specification could be then executed on different simulation engines. The results provided by each simulation toolkit should not differ considerably between them due to particularities of each simulation platform; if they do then we have to address these particularities that affect the replication process and that are not easily identifiable without this approach. It is important to notice that applying the reimplementation technique that involves literal reconstruction of the same model specification has the disadvantage that implicit assumptions built into the original specification will be reproduced in the replication and are not therefore tested. A better technique may involve the creation of a new specification from scratch (Edmonds and Hales 2003). With this approach a different modeler could easily understand the specification and the intentions of the original modeler since the agent-oriented language we propose is very intuitively. The modeler doing the reimplementation could create a new specification achieving in this way not only the reimplementation technique but also avoiding possible biases found in the original specification. In consequence, our proposal includes a framework that provides a high level specification language for modeling and simulation development. Transformation tools to translate simulation models to code in different simulation environments. As a result, agent-based simulation development process is driven by modeling, because users only need to concentrate on model design with a specification language and implementation code will be generated automatically. This approach is model oriented and, as another advantage, addresses the issue of model communication misunderstandings, which usually happens when users are working with different simulation tools.
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
177
This approach can facilitate the use of existing simulation tools by users who are not necessarily experts in software engineering, but in natural and social sciences. Thus, the model driven implementation approach relies on (1) the specification language we mentioned before which is based on well established concepts of agent-oriented software engineering, and (2) simulation toolkits we had experienced with, since heterogeneity is an added value for replication richness. Section 2 reviews approaches for agent based modeling and simulation. Section 3 describes the INGENIAS agent oriented methodology, which is adapted to model agentbased simulation systems, specifically it presents the social modeling language adapted from INGENIAS meta-models. Section 4 presents a case study that shows the feasibility of describing complex agent-based simulation systems with this modeling language. Section 5 presents the replication issues which involve the MDA approach for the code generation process and the replication results from the case study of Section 4. Section 6 summarizes our contributions and concludes with the identification of further work
8.2
Agent Based Modeling and Simulation Tools
As agent-based simulation has gained in popularity, software tools for modelers are emerging. There are various toolkits for developing agent-based simulation systems. The most known toolkit for building agent-based models and simulation is Swarm (Minar
et
al.
1996),
developed
at
the
Santa
Fe
Institute.
Swarm
(http://www.swarm.org) gave the community an important contribution which had a lasting impact on how agent-based simulations are written. This contribution was a simplified approach to the ABM development. It provided a design pattern for ABM which was adopted by most simulation toolkits created ever since. This pattern consists of a model (the entity which simulates the system), the observer (the entity which looks into the model and provides the observed data to the user) and the scheduler (simulations always need a piece of software driving the time evolution). The pattern promotes a strong separation between these entities. Also, common to every simulation model in Swarm we found random number generators, statistical tools, deploying tools, plotters, etc. This approach has similitude with a real experiment in a laboratory where a phenomenon is studied and observed by the researcher from outside, without participating to the system evolution. The disadvantage of using Swarm is its
178
Juan Pavón and Candelaria Sansores.
programming language, Objective C which is a major factor contributing to the steep learning curve of Swarm. Although the package was later extended to support Java, the original core remained intact. As a consequence, Java Swarm conserves many of the original problems. Repast (Recursive Porous Agent Simulation Toolkit) originally developed by (Collier et. al 2003) is a free open source programming framework created by Social Science Research Computing at the University of Chicago for the development of agent based simulation using Java language. It provides a class library for creating, running, displaying, and collecting data from the simulations. Its features and design owe a lot to Swarm. A simulation in Repast (http://repast.sourceforge.net) usually consists of a collection of agents of any type and a model that sets up and controls the execution of these agents’ behaviors according to a schedule. The execution of the simulation is divided into time steps or "ticks” in which the agents may play an action. The specification of the agents and the environment in Repast is carried out by a set of variables and methods according to the object-oriented paradigm. It does not have intelligent agent concepts or agent architectures, so an agent is an object without any restriction in relation to its internal architecture. However, it does provide specific libraries to implement functionalities like neural networks or genetic algorithms. Also, it provides facilities for easily developing graphical user interfaces, execution, monitoring, and presentation of results. Repast offers some graphical modeling capabilities. Repast Py (http://repast.sourceforge.net/repastpy) facilitates the visual construction of simple simulations out of some component pieces, although at the end the user needs to write Python scripts. The problem with this solution is that it already requires some programming skills and the type of systems that can be modeled are quite simple (it is mainly a rapid prototyping tool). Mason (Luke et al. 2005) is a single-process discrete-event simulation core and visualization toolkit written in Java. Mason (Multi-Agent Simulator of Neighborhoods) was designed to be flexible enough to be used for a wide range of simulations, but with a special emphasis on swarm simulations of huge number (up to millions of) agents. The design philosophy of these toolkits is to provide a model library to which an experienced programmer can easily add features for simple simulations. The toolkit (http://cs.gmu.edu/~eclab/projects/mason/) is written in a modular, layered architecture. At the bottom are a set of utility data structures which may be used for any
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
179
purpose. The next layer is the model layer, a small collection of classes consisting of a discrete-event schedule, a high-quality random number generator, and a variety of fields which hold objects and associate them with locations. This code alone is sufficient to write basic simulations running on the command line. The visualization layer allows for display of fields and user control of the simulation. The visualization layer practically is a suite of tools which allow runtime drawing and manipulation of the model. This allows treating the model as a self-contained entity, following the same philosophy proposed by Swarm. These libraries have great advantages for modelers over developing their own, but they require having a good working knowledge of a programming language (usually Java). Thus, inexperienced programmers could find that a higher-level declarative language instead of a programming language would be desirable. This was the purpose of SDML (Moss et al. 1998), which has been built on Smalltalk. SDML (Strictly Declarative Modeling Language) is a declarative programming language with object oriented features and based on a non-monotonic and temporal logic as KD45 (Konolige 1992). In SDML agents’ knowledge is represented by rule-bases and databases used like reasoning mechanisms. The agents are endowed with rules that determine their behavior and that can be shared with other agents. The rules are associated with different time levels. A simulation in SDML is described through the implementation of an initial set of true facts of the environment and agents’ beliefs. The agents’ behavior is described through a set of implications and each implication is called a rule, the inference engine then fires the true rules in each instant of time along the simulation which behaves like a discrete event simulator. Basically, in SDML the states of the model are implemented and the process or the solution of the problem emerges. SDML lacks development facilities like agent architectures (it is only focused to knowledge representation as production systems rules), direct agents’ communication (there is no support for structuring actions and interactions), tools to manage spatial structures, and graphical facilities. Unlike Repast and Mason, it does not demand users to be fluent in the underlying programming language, but they have to learn a complex interface that can be as difficult to master as a full programming language, which finally limits its usability. Another kind of tools that has emerged for developing simulations are rapid development environments, which allow the building of simple models using visual
180
Juan Pavón and Candelaria Sansores.
programming, for instance, Netlogo (Wilensky 1999). It is a programmable modeling environment for simulating natural and social phenomena. It is in continuous development at the Center for Connected Learning and Computer-Based Modeling. Netlogo is particularly well suited for modeling complex systems developing over time. Modelers can give instructions to hundreds or thousands of independent "agents" all operating concurrently. This makes it possible to explore the connection between the micro-level behavior of individuals and the macro-level patterns that emerge from the interaction of many individuals. It uses a modified version of the Logo programming language (Harvey 1997). Netlogo (http://ccl.northwestern.edu/netlogo) was designed to provide a basic laboratory for teaching complexity concepts; however, it can also be used to develop more complicated applications. It provides a graphical environment to create programs that control graphic “turtles” that reside in a world of “patches,” which is monitored by an “observer”. It also includes an innovative feature called HubNet, which allows groups of people to interactively engage in simulation runs alongside of computational agents. Netlogo’s philosophy is that agent-based simulation environments and languages should be simple enough to have a “low threshold” for beginners and similarly such systems should have “no ceiling” that limits what experienced users can do. Netlogo is a standalone application for building agent-based simulations visually, allowing inexpert programmers create models faster than Java toolkits. However, it is important to note that the graphical interface does not provide a high-level specification language to describe models but graphic entities for building basic simulations with the basic elements. In this sense, agents used to be simple entities without sophisticated deliberating mechanisms. Cormas (Bousquet et al. 1998) is also a rapid development environment but with a specificity in the domain of natural-resources management. Cormas (Common-pool Resources and Multi-Agent Systems) platform is being develop by the Centre of Coopération Internationale en Recherche Agronomique pour le Dévelopment (CIRAD), France. The platform provides a framework for developing simulation models of coordination modes and interactions between individuals and groups sharing renewable natural resources. This framework is structured in three modules. The first module allows the definition of the entities of the system to be modeled, which are called informatics agents, and their interactions. These interactions are expressed by direct communication procedures (sending of messages) and/or by the fact of sharing the same
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
181
spatial support. Cormas (http://cormas.cirad.fr/) works with three types of entities: spatial, passive and social. Spatial entities define a topological support for simulations, they hold natural resources. Passive entities are subdivided in passive objects and messages and social entities are agents. The second module deals with the control of the overall dynamics (ordering of different events during a time-step of the model). The third module allows the definition of an observation of the simulation depending on viewpoints. This feature allows the integration, within the modeling process, of representation modes. Cormas facilitates the work of constructing a model by offering predefined elements within these three modules. Among these items are the Cormas entities, which are SmallTalk generic classes from which, by specialization and refining, the user can create entities specific to the needs of his application. Cormas works with discrete time simulation, their agents are SmallTalk objects, it does not impose restrictions on the agents’ internal architectures and the user is fully responsible for such implementation as well as for their own communication language. Although it is relatively easy to use, agents in this kind of systems are quite simple, usually with a poor or nonexistent agents’ cognitive model, users are required to have programming skills to develop more sophisticated simulations. Simulations developed with both kinds of tools, either toolkits or rapid-development libraries, are proprietary model descriptions. This makes impracticable to compare two different implementations of the same specification. Therefore, replication of models turns out complicated due to the diversity of modeling languages and the lack of a common one that addresses modeling at a more abstract level. One approach that seems to consider this requirement more formally is Sesam (Klügl et al. 2004), a tool for rapid prototyping of agent-based simulations. Sesam (Shell for Simulated Agent Systems) is a modeling and simulation environment that combines concepts of declarative high-level model representation and visual programming. Models are represented declaratively. The high-level modeling language consists of primitives: agent actions, predicates for perception or other functions for processing information. The state of agents, resources or the environment is represented by a body consisting of state variables. Behavior is specified using an activity graph that is derived from UML. An activity of an agent corresponds to a special state variable that determines the next action sequence of an agent. Rules are used for transition between activities. Activities are seen as scripts that are initiated and terminated by firing rules. Based on the declarative model
182
Juan Pavón and Candelaria Sansores.
representation, visual programming is consequently applied for implementing the structure and behavior of the agents and their environment. Although Sesam does a step forward in the high-level modeling issue, it still lacks of common functionality that is usually available in more general agent development tools, such as the ability to specify agents direct interactions via messages. Thus, interactions in such simulations are expressed indirectly through changes in the environment, mainly because this toolkit is based on reactive agents and not on sophisticated internal reasoning process, which are prerequisites for complex negotiation abilities. Thus, it does not support complex goaloriented agents. Besides to add model-specific extensions or additional functionalities that are not available in standard Sesam, it is necessary to develop a plugin in Java which requires programming knowledge. The toolkits just reviewed are focus on development of general purpose simulations. Cormas is one exception because it is oriented to natural resource management application domain. As Cormas we can find numerous frameworks on different domains addressing high-level modeling issues as well but with specificity in their problem domains, for example in (Argent et al. 2006) we can find a review of some of these frameworks concerning environmental modeling. 8.2.1 Exploiting existing ABM tools In general, the use of existing general purpose agent based simulation tools is not simple as models have to be specified as programs, usually with an object-oriented programming language. This makes the definition of models a complex task for scientists without skills for computer programming. In spite of limitations of existing tools, the agent paradigm offers many advantages to express the nature and peculiarities of social and natural phenomena. Specifically, agent-oriented software engineering offers powerful modeling languages, at a more abstract level. Concepts in these languages are closer to those that a social or natural scientist would use, and this makes them more appropriate to solve this usability issue. With this hypothesis, we build an agent-based modeling and simulation framework by extending a concrete agent-oriented methodology, INGENIAS (Pavón and Gómez-Sanz 2003) which is reviewed in next section. This framework allows the specification of social systems with a graphical modeling language, the simulation of these systems by exploiting the capabilities of existing agent-based simulation tools. The advantages go further than usability since
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
183
this solution facilitates the replication of an experiment on different simulation engines, in order to contrast results. Also, the availability of a graphical view of the system facilitates its understanding.
8.3
A visual modeling language
There are two main reasons for the choice of INGENIAS in this work. First, its modeling language supports well the specification of organization structure and dynamics, as well as agent intentional behavior, characteristics that are present in social systems. This language is supported by the INGENIAS Development Kit (IDK) with a graphical editor, which can be extended to introduce new modeling concepts. Second, INGENIAS promotes a model-driven engineering approach that facilitates the independence of the modeling language with respect to the implementation platform. This is especially important here as we intend to abstract away programming details and concentrate on modeling. With this purpose the IDK supports the definition of transformations between models and code for implementation platforms. 8.3.1 INGENIAS INGENIAS provides a language for modeling multi-agent systems (MAS), and support tools for analysis, design, verification and code generation, the INGENIAS Development Kit (IDK). These tools, as well as the language, are based on the specification of meta-models that define the different views and concepts from which a multi-agent system can be described. By extending and refining the meta-models it is possible to adapt the language and the tools for particular application domains, always relying on agent concepts. As a proof of concept, this has been applied, for instance, for holonic manufacturing systems (Giret et al. 2005). A MAS specification with INGENIAS is performed from five viewpoints, whose use is illustrated in the next section. An important characteristic of INGENIAS is that, when describing a MAS, it fully assumes the social and intentional nature of agents. Organization viewpoint - The organization describes the framework where agents, resources, tasks and goals coexist. It is defined by its structure, functionality and social relationships. From a structural viewpoint, the organization is a set of entities with relationships of aggregation and inheritance. The organization structure defines a
184
Juan Pavón and Candelaria Sansores.
decomposition of the MAS in groups and workflows. Workflows define the dynamics of the organization, by describing consumer/producer associations between tasks as well as assignment of responsibilities (to agents or roles) for their execution, and resources associated to each one. Social relationships define dependencies (for instance, subordination, peer-to-peer) between agents in the organization. Thus, the organization allows managing complexity by structuring the system and determining global behavioral rules. Agent viewpoint - Each agent is defined by its purpose (what goals an agent is committed to pursue), responsibilities (what tasks it has to execute), and capabilities (what roles can play). The way this is reflected is by defining the mental state of the agent, its management and processing. The mental state consists of goals of the agent, the information it has about the satisfaction of those goals, and its knowledge about the world and facts reflecting its past experience. Thus, the mental state provides the information that the agent needs to make decisions, i.e., to decide what actions to execute. Tasks and Goals viewpoint - It considers the break down of goals and tasks. It also describes the consequences of performing a task, and why it should be performed (i.e., it justifies the execution of tasks as a way to satisfy goals). For each task, it determines what elements are required and what outputs are expected. To identify which goals are influenced by a task execution, there are satisfaction and failure relationships. Finally, the tasks/goals viewpoint explains how a solved goal affects other existing goals by using decomposition and dependency relationships. Interaction viewpoint - The interaction viewpoint addresses the exchange of information or requests between agents, or between agents and human users. The definition of an interaction in INGENIAS goes a step further than traditional formalisms, such as UML sequence diagrams, in the sense that it reflects the motivation of the interaction and its participants. It also includes information about the mental state required by each agent throughout the interaction as well as tasks executed in the process. In this way, it allows to express at design level why an agent engages in an interaction and why it should continue. Furthermore, interaction protocols can be specified using different formalisms: AUML, UML collaboration diagrams and
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
185
GRASIA diagrams, a specialization of UML collaboration diagrams to address intentional issues associated with an interaction. Environment viewpoint - The environment is defined in terms of what agents can perceive or actuate. It also identifies available resources as well as already existing agents and applications with which an agent can interact. It is important to notice that INGENIAS is an open methodology for modeling MAS, and these viewpoints just provide a guideline to build models during the analysis and design phase; this implies that the developer has the responsibility to decide which models generate, in which order and the level of detail. In this sense, our purpose here is to see whether INGENIAS provides enough modeling elements for complex agentbased simulation systems, which issues require some refinement or extensions in order to specify time properties and location of agents in the environment, and deployment of experimental models. This has driven us to consider two new viewpoints: the Timer viewpoint and the Space viewpoint, which can be considered as extensions of the Environment viewpoint. The Timer viewpoint manages the flow of time in the model during the execution of the simulation. Because our approach assumes simulations that are going to be carried out are time driven, we need constant time steps for simulating the perception-reaction cycle of agents who act by the passage of time. The Space viewpoint describes the spatial arrangements of agents in the model. Currently, we have only defined simple spatial relationships like continuous spaces, but we plan to consider 2D, 3D, hexagonal grids, hexagonal tori, etc., spaces, as in most simulation toolkits 8.3.2 The social modeling language We are specifically interested in modeling individual behavior and decision making in a society. This requires the ability to represent social interactions which give rise to the emergence of sociality like cooperation, competitions, groups, organization, etc. Therefore, the level of abstraction of the language we will be using is the individual’s social action and mind (Castelfranchi 1998). An individual performs actions that, depending of the level of awareness, could be simple reactive behavior or social actions. For an action to be considered social it needs to be goal-directed to another entity in a common shared world and that should be an
186
Juan Pavón and Candelaria Sansores.
active, autonomous goal-oriented entity itself, both entities interacting and perceiving each other as their similar. In this sense, we are not considering and action directed to the environment as social, although in certain cases it could be. With these concepts we will be able to define a language composed of individual types and their attributes as well as the social actions, interactions and relations between individuals and groups. The different instances of an individual type will give rise different individuals in a society with different roles. It will also be possible to define groups as aggregates of the individual type. Society and the environment it imposes could include resources which the individual may count on. Also the individual may have a set of actions to perform on the environment, like the action of using a resource for example. The specification of a social simulation model with INGENIAS is performed with the language components presented in Section 3.1, which have required modifications in the original INGENIAS MAS meta-model and re-generation of the IDK tools. This adapted language fulfills a fundamental goal of abstracting the social scientist from implementation issues. The following table shows the social modeling language elements we proposed.
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
187
Table 8: Main elements of the social modeling and simulation language
Elements
Agent
Organization Environment
Description Each agent is defined by its purpose (what goals an agent is committed to pursue), responsibilities (what tasks it has to execute), and capabilities (what roles can play). This concept of agent in INGENIAS has a richer representation of agents than Repast and Mason and is a good abstraction to use in the specification of ABM. However, the corresponding mapping in Repast and Mason does not really exist but need to be implemented. The organization allows managing complexity by structuring the system and determining global behavioral rules in a MAS with INGENIAS. For simulation purposes an organization could be used to model institutions, companies, organizational entities, however in ABM most of these entities are simplify simulated as agents to avoid complex models. For now, this entity will be used only like a form to structure the model, like the Repast and Mason models do. The environment concept in INGENIAS is basically what agents can perceive or actuate, like other agents, resources, etc. This concept has been extended to include space and scheduling considerations. These are actions to be performed by the agents to accomplish their goals.
Task
Goal
Role
We are considering individual goals of the agents in INGENIAS to represent intentional agents in the social modeling language.
Basically, the functionality associated to a role in INGENIAS can be directly played by an agent and is also adopted by the proposed language.
This language element was adopted as a way to structure agents in a model. Group
Interaction
Plan
8.4
This is a representation of agents’ communication mechanism in INGENIAS which include message passing and protocols. This concept does not have a corresponding mapping in Repast or mason since communications are performed through the environment only. This element represents a sequence of task performed by an agent, it’s a description of a plan an agent wants to execute. The execution of tasks could be conditioned to certain state the agent should achieve.
The Modeling Process
The example used to illustrate the visual modeling language for agent-based simulation systems is taken from (Di Tosto et al. 2003), which studies altruism among simple and smart vampire bats. The complete specification can be found in (Sansores et al. 2006). This example is interesting as it shows the importance of modeling agents as cognitive entities and remarks the impact of intelligence, goal-based systems on the spreading of altruism, provided these systems are highly dynamic. The model considers a population of vampire bats (agents) that live in roosts, where they get back to after hunting and perform social activities like grooming and sharing food. The entities explicitly
188
Juan Pavón and Candelaria Sansores.
modeled as agents are the bats. Roosts are modeled as aggregates of bats. In roosts, bats are allowed to share food and to groom one another. Each simulation cycle includes one daily and one nightly stage. During the daily stage, the simulated animals perform the social activities, in the night they hunt. Each night 93% of the population will find food to survive until the next hunt. The remaining 7% will starve, unless they receive help from some fellow (under the form of regurgitation). A starving bat will turn to grooming partners for help, and will avoid death if any of them is found to be full. Help-giving allows animals to achieve credits, which will be extinguished if and when help is returned. Animals are endowed with social knowledge: consisting of a memory of past grooming and food-sharing interactions, and of consequent credits. After each simulation the number of death bats, the number of altruistic acts performed and the number of credits turned on or off are recorded. We start modeling the case study with an Organization model. The organization allows managing complexity by structuring the system and determining global behavioral rules. At a global level, the goal of the organization (its purpose) is shared by its agents, which can be structured in groups. Agents in the organization execute tasks that are identified in workflows or distributed plans, which depict the dynamics of the organization. In the case study, the organization is a bats population, whose purpose is the goal Survive, as shown in Figure 31. This organization consists of one or more roosts (represented as groups) and a credit network (represented as an organization network). There is only one type of agents, Bats, which can play several roles. Bats belong to roost group. In a roost, a bat can play the role of altruist or recipient depending on whether help is given or received. In the credit network, a bat can play the role of NodeTo and NodeFrom.
Using INGENIAS for Visual Modelling of Complex Agent Based Simulation Systems
189
Figure 31: The organizational model. The organization pursues a goal, has groups and workflows or plans. Agents and roles are members of one or more groups.
The cardinality in the associations indicates the organization can have one or more roosts and the roost one or more bats, the same applies to roles cardinality, which indicates that it is possible that the role of recipient, for instance, may not be played by any agent. The behavior of bats is represented collectively as plans, Night Behavior and Day Behavior in Figure 31, which are further broken down in tasks. The Organization Network entity (represented as rectangles with two circles and three nodes inside in Figure 31) is a clear example of how the INGENIAS modeling language can be extended. We added this new entity to support network models, since these models are frequently studied in social simulation systems. The entities which have been first identified in the organizational model can be further detailed when looking at the system from other viewpoints, in other diagrams, as it is shown below. The simulation model we consider in this case study is the dynamic variant of smart agents in (Di Tosto et al. 2003), this states that smart agents are endowed not only with actions, but also with mental states such as beliefs and goals. Therefore, the norm of reciprocity is a more complex construct taking beliefs as input conditions and giving a set of mental representations, namely beliefs and goals, as outputs. The main output of the rule is then a normative belief; it tells what is expected of oneself. Whether we will actually conform or not depends upon a further mental process initialized by the rule, this is, the formation of a normative goal based upon the normative belief (Conte and Castelfranchi 1995). Therefore, in this model, goal-dynamics is an essential aspect of cognition. Agents are endowed with a cognitive architecture in which a goal is a mental construct. More
190
Juan Pavón and Candelaria Sansores.
specifically, in this case, agents have two goals, the normative (give help) and the survival goal (stay alive). Both goals vary according to their motivational force. The smart algorithm implementing the mental state has a small number of rules modifying the values of agents’ motivational force, in particular of the normative goal (NG). The motivational force of survival goal (SG) has been fixed to 0, while the normative motivation is left free to change. The normative value is incremented by altruistic acts: the experience of an effective application of the norm (donation and, to a greater amount, reciprocation) raises the value of normative motivation, while the increase of unreciprocated donations lowers it. As a consequence, the strategy applied by an agent is dictated by the value of its normative motivation. These issues are described in Figure 32, a roles/goals model. This model is important because it shows role dynamics based on motivational force for pursuing goals. If motivational force for pursuing certain goal changes, then an agent changes dynamically the role is playing (through roles inheritance). As shown in Figure 32, a bat agent can play two different roles, each one defined pursuing different goals. In this case, there is a major role of altruist which pursues goals Stay Alive and Give Help. Depending of motivational force of giving help expressed with the fact normativeGoal, bats can play an inherited role of the altruist: cheater when normativeGoal