# Gamifying agent-based models in Cormas: Towards the playable architecture for serious games in Pharo

Jovan Kupusovic, Oleksandr Zaitsev, Pierre Bommel, Christophe Le Page, Gordana Rakić

<figure><img src="image_1.png" /></figure>

## To cite this version:

Jovan Kupusovic, Oleksandr Zaitsev, Pierre Bommel, Christophe Le Page, Gordana Rakić. Gamifying agent-based models in Cormas: Towards the playable architecture for serious games in Pharo. International Workshop on Smalltalk Technologies (IWST 2025), Jul 2025, Gdansk, Poland. 8 p. hal-05466616

HAL Id: hal-05466616

https://hal.science/hal-05466616v1

Submitted on 20 Jan 2026

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for Serious Games in Pharo

Jovan Kupusovic<fnref n="1" />, Oleksandr Zaitsev<fnref n="2" />, Pierre Bommel<fnref n="2" />, Christophe Le Page<fnref n="2" /> and Gordana Rakić<fnref n="1" />

**Abstract**

Agent-based modelling (ABM) and role-playing games (RPGs) are among the main practices used in the companion modelling approach (ComMod). While ABMs provide higher computational capabilities, RPGs are more accessible and more engaging for the local stakeholders. There is a growing interest in combining those two approaches, in fact, games can be seen as ABMs where human players act as agents. However, to the best of our knowledge, there is no ABM platform that supports gaming out-of-the box. In this work, we propose to extend Cormas, an agent-based modelling platform to provide "playability" for model entities. This way, any model developed in Cormas can potentially be played as a game, and any game can be run as a simulation. "Playability" is achieved by extending the architecture of Cormas with several layers. Through the implementation of the serious game "Planet C", we established each layer one by one, reaching towards the desired architecture.

**Keywords**

agent-based modelling, serious games, companion modelling, cormas, pharo, software architecture, gamification

## 1. Introduction

Companion modelling (ComMod) is an inclusive research approach used in various branches of social and environmental sciences. Centered on participation, this approach encourages researchers to collaborate with local stakeholders to iteratively co-design a model, explore the simulations, and participate in collective decision-making. The posture is founded on the free expression of different points of view on the issue at stake. Based on a co-designed conceptual model, ComMod proposes three main techniques for implementing this model: agent-based simulation, role-playing and forum theater [1]. We'll look at these in more detail in the following sections. Researchers practicing Agent-based modelling (ABM) rely on a variety of software tools to help them represent different initial situations and experiment with different scenarios.

Cormas is a software platform for companion modelling that was developed in late 90s by ComMod researchers from various institutions (CIRAD, INRAE, CNRS, etc.) [2]. Based on years of field expertise, Cormas is particularly well suited for companion modelling, allowing live interaction with the model, live programming, inspection and various representations of an ABM. The platform was originally developed in VisualWorks Smalltalk and recently migrated to Pharo.

Although role-playing games (RPG) are commonly used by companion modelers, there is no specific tool to support hybrid simulations (which combine ABM and RPG). More and more games that are developed by the ComMod community require software support and this support is often provided by external contractors. A good example of hybrid simulation is Planet-C - a game that was developed by LEAF<fnref n="1" />, CIRAD, INRAE and ETH Zurich based on the older game called ReHab [3].

<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /></figure>

<figure><img src="image_5.png" /></figure>

<footnote n="1">¹University of Novi Sad, Faculty of Sciences, Trg Dositeja Obradovića 2, 21000 Novi Sad, Serbia</footnote>

<footnote n="2">²UMR SENS, CIRAD, 34000 Montpellier, France - University of Montpellier</footnote>

<footnote>IWST 2025: *International Workshop on Smalltalk Technologies, July 1-4, 2025, Gdansk, Poland*</footnote>

<footnote>* Corresponding author.</footnote>

<footnote>kupusovic02@gmail.com (J. Kupusovic); oleksandr.zaitsev@cirad.fr (O. Zaitsev); bommel@cirad.fr (P. Bommel); christophe.le_page@cirad.fr (C. L. Page); goca.rakic@gmail.com (G. Rakić)</footnote>

<footnote>0000-0002-9421-8566 (O. Zaitsev); 0000-0002-7776-9075 (P. Bommel); 0000-0002-9421-8566 (C. L. Page); 0000-0001-7366-5159 (G. Rakić)</footnote>

<footnote>© 2025 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).</footnote>

<footnote n="1">¹LEAF Inspiring Change (https://leafic.ch/) is a Swiss-based startup that uses strategic games to facilitate stakeholder dialogue and inspire transformative action.</footnote>
The main contributions of this paper are: (1) we discuss the need to support games in Cormas; (2) we present the first idea of the possible architecture.

The rest of this paper is structured as follows. In Section 2, we briefly explain ABM, RPG and ComMod to provide the reader with the necessary background to understand the rest of the paper. In Section 3, we explain different ways to combine ABM with games. Section 4 presents the RPG called Planet-C, as a case study in future research. In Section 5, we present our approach and the first prototype extension of Cormas to support hybrid simulations. Section 6 presents the discussion. Section 7 presents the related works. Finally, in Section 8, we present our conclusions and future works.

## 2. Background

In this section, we present the two main tools used in Companion Modeling, and the ComMod approach itself.

### 2.1. Agent-Based Modelling

Agent-based modeling and simulation (ABMS) is a modern approach to modeling complex systems made up of interconnected agents. This approach is increasingly used in scientific research, where models function as a kind of "virtual laboratory" [4]. Socio-ecosystems exhibit numerous interdependencies that traditional modeling techniques struggle to capture. ABMS enables more realistic simulations with assumptions such as asymmetry of information or heterogeneity of agents. In addition, the availability of microscale data and rapid advances in computing power now allow large-scale individual-based simulations that were previously infeasible [5].

As they are centered on the individual, ABMS allows the user of a simulation to assume the role of an agent and, for example, to "think like a wolf, a sheep or a fly" [6]. To get users more involved in the simulations, we suggest combining ABM with RPG. These hybrid simulations allow participants to become even more immersed in the simulation in progress. They can then assume their own role and make decisions they would have made in real life. They can also take on another role to put themselves in another person's shoes. Whatever the role they adopt, this immersion allows them to learn by experiencing the consequences of their actions. They can explore different scenarios in a safe and controlled environment.

### 2.2. Serious Games

The use of games for serious purposes was first proposed in the domain of military strategy. This involved simulating battlefield-like conditions where players experiment various strategies and safely explore the likely implications of certain decisions. Following these initial experiments, serious games were applied to other domains, from healthcare, corporations, business, etc. [7]. In natural resource management, they have been slowly used since mid-1990s [8].

Rodel et al. [9] present the differences in the use of serious games in natural resource management:

* Entertainment and pass-time, used as a hobby for entertainment and challenge,

* Educational games, used as a teaching tool and integrated into learning modules,

* Games for research, integrated into research processes to collect data or validate hypotheses,

* Games for intervention, used to provide opportunities for exchange, information sharing and critical reflection.

Thanks to the interactive nature of serious games, they are increasingly used as tools in companion modeling processes, where local actors are actively involved in model development and testing [10]. The next chapter describes just such an approach.
## 2.3. The Companion Modelling Approach

The term ComMod stands for Companion Modeling and refers to a specific approach of participatory modelling [11]. ComMod is a research approach that integrates modelling and fieldwork through interactive collaboration between researchers and local stakeholders in order to understand and jointly manage complex socio-ecological systems. In contrast to traditional modelling, which aims to propose turn-key solutions, the ComMod approach tends towards the gradual building of a common understanding of the problem by involving local stakeholders from the very first modelling phase. Models in ComMod do not serve as an objective representation of reality, but as tools for facilitating communication and joint research among interested parties. ComMod is also used as a way to encourage collective decision-making through the gradual convergence of different actors' perspectives and the empowerment of local communities to jointly manage resources [10, 12, 13]. By using models as mediation tools, ComMod involves creating mutual relationships between participants, trying to reduce power relationships.

When it comes to social dynamics, scientific neutrality can be considered naive. Indeed, when conducting fieldwork, ignoring the asymmetrical nature of power runs the risk of exacerbating inequalities. Those with the most power have the greatest influence on the participatory process, and can steer the results to their advantage. Given these ethical issues, ComMod advocates a non-neutral approach to encourage equal voices and collective decisions that satisfy as many people as possible. Beyond the technical issues of the modeling process, one must take into account these power relationships and how to restrict powerful actors, while strengthening the capacities of the most vulnerable [14].

Within ComMod, tools such as ABM and RPG are promoted. The approach is directly involved in development processes, and theories are tested and re-examined by solving real problems in the field. The approach deals with practical and theoretical issues concerning the management of renewable resources and environmental protection, dealing with complex and changing phenomena. In such a context, it is crucial to recognize the existence of uncertainties and different but legitimate perspectives - including those coming from scientific circles. All these different points of view should be included in an iterative process of understanding, confronting and analyzing. Therefore, it was decided to set up a solid and verifiable learning system [11]:

> We have chosen to give ourselves a rigorous and refutable doctrine which could be evaluated. It means that:

1. The fate of all the assumptions backing modeling work is to be discarded after each interaction with the field, that is to say to be voluntarily and directly subjected to refutation,

2. Having no a priori implicit experimental hypothesis is an objective implying the adoption of procedures to unveil such implicit hypotheses,

3. The impact in the field has to be taken into consideration as soon as the first steps of the approach, in terms of research objectives, quality of the approach, quantified monitoring and evaluation indicators,

4. Particular attention should be given to the process of validation of such a research approach, knowing that a general theory of model validation does not exist, and that procedures differing from those used in the case of physical, biological, and mathematical models need to be considered.

(Barreteau et al., 2003, paragraph 2.1)

In order to realize the practical application of companion modelling, specialized software tools are needed that enable easy modelling, data visualization and interaction with simulations. Cormas was developed precisely for this purpose, which we talk about in the next chapter.

## 2.4. Cormas

Cormas (Common-pool resources and multi-agent system) is an ABM platform intended for modeling and simulating interactions between natural and social dynamics, especially in the context of renewable
resource management (http://cormas.org). This tool allows researchers to better understand the complex relationships between ecological and social systems, to model the behavior of different agents and their mutual interaction through a shared environment [2, 15]. Cormas platform has been used in recent years as an educational and research subject for the development of agent-based simulations in the context of renewable resource management. A library of models has been developed for beginners who, through working with simple models, master the use of Cormas and the basics of the Smalltalk language. After the introductory phase, participants design and implement their own prototypes related to concrete cases from practice. Most Cormas models are aimed at simulating socio-ecological systems with the aim of raising the awareness of different actors and their consequences for resource management. Therefore, the Cormas user community is generally recognized as a group focused on participatory, contextual modeling and learning through interactive simulations [16].

## 3. Combining Games with ABMs

GAM (Games and Agent-based Modelling), proposed by Szczepanska [17], represents a combination of games and ABM and proves to be a useful tool for researching complex social phenomena. Games make it easy to gather insights into human behavior and social dynamics, while computer models help analyzing how complex systems work. Both games and agents can work with different types of data. There are different research approaches, using different types of games – physical, digital and combined. Due to its flexibility and application in various disciplines, GAM is attractive to both scientists and those from the gaming world.

ABM Simulation is a way of presenting social actors and their dynamics. Instead of trying to describe everything in equations or words, this approach uses simple agents making decisions and reacting to the environment, exhibiting phenomena at the community level [18].

Games have a goal, rules, feedback, and voluntary participation, and are useful because they allow safe testing of behavior in fictional environments. When games and ABM are combined, we get benefits from both sides. Games additionally motivate and engage people, while ABM enables the analysis and simulation of complex phenomena. Therefore, this combination can help in solving real problems, which include, among others, the management of natural resources, but also in a better understanding of human behavior. There are different ways to integrate games and models – from analogue games that collect data for models, to software solutions that connect game and agent-based simulations [17].

## 4. Planet-C

As an example of ABM and RPG combination, Planet-C is a hybrid simulation game inspired from ReHab [3], in which players are torn between cooperation and competition with other players. The focus of the game is on how people learn and interact with a virtual environment, how knowledge resulting from these experiences is created, how they communicate this knowledge between them, and how all this together affects more efficient conservation and sustainable use of natural resources. Solutions are often temporary and cause new problems. One of the biggest problems and challenges is to harmonize the values and knowledge of actors. Traditional solutions most often fail to solve it because they forget about the factor of complexity of human perception. Planet-C manages to simulate these problems and, as a product, provides communication, dialogue, and mutual maturation. Planet-C shows how communication and understanding of different ways of perceiving situations can contribute to better management of natural resources, while improving people's living conditions.

Two roles are proposed in the game: Harvesters and Rangers. They act on a virtual map divided in 20 cells (4x5) containing some biomass units. Biomass is a renewable resource: it has a value ranging from 0 to 3, but its dynamics are not explained to the players. The harvesters are grouped into households who need food to survive (one biomass per harvester). The game contains 20 harvesters, and the players who play the household role must decide which fields to send their harvesters to. In the same area, the biomass fields provide habitats for birds who need between 2 or 3 biomass for nesting. The hatching
success of this endangered species depends on the degree of disturbance by harvesters. The second role in the game is that of Park manager, whose task is to protect the birds. The only action this player can take is to protect certain fields. The Park manager team usually consists of 2 to 3 players who decide at each round which fields to protect. In this way, the game brings together two seemingly antagonistic goals: the naturalist goal of saving an endangered species, and the economic development goal of making a living for harvesters.

## 5. Extending Cormas to Support Gaming

In Cormas, there are three basic groups of entities – spatial elements, social agents and passive entities – and each entity can be defined as a separate class. The agents can navigate and perceive their environment using built-in methods. This approach makes model development flexible, and thus suitable for simulating complex systems. In addition to the flexibility in defining entities and their behaviors, Cormas stands out for its unique functionalities that make it suitable for participatory modelling [15].

Unlike other modelling tools, Cormas offers a highly interactive environment suitable for involving multiple users in a simulation. It has three important functions: it enables viewing the simulation from multiple viewpoints, it allows a user to directly control entities during the simulation, and it provides the ability to go back to earlier stages of the simulation in order to check the agents' behaviors and experiment with new parameters' values [19].

The idea is to create a generic software solution that supports the design, execution and analysis of serious games through the adaptation of the Cormas platform. Each game can be viewed as an agent-based simulation in which some virtual agents are endorsed by real players. This means that the creation and facilitation of serious games can be supported through an ABM platform such as Cormas. Here, the idea is to develop an extension for Cormas that contains special classes to support games and also develop direct interaction with agents and the environment via a smartphone. Any serious game can then be conceptualized as an ABM, where the players themselves act as active agents. Since games can be seen as simulations, the first idea is based on extending the Simulation class of Cormas with the Game class, redefining the step method and enabling interaction through an external interface (smartphone). This would allow future modellers to reuse existing functionalities implemented in the Game class. It would also allow Cormas to be extended without modifying its architecture.

The architecture proposed (Figure 1) for integrating serious games with Cormas would have three logical layers: a user interface layer (UI) that, as a shell around the two other components, presents the game to users and collects data, a structure layer that stores the data, and a background layer that contains the logic of the game.

The user interface layer, as proposed in Figure 1 with the name UI, serves for the mutual interaction between the player and the simulation, but also to present the game itself to the player. The CMGame-HttpServer class handles incoming HTTP requests and displays web (HTML) pages. During request processing, they collect data and pass it on to other classes.

At the middle level, the structure that collects and represents the data sent by a user through the user interface is CMClickEvent when the user interacts with a field in the game. Its purpose is to transfer all necessary data from the user to the game. The data contains information about the row and column of the clicked cell, the role of the player, and the IP address of the current player, as proposed in Figure 1. The class transfers all the information collected from the Web interface to the server logic, so that the system can react to every offered action.

The background logic layer consists of the CMGame class, which represents the central logic of the game. Manages game flow, player data, tracks rounds, and handles incoming ClickEvents, i.e. information received from the middle layer. First, the events are processed, and only then are they used according to the rules of the game. The helper class is CMState, which stores or encapsulates the state of the game, including the current round, active players, and the timer for the current active round. As proposed in Figure 1, CMGame is supposed to be connected to the Planet C game package, or any other
<figure><img src="image_6.png" /><figcaption>**Figure 1:** Proposed Playable Architecture</figcaption></figure>

serious game.

The described architecture is intended to fully support Planet-C as well as further extensions of Cormas for other games. The current prototype implements the basic functionalities of data collection and transfer, while the integration with the Cormas simulation of the Planet-C game model is in progress.

# 6. Discussion

During the implementation of the hybrid game "Planet C", we had the opportunity to notice the shortcomings of the current version of Cormas. Practical work on the model identified several key technical challenges, as well as realistic potential solutions.

One of the improvements concerns the way agents make decisions within a simulation. In order to enable more flexible and extensible behavior of the agents, we came to the conclusion that it is necessary to introduce the Strategy design template. This pattern enables different behavioral strategies to be encapsulated as separate classes that can be dynamically assigned to agents. In this way, it is possible to define several different types of agents that behave according to specific rules, without having to change the basic agent class. This would represent a step towards more flexible and realistic models based on real-life tactics derived from interviews with interviewees.

In addition, we have developed a special Delay class (PlanetCDelay) that functions as a timer in the simulation. In Planet C, the timer plays a key role because it is important to control the delays of certain events, which contributes to a more realistic behavior of the simulation. Since Cormas does not currently contain a Delay base class, a logical step in the next phase of development would be to reintegrate Delay as a concrete time controller.

# 7. Related Work

The simulation game ReHab was developed as an educational tool for a better understanding of collective decision-making in the management of natural resources [3]. Participants take specific roles, and special attention is paid to the impact of communication on management outcomes. In a more flexible game scenario, with permitted communication, new rules and roles can be proposed, which encourages creative forms of collective behavior. The paper shows that communication improves performance in terms of overall harvest and resource conservation. By questioning, participants passively learn about rights and the enforcement of agreements, making the game a valuable example of participatory modelling. Such approaches illuminate the potential of serious games to support collective learning
and decision-making, which directly inspires our work on developing a gamified architecture within Cormas, which integrates serious game mechanics into agent-based models.

## 8. Conclusion

Companion modelling represents an innovative and participatory approach for understanding and solving complex socio-ecological problems. Based on active cooperation between researchers and local stakeholders, and through the combination of agent-based models and serious games, ComMod enables not only the simulation of real scenarios, but also learning through experience, joint decision-making, and strengthening of collective awareness of the management of common resources. The role of software tools, such as Cormas, in this process is crucial. Cormas enables direct interaction with models, their modification in real time, as well as visualization of complex interactions between agents. However, its support for implementing hybrid games is still underdeveloped, despite the increasing interest of the ComMod community in this kind of interaction with models.

By implementing the *Planet C* model, we showed that the existing architecture of Cormas can be extended with certain principles of software practice. Proposals such as the *Game* class for game support and concrete elements such as *Delay* for time management within simulations have been introduced. The need to apply the Strategy design template, which enables flexible definition of different types of agents and their behaviors, was proposed. The results of this work represent the foundation for further research and development of agent-based games in Cormas. In the future, the development of a user interface that allows players to directly interact with their agents via a smartphone could significantly contribute to the usability of the system and its application in real sessions.

In situations of conflict over natural resources, where discussions between local stakeholders are often difficult, it is crucial to pursue the development of hybrid simulations, supported, of course, by ethical approaches to animation. Cormas can play this role as an integrating tool combining computer simulation and serious games. Our proposals would provide greater flexibility in the design of participative simulations. This tool could then be used in the field of education, communication facilitation and collective decision-making.

## Acknowledgments

We would like to thank the Erasmus+ KA1 project for sponsoring the internship of Jovan Kupusović at UMR SENS, CIRAD.

## Declaration on Generative AI

The author(s) have not employed any Generative AI tools.

## References

[1] G. Abrami, W. Daré, R. Ducrot, N. Salliou, P. Bommel, Participatory modelling, in: The Routledge Handbook of Research Methods for Social-Ecological Systems, Routledge, 2021, pp. 189–204.

[2] F. Bousquet, I. Bakam, H. Proton, C. Le Page, Cormas: common-pool resources and multi-agent systems, in: International conference on industrial, engineering and other applications of applied intelligent systems, Springer, 1998, pp. 826–837.

[3] C. L. Page, A. Dray, P. Perez, C. Garcia, Exploring how knowledge and communication influence natural resources management with rehab, Simulation & Gaming 47 (2016) 257–284.

[4] G. Quesnel, R. Duboz, É. Ramat, The virtual laboratory environment–an operational framework for multi-modelling, simulation and analysis of complex dynamical systems, Simulation Modelling Practice and Theory 17 (2009) 641–653.
[5] C. M. Macal, M. J. North, Agent-based modeling and simulation, in: Proceedings of the 2009 winter simulation conference (WSC), IEEE, 2009, pp. 86–98.

[6] U. Wilensky, K. Reisman, Thinking like a wolf, a sheep, or a firefly: Learning biology through constructing and testing computational theories - an embodied modeling approach, Cognition and Instruction 24 (2006) 171–209. doi:10.1207/s1532690xci2402_1.

[7] T. Susi, M. Johannesson, P. Backlund, Serious games: An overview (2007).

[8] M. Wesselow, S. Stoll-Kleemann, Role-playing games in natural resource management and research: Lessons learned from theory and practice, The Geographical Journal 184 (2018) 298–309.

[9] R. Rodela, A. Ligtenberg, R. Bosma, Conceptualizing serious games as a learning-based intervention in the context of natural resources and environmental governance, Water 11 (2019) 245. doi:10.3390/w11020245.

[10] A. Wein, W. Labiosa, Serious games experiment toward agent-based simulation, Technical Report, US Geological Survey, 2013.

[11] O. Barreteau, M. Antona, P. D'Aquino, S. Aubert, S. Boissau, F. Bousquet, W. Daré, M. Etienne, C. Le Page, R. Mathevet, et al., Our companion modelling approach (2003).

[12] F. Bousquet, G. Trébuil, Training on multi-agent systems, social sciences, and integrated natural resource management: lessons from an inter-university project in thailand, Companion Modeling and Multi-Agent Systems for Integrated Natural Resource Management in Asia (2005) 309.

[13] M. Étienne, Companion modelling, A participatory Approach to Support Sustainable Development. Éditions Quæ, Versailles, FR (2014).

[14] C. Barnaud, A. V. Paassen, Equity, power games, and legitimacy: Dilemmas of participatory natural resource management, Ecology and Society 18 (2). https://doi.org/10.5751/ES-05459-180221 (2013).

[15] P. Bommel, N. Becu, C. Le Page, F. Bousquet, Cormas, an agent-based simulation platform for coupling human decisions with computerized dynamics, in: Simulation and Gaming in the Network Society, Springer, 2016, pp. 387–410.

[16] C. Le Page, N. Becu, P. Bommel, F. Bousquet, Participatory agent-based simulation for renewable resource management: The role of the Cormas simulation platform to nurture a community of practice, Journal of Artificial Societies and Social Simulation 15 (2012) 10. doi:10.18564/jasss.1928.

[17] T. Szczepanska, P. Antosz, J. O. Berndt, M. Borit, E. Chattoe-Brown, S. Mehryar, R. Meyer, S. Onggo, H. Verhagen, Gam on! six ways to explore social complexity by combining games and agent-based models, International Journal of Social Research Methodology 25 (2022) 541–555. doi:10.1080/13645579.2022.2050119.

[18] M. Remondino, Multi-agent based modelling: from social simulation to real time strategy games, in: Proceedings of GAME-ON, Eurosis, 2003, pp. 135–139.

[19] O. Zaitsev, F. Vendel, E. Delay, Cormas: The software for participatory modelling and its application for managing natural resources in senegal, in: European Conference on Parallel Processing, Springer Nature Switzerland, Cham, 2023, pp. 76–84.