Speed-Weighted Adaptive Flocking for Sailing Swarms under Dynamic Environmental Forcing
Supplementary Material for SAB 2026
Pranav Kedia¹², Aaron Gan³, Hannah J. Williams¹⁴⁵, Andreagiovanni Reina¹²⁵, Heiko Hamann¹²
¹ Centre for the Advanced Study of Collective Behaviour, Konstanz, Germany ² Dep. of Computer and Information Science, University of Konstanz, Germany ³ University of Pittsburgh, Pittsburgh, USA ⁴ Department of Biology, University of Konstanz, Konstanz, Germany ⁵ Max Planck Institute of Animal Behavior, Konstanz, Germany
- Supplementary Material for SAB 2026
- Abstract
- Paper and Code
- Reproducibility
- Speed-Weighted Couzin Controller — Pseudocode
- Extended Results: 5 m/s Wind Conditions
- Wind Field Details
- Hardware: Aqua Flash Sailboat
- Acknowledgments
- Contact
Abstract
Collective behavior models such as aggregation and flocking usually assume self-propelled robots that can directly execute their desired speed and direction of motion. Autonomous sailing robots violate this assumption: their motion is shaped by wind-dependent propulsion, restricted headings, and spatially varying wind conditions. We introduce SailSwarmSwIM, a reduced-order simulator for autonomous sailing robot swarms, and a speed-weighted Couzin controller that accounts for each robot’s transient motion constraints. Across four wind conditions, moderate slow-neighbor weighting (small positive γ) improves polarization, reduces close encounters, and tightens cohesion, while strong weighting in either direction reveals distinct failure modes.
Paper and Code
| Resource | Link |
|---|---|
| Preprint (PDF) | Download |
| Simulator source | github.com/praked/SailSwarmSwIM |
| Hardware platform (Aqua Flash) | overhead video below |
Reproducibility
Install
# Editable / dev install (recommended for reproducing the sweep)
git clone https://github.com/praked/SailSwarmSwIM.git
cd SailSwarmSwIM
pip install -e .
A plain install is also available:
pip install git+https://github.com/praked/SailSwarmSwIM.git
Default parameters
These are the values used throughout the paper (also given in Table 1 of the main text):
| Parameter | Value | Meaning |
|---|---|---|
N | 10 | number of robots |
Lh | 35 m | arena half-size |
dt | 1 s | simulation step |
T | 300 s | run horizon |
R0 | central disk | initial spawn radius |
αng | 45° | no-go half-angle |
rrep | 4 m | repulsion radius |
rori | 10 m | orientation radius |
ratt | 18 m | attraction radius |
dnear | 1.0 m | unsafe-proximity threshold (logging) |
dsafe | 1.5 m | hard-repulsion safety threshold |
kp | 0.4 | luffing proportional gain |
ε | 0.1 | regularization in Eq. (6) |
γ | sweep [−2, 10] | speed-weighting exponent |
| seeds | 50 | per (controller, wind) cell |
| wind | {5, 10} m/s × {steady, gusty} | four conditions |
Speed-Weighted Couzin Controller — Pseudocode
The controller computes a desired social heading per robot, then projects it through the sailing-feasibility layer (no-go cone + tacking). The repulsion term is never speed-weighted; only orientation and attraction are.
Input: robot i at position pᵢ, heading ψᵢ, speed vᵢ
neighbors j ∈ Nᵢ with (pⱼ, ψⱼ, vⱼ)
zones rrep < rori < ratt
exponent γ (slow-fast axis)
constant ε > 0 (regularization)
# 1. Partition neighbors by distance
for j in Nᵢ:
dᵢⱼ = ‖pⱼ − pᵢ‖
r̂ᵢⱼ = (pⱼ − pᵢ) / dᵢⱼ
êⱼ = (cos ψⱼ, sin ψⱼ)
R = { j : dᵢⱼ < rrep } # repulsion
O = { j : rrep ≤ dᵢⱼ < rori } # orientation
A = { j : rori ≤ dᵢⱼ < ratt } # attraction
# 2. If any neighbor in R, repulsion overrides
if R ≠ ∅:
d_social = −Σ_{j∈R} r̂ᵢⱼ # Eq. (5), uniform
else:
# 3. Speed-weighted social vector (Eq. 6 + 7)
for j in O ∪ A:
wᵢⱼ = 1 / (vⱼ + ε)^γ
o_γ = Σ_{j∈O} wᵢⱼ · êⱼ
a_γ = Σ_{j∈A} wᵢⱼ · r̂ᵢⱼ
d_social = o_γ + a_γ
# 4. Map social vector to a desired heading
ψ* = atan2(d_social.y, d_social.x)
# 5. Project onto sailing-feasible cone (Eqs. 3–4)
δ = wrap(ψ* − θ_w(pᵢ, t))
if |δ| < α_ng: # inside no-go cone
ψ̃ = θ_w(pᵢ, t) + sign(δ) · α_ng # snap to close-hauled, tack
else:
ψ̃ = ψ*
# 6. Sail luffing for speed equalization (Eq. 8)
# Drives fast boats toward neighborhood mean speed.
v̄ = mean({vⱼ : j ∈ Nᵢ})
τᵢ = clip(1 − kp · max(0, vᵢ − v̄), 0, 1)
power_factor = 1 − (βᵢ / 180°)² · (1 − τᵢ)
# 7. Hand off to low-level sailing dynamics
return desired_heading = ψ̃, sail_trim = τᵢ
The interpretation of γ is:
| γ | Behavior | Effect |
|---|---|---|
γ < 0 | fast-neighbor following | heading dominated by quickest movers |
γ = 0 | uniform Couzin (with luffing) | classical zonal weighting |
0 < γ ≲ 0.3 | operating regime | improves all three metrics in all four winds |
γ ≳ 1 | slow-neighbor anchoring | cohesion gains, alignment cost |
γ → 10 | over-anchoring | flock compact but disordered |
Extended Results: 5 m/s Wind Conditions
The main text plots the γ-sweep for the two 10 m/s environments (Fig. 2). For completeness, the corresponding panels for the 5 m/s steady and 5 m/s + gusts environments are below. Same convention: median paired difference relative to the uniform Couzin baseline over 50 seed-matched runs, with IQR error bars; red markers are significant under Holm-corrected Wilcoxon (p < 0.05).
Effect of speed-weighting on alignment and safety in the 5 m/s environments. Each panel shows the median paired difference relative to the uniform Couzin baseline over 50 seed-matched runs; error bars show the interquartile range. Positive ΔΦ indicates improved alignment, while negative ΔC indicates fewer unsafe proximity events.
Per-seed steady-state distributions for alignment and safety in the 5 m/s environments. Each box summarizes one value per seed over t ∈ [100, 300] s across 50 runs.
Convex-hull area sweep
Median paired ΔAhull as a function of γ for all four wind conditions. Negative is better. Note the asymmetric failure modes: at γ = −2 the flock stretches (largest in 10 m/s + gusts); at γ = 10 cohesion reverses sign and the flock disperses under steady 10 m/s wind.
Wind Field Details
The wind field is w(x, y, t) = w_base(t) + w_gust(x, y, t):
- Steady conditions (5 m/s, 10 m/s) —
w_gust ≡ 0. Wind direction is fixed for the duration of the run. - Gusty conditions —
w_gustis a spatially correlated perturbation with bounded magnitude and slowly drifting direction, evaluated locally per robot. Two mechanically identical robots can therefore experience different apparent winds and consequently different feasible speeds. The wind enters the controller only through the realized speedsvⱼof neighbors (used in Eq. 6) and through the no-go projection (Eq. 4); the social rule itself has no explicit knowledge of the wind field.
Hardware: Aqua Flash Sailboat
The simulator is calibrated against the Aqua Flash autonomous sailing platform deployed on Lake Constance. The overhead video below shows live sailing maneuvers — including tacking through the no-go cone — that the SailSwarmSwIM dynamics layer is designed to capture in reduced-order form.
Sailing Maneuvers on Lake Constance by Aqua Flash sailboat robot (Overhead View)
Acknowledgments
This work has been supported by the DFG under Germany’s Excellence Strategy, EXC 2117 – 422037984.
Contact
For questions on the simulator or the experiments, please open an issue on github.com/praked/SailSwarmSwIM or get in touch.