# MacroSwarm: A Field-based Compositional Framework for Swarm Programming

arXiv: https://arxiv.org/abs/2401.10969 · HTML: https://mlsanity.com/paper/2401.10969/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 12 of its 82 references that are in the map.
- First posted on arXiv 19 Jan 2024.

## Builds on (most cited first, 12 of 12)

- [Self-Organization and Artificial Life](https://mlsanity.com/paper/1903.07456/) (2019)
- [Macroprogramming: Concepts, State of the Art, and Opportunities of Macroscopic Behaviour Modelling](https://mlsanity.com/paper/2201.03473/) (2022)
- [A Higher-order Calculus of Computational Fields](https://mlsanity.com/paper/1610.08116/) (2016)
- [Engineering Resilient Collective Adaptive Systems by Self-Stabilisation](https://mlsanity.com/paper/1711.08297/) (2017)
- [Model Checking Spatial Logics for Closure Spaces](https://mlsanity.com/paper/1609.06513/) (2016)
- [Programming the Interactions of Collective Adaptive Systems by Relying on Attribute-based Communication](https://mlsanity.com/paper/1711.06092/) (2017)
- [Asynchronous Distributed Execution Of Fixpoint-Based Computational Fields](https://mlsanity.com/paper/1610.00253/) (2016)
- [Dolphin: a task orchestration language for autonomous vehicle networks](https://mlsanity.com/paper/1803.00944/) (2018)
- [Time-Fluid Field-Based Coordination through Programmable Distributed Schedulers](https://mlsanity.com/paper/2012.13806/) (2020)
- [Wirelessly Powered Urban Crowd Sensing over Wearables: Trading Energy for Data](https://mlsanity.com/paper/1611.05910/) (2016)
- [An Experimental Study on Direction Finding of Bluetooth 5.1: Indoor vs Outdoor](https://mlsanity.com/paper/2103.04121/) (2021)
- [The Resh Programming Language for Multirobot Orchestration](https://mlsanity.com/paper/2103.13921/) (2021)

## Built on by (most cited first, 2 of 2)

- [Proximity-based Self-Federated Learning](https://mlsanity.com/paper/2407.12410/) (2024)
- [FBFL: A Field-Based Coordination Approach for Data Heterogeneity in Federated Learning](https://mlsanity.com/paper/2502.08577/) (2025)

## Abstract (arXiv)

Swarm behaviour engineering is an area of research that seeks to investigate methods and techniques for coordinating computation and action within groups of simple agents to achieve complex global goals like pattern formation, collective movement, clustering, and distributed sensing. Despite recent progress in the analysis and engineering of swarms (of drones, robots, vehicles), there is still a need for general design and implementation methods and tools that can be used to define complex swarm behaviour in a principled way. To contribute to this quest, this article proposes a new field-based coordination approach, called MacroSwarm, to design and program swarm behaviour in terms of reusable and fully composable functional blocks embedding collective computation and coordination. Based on the macroprogramming paradigm of aggregate computing, MacroSwarm builds on the idea of expressing each swarm behaviour block as a pure function, mapping sensing fields into actuation goal fields, e.g., including movement vectors. In order to demonstrate the expressiveness, compositionality, and practicality of MacroSwarm as a framework for swarm programming, we perform a variety of simulations covering common patterns of flocking, pattern formation, and collective decision-making. The implications of the inherent self-stabilisation properties of field-based computations in MacroSwarm are discussed, which formally guarantee some resilience properties and guided the design of the library.
