Abstract
The popularity of rule-based flocking models, such as Reynolds' classic flocking model, raises the question of whether more declarative flocking models are possible. This question is motivated by the observation that declarative models are generally simpler and easier to design, understand, and analyze than operational models. We introduce a very simple control law for flocking based on a cost function capturing cohesion (agents want to stay together) and separation (agents do not want to get too close). We refer to it as declarative flocking (DF). We use model-predictive control (MPC) to define controllers for DF in centralized and distributed settings. A thorough performance comparison of our declarative flocking with Reynolds' model, and with more recent flocking models that use MPC with a cost function based on lattice structures, demonstrate that DF-MPC yields the best cohesion and least fragmentation, and maintains a surprisingly good level of geometric regularity while still producing natural flock shapes similar to those produced by Reynolds' model. We also show that DF-MPC has high resilience to sensor noise.
Introduction: The Shift from Operational to Declarative Control
Since Craig Reynolds introduced his seminal "Boids" model in 1987, the field of multi-agent flocking has been dominated by rule-based (operational) control. In these models, agents follow specific behavioral instructions—typically separation (avoiding collisions), cohesion (staying near the group), and alignment (matching velocity with neighbors)—to produce collective motion. While effective, these operational models can be difficult to analyze mathematically and often lead to fragmented or overly rigid formations in complex environments.
Recent research has explored alternatives, such as lattice-based models, which use potential functions to force agents into strict geometric patterns like honeycombs. However, these often lack the fluid, natural motion seen in biological flocks. This paper proposes a Declarative Flocking (DF) approach, shifting the focus from how agents should move to what the group's objective should be.
Methodology: Declarative Flocking via MPC
The core of the DF model is a minimalist cost function consisting of only two terms:
- Cohesion: Calculated as the average squared distance between all pairs of agents to ensure the group stays together.
- Separation: Defined as the sum of inverse squared distances between nearby neighbors to prevent collisions.
Notably, the model includes no explicit alignment term. To translate this goal into motion, the researchers employ Model Predictive Control (MPC). In this framework, an agent (or a central controller) predicts the state of the flock over a short future time horizon, identifies the trajectory that minimizes the cost function, and executes the immediate next step. The study evaluates both a Centralized version with global information and a Distributed version where agents rely on local observations and assume neighbors maintain constant velocity.
Experimental Results and Comparison
The DF-MPC model was benchmarked against Reynolds’ rule-based model, Olfati-Saber’s potential-based model, and two recent lattice-based MPC models using simulations of 30 agents in a 2D space.
Connectedness and Cohesion
Centralized DF-MPC proved superior in maintaining group integrity, consistently resulting in a single connected flock. In contrast, lattice-based models frequently fragmented into six or more isolated sub-groups. Furthermore, DF-MPC achieved the smallest flock diameter, indicating higher efficiency in maintaining a tight formation.
Geometric Regularity
One of the most surprising findings was the level of geometric regularity achieved by the Distributed DF-MPC. Despite lacking the explicit geometric constraints found in lattice-based models, the DF-MPC agents naturally organized into highly regular patterns.
Robustness to Noise
To test real-world applicability, the researchers introduced Gaussian sensing noise. While rule-based and potential-based models often collapsed under these conditions—fragmenting into dozens of isolated agents—DF-MPC remained remarkably robust, maintaining a cohesive group even with significant sensor errors.
Key Insights: Emergent Alignment
Perhaps the most significant theoretical insight is that alignment is an emergent property of the DF-MPC model. Although agents are never explicitly told to match velocities, the optimization process over a time horizon naturally favors parallel motion. Moving in the same direction minimizes future separation costs (by avoiding collisions) and cohesion costs (by preventing the group from drifting apart). This suggests that the complex "alignment" rule in traditional models may be a redundant byproduct of more fundamental goals.
Conclusion and Future Work
Declarative Flocking via MPC offers a simpler, more robust alternative to traditional rule-based systems. By defining flocking as a goal-seeking optimization problem, the model achieves superior cohesion and noise resilience while maintaining natural, fluid motion. Future research will address the computational overhead of MPC and investigate the model's performance under actuation noise and in the presence of faulty or adversarial agents.
Summary updated