Abstract
This paper advocates the use of compositional specifications based on formal languages as a means of modelling and analysing sophisticated collective behaviour in natural systems. With the use of appropriate linguistic constructs, models can be developed that are both compact and intuitive, and can be easily refined and extended in small steps. Automated workflows can be implemented on top of this methodology to provide quick feedback, enabling rapid design iterations. To support our argument, we present three examples from the natural world, focusing on flocks of birds and colonies of ants, which feature well-known examples of emergent behaviour in collective adaptive systems. We use an agent-based language to develop simple models that aim at capturing these collective phenomena, and discuss the specific language constructs that we use in the process. Then, we adapt an existing verification tool for the language to simulate our models, and show that our simulations do display emergent behaviour.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Antuña, L.R., Araiza-Illan, D., Campos, S., Eder, K.: Symmetry reduction enables model checking of more complex emergent behaviours of swarm navigation algorithms. In: 16th Annual Conference Towards Autonomous Robotic Systems (TAROS). LNCS, vol. 9287, pp. 26–37. Springer, Berlin (2015). https://doi.org/10.1007/978-3-319-22416-9_4
Ballerini, M., Cabibbo, N., Candelier, R., Cavagna, A., Cisbani, E., Giardina, I., Lecomte, V., Orlandi, A., Parisi, G., Procaccini, A., Viale, M., Zdravkovic, V.: Interaction ruling animal collective behavior depends on topological rather than metric distance: evidence from a field study. Proc. Natl. Acad. Sci. 105(4), 1232–1237 (2008). https://doi.org/10.1073/pnas.0711437105
Beckers, R., Deneubourg, J.L., Goss, S., Pasteels, J.M., et al.: Collective decision making through food recruitment. Insectes Soc. 37(3), 258–267 (1990)
Beckers, R., Deneubourg, J.L., Goss, S.: Trail laying behaviour during food recruitment in the ant Lasius niger (L.). Insectes Soc. 39, 59–72 (1992)
Bernstein, R.A.: Foraging strategies of ants in response to variable food density. Ecology 56(1), 213–219 (1975)
Bialek, W., Cavagna, A., Giardina, I., Mora, T., Silvestri, E., Viale, M., Walczak, A.M.: Statistical mechanics for natural flocks of birds. Proc. Natl. Acad. Sci. 109(13), 4786–4791 (2012)
Brambilla, M., Ferrante, E., Birattari, M., Dorigo, M.: Swarm robotics: a review from the swarm engineering perspective. Swarm Intell. 7(1), 1–41 (2013). https://doi.org/10.1007/s11721-012-0075-2
Cederman, L.E.: Endogenizing geopolitical boundaries with agent-based modeling. Proc. Natl. Acad. Sci. 99(Suppl 3), 7296–7303 (2002). https://doi.org/10.1073/pnas.082081099
Cimatti, A., Clarke, E.M., Giunchiglia, E., Giunchiglia, F., Pistore, M., Roveri, M., Sebastiani, R., Tacchella, A.: NuSMV 2: an opensource tool for symbolic model checking. In: 14th International Conference on Computer Aided Verification (CAV). LNCS, vol. 2404, pp. 359–364. Springer, Berlin (2002). https://doi.org/10.1007/3-540-45657-0_29
Clarke, E., Kroening, D., Lerda, F.: A tool for checking ANSI-C programs. In: 10th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS). LNCS, pp. 168–176. Springer, Berlin (2004). https://doi.org/10.1007/978-3-540-24730-2_15
De Nicola, R., Di Stefano, L., Inverso, O.: Multi-agent systems with virtual stigmergy. Sci. Comput. Program. 187, 102345 (2020). https://doi.org/10.1016/j.scico.2019.102345
De Nicola, R., Di Stefano, L., Inverso, O., Valiani, S.: Modelling flocks of birds from the bottom up. In: Margaria, T., Steffen, B. (eds.) 11th International Symposium on Leveraging Applications of Formal Methods, Verification and Validation. Adaptation and Learning (ISoLA). LNCS, vol. 13703, pp. 82–96. Springer, Berlin (2022). https://doi.org/10.1007/978-3-031-19759-8_6
Demsar, J., Lebar Bajec, I.: Simulated predator attacks on flocks: a comparison of tactics. Artif. Life 20(3), 343–359 (2014). https://doi.org/10.1162/ARTL_a_00135
Deneubourg, J.L., Pasteels, J.M., Verhaeghe, J.C.: Probabilistic behaviour in ants: a strategy of errors? J. Theor. Biol. 105(2), 259–271 (1983)
Desai, A., Saha, I., Yang, J., Qadeer, S., Seshia, S.A.: DRONA: a framework for safe distributed mobile robotics In: ICCPS (2017). https://doi.org/10.1145/3055004.3055022
Di Stefano, L., Lang, F.: Verifying temporal properties of stigmergic collective systems using CADP. In: 10th International Symposium on Leveraging Applications of Formal Methods, Verification and Validation (ISoLA). LNCS, vol. 13036, pp. 473–489. Springer, Berlin (2021). https://doi.org/10.1007/978-3-030-89159-6_29
Di Stefano, L., Lang, F., Serwe, W.: Combining SLiVER with CADP to analyze multi-agent systems. In: 22nd International Conference on Coordination Models and Languages (COORDINATION). LNCS, vol. 12134, pp. 370–385. Springer, Berlin (2020). https://doi.org/10.1007/978-3-030-50029-0_23
Di Stefano, L., De Nicola, R., Inverso, O.: Verification of distributed systems via sequential emulation. ACM Trans. Softw. Eng. Methodol. 31(3), 37 (2022). https://doi.org/10.1145/3490387
Dorigo, M., Bonabeau, E., Theraulaz, G.: Ant algorithms and stigmergy. Future Gener. Comput. Syst. 16(8), 851–871 (2000)
Dussutour, A., Fourcassié, V., Helbing, D., Deneubourg, J.L.: Optimal traffic organization in ants under crowded conditions. Nature 428(6978), 70–73 (2004)
Dussutour, A., Nicolis, S.C., Deneubourg, J.L., Fourcassié, V.: Collective decisions in ants when foraging under crowded conditions. Behav. Ecol. Sociobiol. 61, 17–30 (2006)
Emlen, J.T.: Flocking behavior in birds. The Auk 69(2), 160–170 (1952)
Fettke, P., Reisig, W.: Discrete models of continuous behavior of collective adaptive systems. In: 11th International Symposium on Leveraging Applications of Formal Methods (ISoLA), pp. 65–81. Springer, Berlin (2022)
Finkelshtein, D., Kondratiev, Y., Kutoviy, O.: Individual based model with competition in spatial ecology. SIAM J. Math. Anal. 41(1), 297–317 (2009). https://doi.org/10.1137/080719376
Francalanza, A., Aceto, L., Ingólfsdóttir, A.: On verifying Hennessy-Milner logic with recursion at runtime. In: 6th International Conference on Runtime Verification (RV). LNCS, vol. 9333, pp. 71–86. Springer, Berlin (2015). https://doi.org/10.1007/978-3-319-23820-3_5
Goss, S., Aron, S., Deneubourg, J.L., Pasteels, J.M.: Self-organized shortcuts in the Argentine ant. Naturwissenschaften 76(12), 579–581 (1989)
Inverso, O., Trubiani, C.: Parallel and distributed bounded model checking of multi-threaded programs. In: 25th Symposium on Principles and Practice of Parallel Programming (PPoPP), pp. 202–216. ACM, New York (2020). https://doi.org/10.1145/3332466.3374529
Koenig, N., Howard, A.: Design and use paradigms for Gazebo, an open-source multi-robot simulator. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), vol. 3, pp. 2149–2154. IEEE (2004). https://doi.org/10.1109/IROS.2004.1389727
Kouvaros, P., Lomuscio, A.: A counter abstraction technique for the verification of robot swarms. In: 29th Conference on Artificial Intelligence (AAAI), pp. 2081–2088. AAAI (2015)
Kuylen, E., Liesenborgs, J., Broeckhove, J., Hens, N.: Using individual-based models to look beyond the horizon: the changing effects of household-based clustering of susceptibility to measles in the next 20 years. In: 20th International Conference on Computational Science (ICCS). LNCS, vol. 12137, pp. 385–398. Springer, Berlin (2020). https://doi.org/10.1007/978-3-030-50371-0_28
Lebar Bajec, I., Zimic, N., Mraz, M.: Simulating flocks on the wing: the fuzzy approach. J. Theor. Biol. 233, 199–220 (2005). https://doi.org/10.1016/j.jtbi.2004.10.003
Leucker, M., Schallhart, C.: A brief account of runtime verification. J. Log. Algebraic Program. 78(5), 293–303 (2009). https://doi.org/10.1016/j.jlap.2008.08.004
Lomuscio, A., Qu, H., Raimondi, F.: MCMAS: an open-source model checker for the verification of multi-agent systems. Softw. Tools Technol. Transf. 19(1), 9–30 (2017). https://doi.org/10.1007/s10009-015-0378-x
Mehmood, U., Roy, S., Grosu, R., Smolka, S.A., Stoller, S.D., Tiwari, A.: Neural flocking: MPC-based supervised learning of flocking controllers. In: 23rd International Conference on Foundations of Software Science and Computation Structures (FoSSaCS). LNCS, vol. 12077, pp. 1–16. Springer, Berlin (2020). https://doi.org/10.1007/978-3-030-45231-5_1
Monmarché, N., Venturini, G., Slimane, M.: On how pachycondyla apicalis ants suggest a new search algorithm. Future Gener. Comput. Syst. 16(8), 937–946 (2000). https://doi.org/10.1016/S0167-739X(00)00047-9
Olfati-Saber, R.: Flocking for multi-agent dynamic systems: algorithms and theory. IEEE Trans. Autom. Control 51(3), 401–420 (2006). https://doi.org/10.1109/TAC.2005.864190
Pinciroli, C., Beltrame, G.: Buzz: an extensible programming language for heterogeneous swarm robotics. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 3794–3800. IEEE (2016). https://doi.org/10.1109/IROS.2016.7759558
Pinciroli, C., Trianni, V., O’Grady, R., Pini, G., Brutschy, A., Brambilla, M., Mathews, N., Ferrante, E., Di Caro, G., Ducatelle, F., Birattari, M., Gambardella, L.M., Dorigo, M.: ARGoS: a modular, parallel, multi-engine simulator for multi-robot systems. Swarm Intell. 6(4), 271–295 (2012). https://doi.org/10.1007/S11721-012-0072-5
Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science (FOCS), pp. 46–57. IEEE (1977). https://doi.org/10.1109/SFCS.1977.32
Quigley, M., Conley, K., Gerkey, B., Faust, J., Foote, T., Leibs, J., Berger, E., Wheeler, R., Ng, A.Y.: ROS: an open-source robot operating system. In: ICRA Workshop on Open Source Software (2009)
Resnick, M.: Turtles, Termites, and Traffic Jams - Explorations in Massively Parallel Microworlds. MIT Press, Cambridge (1998)
Reynolds, C.W.: Flocks, herds and schools: a distributed behavioral model. In: Proceedings of the 14th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 1987, Anaheim, California, USA, July 27-31, 1987, pp. 25–34. ACM (1987). https://doi.org/10.1145/37401.37406
Rohmer, E., Singh, S.P.N., Freese, M.: V-REP: a versatile and scalable robot simulation framework. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 1321–1326. IEEE (2013). https://doi.org/10.1109/IROS.2013.6696520
Scheibe, V.: Introduction and replication of a bird flocking behavior simulation. Zenodo (2023). https://doi.org/10.5281/ZENODO.8228783. https://zenodo.org/record/8228784
Sen, K., Viswanathan, M., Agha, G.: Statistical model checking of black-box probabilistic systems. In: 16th International Conference on Computer Aided Verification (CAV). LNCS, vol. 3114, pp. 202–215. Springer, Berlin (2004). https://doi.org/10.1007/978-3-540-27813-9_16
Shi, H., Wang, L., Chu, T.: Flocking of multi-agent systems with a dynamic virtual leader. Int. J. Control 82(1), 43–58 (2009). https://doi.org/10.1080/00207170801983091
Stiglitz, J.E., Gallegati, M.: Heterogeneous interacting agent models for understanding monetary economies. East. Econ. J. 37(1), 6–12 (2011). https://doi.org/10.1057/eej.2010.33
Sumpter, D.J., Beekman, M.: From nonlinearity to optimality: pheromone trail foraging by ants. Anim. Behav. 66(2), 273–280 (2003)
Sumpter, D.J., Blanchard, G.B., Broomhead, D.S.: Ants and agents: a process algebra approach to modelling ant colony behaviour. Bull. Math. Biol. 63(5), 951–980 (2001). https://doi.org/10.1006/bulm.2001.0252
Tofts, C.M.N.: Describing social insect behaviour using process algebra. Trans. Soc. Comput. Simul. 9, 227 (1992)
Tofts, C., Hatcher, M., Franks, N.: The autosynchronization of the ant Leptothorax acervorum (Fabricius): theory, testability and experiment. J. Theor. Biol. 157(1), 71–82 (1992)
Toner, J., Tu, Y.: Flocks, herds, and schools: a quantitative theory of flocking. Phys. Rev. E 58(4), 4828–4858 (1998). https://doi.org/10.1103/PhysRevE.58.4828
Traniello, J.F.: Foraging strategies of ants. Annu. Rev. Entomol. 34(1), 191–210 (1989)
Vásárhelyi, G., Virágh, C., Somorjai, G., Tarcai, N., Szörényi, T., Nepusz, T., Vicsek, T.: Outdoor flocking and formation flight with autonomous aerial robots. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 3866–3873. IEEE (2014). https://doi.org/10.1109/IROS.2014.6943105
Wilensky, U.: Modeling nature’s emergent patterns with multi-agent languages. In: EuroLogo (2001)
Winfield, A.F.T., Liu, W., Nembrini, J., Martinoli, A.: Modelling a wireless connected swarm of mobile robots. Swarm Intell. 2(2–4), 241–266 (2008). https://doi.org/10.1007/s11721-008-0018-0
Funding
Open access funding provided by Scuola IMT Alti Studi Lucca within the CRUI-CARE Agreement. Work partially funded by MIUR project PRIN 2017FTXR7S IT MATTERS (Methods and Tools for Trustworthy Smart Systems), ERC consolidator grant no.772459 D-SynMA (Distributed Synthesis: from Single to Multiple Agents), and PRO3 MUR project Software Quality.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
De Nicola, R., Di Stefano, L., Inverso, O. et al. Modelling flocks of birds and colonies of ants from the bottom up. Int J Softw Tools Technol Transfer 25, 675–691 (2023). https://doi.org/10.1007/s10009-023-00731-0
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-023-00731-0