SwarmRL: Building the Future of Smart Active Systems
Samuel Tovey, Christoph Lohrmann, Tobias Merkt, David Zimmer, Konstantin Nikolaou, Simon Koppenhöfer, Anna Bushmakina, Jonas Scheunemann, Christian Holm
TL;DR
SwarmRL addresses barriers to micro-scale robotic control by providing an open-source, high-performance Python package that unifies classical control and deep reinforcement learning within simulation and real-experiment workflows. It fuses active-matter modeling based on overdamped Langevin dynamics with actor-critic reinforcement learning, enabling policy training through episodes using returns $G_t=\sum_{t'=t}^T \gamma^{t'-t} r_{t'}$ and advantage $A_t^\pi=G_t-V_t^\pi$. The architecture is modular and GPU-enabled via Flax/JAX, supporting heterogeneous agents, force functions, tasks, observables, intrinsic rewards, exploration strategies, and visualization through ZnVis, with PPO as a ready-made optimization method. This work aims to accelerate cross-disciplinary micro-robotics research by lowering entry barriers and enabling scalable evaluation on HPC clusters while bridging simulations with experiments.
Abstract
This work introduces SwarmRL, a Python package designed to study intelligent active particles. SwarmRL provides an easy-to-use interface for developing models to control microscopic colloids using classical control and deep reinforcement learning approaches. These models may be deployed in simulations or real-world environments under a common framework. We explain the structure of the software and its key features and demonstrate how it can be used to accelerate research. With SwarmRL, we aim to streamline research into micro-robotic control while bridging the gap between experimental and simulation-driven sciences. SwarmRL is available open-source on GitHub at https://github.com/SwarmRL/SwarmRL.
