Simulation techniques, from distributed artificial intelligence, make it possible to analyze complex systems with a level of discretization that is increasingly fine, whether in space and time. Multi-agent systems (MAS) were created in this context, at the interface between Distributed Artificial Intelligence and Artificial Life (Ferber and Perrot, 1995). The principle of MAS is based on the design, construction, and modeling of a complex system composed of individualized entities that can act autonomously, interacting with each other (Treuil et al., 2001). These entities are called agents. The use of MAS, highly valued in environmental sciences (Bolton and Berglund, 2023; Dawson et al., 2011; Lammoglia et al., 2018; Zhuo and Han, 2020), has become increasingly common in geography (Caillault, 2011; Galán et al., 2009; Gutierrez-Milla et al., 2014; Lammoglia, 2011) and even in more specialized fields such as hydrology (Servat, 2000; Reaney, 2008; Rakotoarisoa et al., 2014; Fleurant, 2016; Reulier et al., 2019; Rakotoarisoa et al., 2023).
The modeling approach typically follows a structured process composed of several steps (Beven, 2001; Bouquet et al., 2015; Rakotoarisoa, 2017)): (i) questioning, (ii) identification of processes to be modeled, elements that should compose the model, their interactions, and the actions that each of these elements should perform during a simulation, (iii) conceptualization of the system and processes (we speak of conceptual model, at this stage, we are not yet subject to constraints related to platform specificities), (iv) the implementation phase or the coding phase, and finally (v) the exploration phase (calibration, sensitivity analysis). In this article, we will focus on the implementation or coding phase.
The implementation1 of a model is a typical task assigned to computer scientists. Currently, the scientific community is increasingly using platforms that are dedicated to modeling language, which allows a thematic scientist to compute its own mode. In that case, the implementation of the model legitimately falls within the work of the scientific researcher.
The proliferation of multiple programming platforms in recent decades has made the implementation phase easier. However, this phenomenon creates a concern: the existence of the same conceptual model behaving differently depending on the platform where it is programmed. All of these platforms have their own specificities, and some are specially dedicated to the multi-agent approach. Taillandier et al., (2014) and Langlois et al., (2015) suggested a categorization of these platforms based on the type of language used:
(i) First, some platforms use generic or general-purpose programming languages, such as C++, Java, or Python. To use these kind of platforms, a good foundation in computer programming is required, but in return, they offer a great deal of freedom to the modeler and allow for the development of very rich and complex models in terms of processes. Repast (Collier, 2001), Swarm (Minar et al., 1996), and Mason (Luke et al., 2005) are part of the this first category.
(ii) A second category of platforms uses dedicated programming languages. Therefore, it is easier to use these platforms compare to the ones mentioned above. These plateforms allow non-computer scientists to make their own implementation. Some basic knowledge and ease in algorithmics are still required to get the most out of these platforms. As an example of a dedicated language, there is the Logo language used by the NetLogo platform (Wilensky, 1999) or the GAML (GAma Modeling Language) language used in GAMA (Grignard et al., 2013), or even CORMAS (Bousquet et al., 1998), which uses the Smalltalk language.
(iii) The last category groups platforms that do not require knowledge of algorithms because they use a graphical modeling language. These platforms are therefore designed to be accessible to all scientists as they are simple to use. They mainly use a graphical and user-friendly interface to build a model. No coding step is therefore required. However, their simplicity limits their ability to produce models with high levels of complexity. In this category, we can cite the "model builder" module of ArcGIS (ESRI, 2013), StarLogo TNG (Klopfer et al., 2009), MAgéo (Langlois et al., 2015), or AgentSheets (Repenning, 2011).
The two platforms used in this work, Netlogo (Wilensky, 1999) and Gama (Grignard et al., 2013), both belong to the second category. Therefore, they both have a significant potential for developing complex models. However, they differ in many ways.
Most of the time, researchers use a platform that they consider suitable for their work and that they are familiar with. Depending on their needs, they adopt a programming and development method adapted to their abilities and resources. Few researchers replicate their models on other platforms (Bajracharya and Duboz, 2013; Donkin et al., 2017). Indeed, there are few publications documenting the replication of multi-agent models between platforms, and even fewer for geographical models. Those that have been published have dealt with relatively simple models.
However, this approach offers great advantages. One of the best ways to validate the model implementation is to program it on another platform and compare the output of the two models. We can then answer the question: is the implemented model the one I wanted to implement? This is referred to an « internal validation » (Amblard et al., 2006). This cross-platform comparison exposes the model to internal examination and facilitates an analysis of robustness that is rarely carried out. This results in more reliable and better-documented models in terms of implementation (Easterbrook, 2014). The use of model replication and reuse of models could really be a positive evolution for geographic multi-agent models (Thiele and Grimm, 2015).
However, this raises some challenges in the current scientific environment. In practice, replicating models, even simple ones, on several platforms can be a long and complicated task (Wilensky and Rand, 2007). Moreover, multi-agent models used in environmental geography mostly represent the functioning of natural systems and are therefore often very complex (Caillault, 2011; Gaudou et al., 2013; Thiele and Grimm, 2015). In addition, the transposition of the conceptual model into an operational model (during implementation) can cause disturbances induced by platform specificities (Bajracharya and Duboz, 2013). These disturbances can differ from one platform to another.
This paper aims to highlight these difficulties through the implementation of a relatively simple model on two different platforms. The goal is to show, in detail, the perturbations and differences related to the platforms, and then compare the outputs and results from each implementation.
The conceptual model chosen to illustrate this work is a flood evacuation model (Rakotoarisoa et al., 2018). This specific model was chosen as relevant for our research because it integrates both the complexity of natural phenomenon (flooding) and human behavior, while also emphasizing the spatial aspect. The development of the conceptual model, as well as the two implementations, was carried out by the same authors to avoid biases related to changes in operator during different phases of the study.
Two specific platforms were used: NetLogo (Wilensky, 1999) and GAMA (GIS and Agent-based Modelling Architecture; Grignard et al., 2013)
For the rest of the paper, we briefly present the conceptual model common to both implementations. Then, we introduce the platforms and justify why we chose to use them. Finally, we present the two implementations and explain the differences between them (operation and results) and discuss the contributions, advantages, and disadvantages of each type of implementation.