Online automatic code generation for robot swarms: LLMs and self-organizing hierarchy
Weixu Zhu, Marco Dorigo, Mary Katherine Heinrich
TL;DR
The paper tackles the problem of online, adaptive code generation for robot swarms by leveraging a self-organizing nervous system (SoNS) to provide global swarm estimation and temporarily centralized control. It proposes SoNS as middleware that enables dynamic hierarchies, allowing large-language models (LLMs) to generate and remotely update swarm behavior in real time. The authors demonstrate this approach in mixed aerial-ground swarms, achieving an 85% success rate across real and simulated trials and showing that on-the-fly LLM-generated Lua code can guide the swarm past obstacles. The work highlights the potential for scalable, adaptive swarm programming with SoNS-augmented architectures and outlines avenues for improving safety, code separation, and task complexity.
Abstract
Our recently introduced self-organizing nervous system (SoNS) provides robot swarms with 1) ease of behavior design and 2) global estimation of the swarm configuration and its collective environment, facilitating the implementation of online automatic code generation for robot swarms. In a demonstration with 6 real robots and simulation trials with >30 robots, we show that when a SoNS-enhanced robot swarm gets stuck, it can automatically solicit and run code generated by an external LLM on the fly, completing its mission with an 85% success rate.
