This repository contains notebooks and support modules for decentralized multi-agent optimization experiments based on an expand-contract behavior.
The project focuses on how a fleet of agents balances:
- Connectivity preservation.
- Spatial coverage.
- Optional local task objectives for selected agents.
A team of mobile agents must coordinate in a bounded workspace while preserving communication links and maintaining useful spatial distribution.
At each decentralized update, an agent solves a local optimization problem that contributes to a global trade-off between connectivity and coverage. This trade-off is controlled by a scalar weight
- Expansion phases (
$\alpha > 0.5$ ) favor dispersion/coverage. - Contraction phases (
$\alpha < 0.5$ ) favor tighter and more robust connectivity.
The core research question is how well this decentralized policy:
- Traces the Pareto structure of connectivity vs coverage.
- Scales to full-fleet global-only optimization.
- Supports local mission objectives for selected agents.
- Remains robust under sensing and actuation noise.
For this reason, the project and manuscript follow the sequence:
- Pareto analysis.
- Global decentralized optimization.
- Local-goal decentralized optimization.
- Noise robustness analysis.
At each decentralized step, one moving agent optimizes its local decision while neighbors are fixed.
The implemented objective combines a global soft term and an optional local task term:
where:
-
$M_E$ : normalized coverage metric. -
$M_C$ : normalized connectivity metric. -
$\alpha$ : expansion-contraction weight. -
$w_l, w_g$ : local/global weights (for example global-only:$[0,1]$ , local+global:$[10,1]$ ).
For agents with assigned local goals, the local term is proportional to negative target distance:
and for agents without local tasks,
Connectivity is based on algebraic connectivity of the communication graph (normalized Laplacian):
where
Coverage is modeled from pairwise overlap penalties between agent disks of radius
and normalized as:
Higher
Candidate states are filtered by a hard connectivity condition: connected graphs are feasible and disconnected graphs are infeasible. Optuna's constrained sampler uses this feasibility signal during search.
Main work lives in Expand&Contract:
- Expand&Contract/ParetoMonteCarlo.ipynb: Monte Carlo exploration of connectivity-coverage trade-offs across fleet sizes.
- Expand&Contract/OptunaDecentralizedGlobal.ipynb: Decentralized optimization with global objective only.
- Expand&Contract/OptunaDecentralizedLocal.ipynb: Decentralized optimization with additional local goals for selected agents.
- Expand&Contract/NoiseMonteCarlo.ipynb: Robustness analysis under process and measurement noise.
- Expand&Contract/modules/FrameworkLib.py: Graph generation and metric utilities.
- Expand&Contract/modules/Optimization_optuna.py: Objective definition and Optuna integration.
- Expand&Contract/results: Stored outputs from previous experiment runs.
From the repository root:
cd Expand\&Contract
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtThen open the notebook folder in VS Code or Jupyter and select the environment created above.
If you are new to the project, follow this order:
- Expand&Contract/ParetoMonteCarlo.ipynb
- Expand&Contract/OptunaDecentralizedGlobal.ipynb
- Expand&Contract/OptunaDecentralizedLocal.ipynb
- Expand&Contract/NoiseMonteCarlo.ipynb
This progression matches the paper flow: Pareto, Global, Local, Noise.
Purpose:
- Generates connected random fleets over a 10x10 domain.
- Computes normalized connectivity and coverage metrics.
- Builds Pareto fronts for different fleet sizes.
Use it when:
- You want to understand feasible trade-off regions before running decentralized optimization.
Typical outputs:
- Pareto plots and Monte Carlo metric datasets under Expand&Contract/results/ParetoMonteCarlo.
Purpose:
- Runs decentralized, sequential agent updates using Optuna (NSGA-II sampling).
- Uses only global fleet objectives (coverage/connectivity blend).
- Evaluates expansion-contraction schedules controlled by
alpha.
Use it when:
- You want a baseline behavior without individual agent task constraints.
Key parameters to inspect:
N_agents,max_dist,box_margin.Niter(Optuna trials per update).n_cyclesandalphaschedule.cost_weights = [0, 1](global objective emphasis).
Typical outputs:
- Per-run summaries and metrics under Expand&Contract/results/OptunaDecentralizedGlobal.
Purpose:
- Extends decentralized optimization with local-goal terms for selected agents.
- Combines local task tracking with global connectivity/coverage objectives.
Use it when:
- You want to evaluate mission-like behavior where specific agents are assigned target waypoints.
Key parameters to inspect:
local_goal_agent_idsandlocal_goal_positions.cost_weights = [1e1-1e3, 1](play with different local-term influence).- Same cycle and alpha scheduling controls as global notebook.
Typical outputs:
- Per-run summaries and metrics under Expand&Contract/results/OptunaDecentralizedLocal.
Purpose:
- Repeats decentralized local-goal optimization over many experiments.
- Injects process noise and measurement noise.
- Aggregates robustness statistics (connectivity, coverage, connected-time behavior).
Use it when:
- You want sensitivity/robustness evidence for realistic sensing and actuation uncertainty.
Key parameters to inspect:
N_experiments.process_noise_stdandmeasurement_noise_std.Niter,n_cycles, and local-goal settings.
Typical outputs per run:
noise_mc_metrics.npznoise_mc_config.jsonnoise_mc_summary.yamlnoise_mc_results.yamlnoise_mc_results.jsonnoise_mc_wrapup.md
Saved under timestamped folders in Expand&Contract/results/NoiseMonteCarlo.
The repository already contains example outputs under Expand&Contract/results. You can:
- Open a run folder.
- Check configuration in
*_config.json. - Read summary in
*_summary.yamlor*_wrapup.md. - Load
*.npzfiles for plotting/analysis scripts.
- Run notebooks from top to bottom on a fresh kernel.
- Keep random seeds fixed when comparing parameter changes.
- Change one variable at a time (
alpha, noise level, local weights, or fleet size). - Preserve output folders with timestamps to keep experiments traceable.
- Import errors: verify the selected Python environment and install missing packages.
- Very slow optimization: reduce
Niter,N_agents, orn_cyclesfor quick checks. - Inconsistent comparisons: ensure seeds and scenario constants are identical across runs.
Notebook text references a CLAWAR 2026 context and manuscript-style reporting. Figures and related assets are available in Expand&Contract/CLAWAR2026_figures.