Back to Trending
RepositoryPython
paul-shuvo

paul-shuvo/MSN-Flocking-Formation-Control

:flying_saucer: An implementation of multi-agent flocking formation control with specific formations that can follow a target without collision and can avoid obstacles.

71stars
10forks
0issues
2views

MSN Flocking Formation Control

This is an implementation of the MSN Flocking Formation Control presented in the paper Flocking for Multi-Agent Dynamic Systems: Algorithms and Theory.

Citation

BibTex

@software{Shuvo_Kumar_Paul_MSN-Flocking-Formation-Control_An_implementation_2021,
author = {{Shuvo Kumar Paul}},
month = feb,
title = {{MSN-Flocking-Formation-Control: An implementation of multi-agent flocking formation control with specific formations that can follow a target without collision and can avoid obstacles}},
year = {2021}
}

APA

Shuvo Kumar Paul. (2021). MSN-Flocking-Formation-Control: An implementation of multi-agent flocking formation control with specific formations that can follow a target without collision and can avoid obstacles [Computer software]

Getting started

$ git clone
$ cd 
$ pip install

Run the python files for each of the five cases explained below.

$ python src/msn_1.py

Project parameters:

  • Number of sensor nodes: n =100.
  • Space dimensions: m = 2.
  • Desired distance among sensor node: d = 15.
  • Scaling factor: k = 1.2 and interaction range r = k*d.
  • Epsilon = 0.1 and Delta_t = 0.009 (These two parameters are optional and you can change them).

Variable names

For easier understanding the variables are named similar to the equations described below.

For example, is denoted as C1_ALPHA (all capital as it's a constant), is denoted as p_i_k, and so on.

Cases

Case 1 - MSN Fragmentation

Filename: msn_1.py

  • Randomly generates a connected network of 100 nodes in the area of 50x50.
  • Plots the initial deployment of the MSN of 100 nodes.
  • Links the neighboringing nodes together by a line.

Plots

  • Plots the fragmentation of the nodes.
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.

Algorithm 1:





Result


Case 2 - Implements MSN Quasi-Lattice Formation with static target

Filename: msn_2.py

  • Randomly generates a connected network of 100 nodes in the area of 50x50.
  • Sets up a target (gamma agent) as static point with its coordinate (x = 150, y =150).
  • Implements flocking behavior of the MSN.

Algorithm 2 for Case 2:


Plots

  • Plots the flocking of the nodes.
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.

Result


Case 3 - Implements MSN Quasi-Lattice Formation with dynamic target (Sine wave trajectory)

Filename: msn_3.py

  • Randomly generates a connected network of 100 nodes in the area of 150x150.
  • Sets up a target (gamma agent) moving in a sine wave trajectory.
  • Implements flocking behavior of the MSN.

Algorithm 2 for Case 3:


Plots

  • Plots the flocking of the nodes following the target (Sine wave trajectory).
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.
  • Plots the center of mass and target trajectory.

Result


Case 4 - Implements MSN Quasi-Lattice Formation with dynamic target (Circular trajectory)

Filename: msn_4.py

  • Randomly generates a connected network of 100 nodes in the area of 150x150. In this case you
  • Sets up a target (gamma agent) moving in a circular trajectory.
  • Implements flocking behavior of the MSN.

Algorithm 2 for Case 3 (Same equation, change the values to make it a circular trajectory):


Plots

  • Plots the flocking of the nodes following the target (Circular trajectory).
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.
  • Plots the center of mass and target trajectory.

Result


Case 5 - Implements MSN Quasi-Lattice Formation with obstacle avoidance

Filename: msn_5.py

  • Randomly generates a connected network of 100 nodes in the area of 50x50.
  • Sets up a target (gamma agent) at the location of (200, 25).
  • Sets up an obstacle, circular in shape with a radius of 15 and its center location at (100,25).
  • Implements flocking behavior of the MSN avoiding obstacles.

Algorithm 3:




Plots

  • Plots the flocking of the nodes following the target, avoiding obstacles.
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.
  • Plots the center of mass and target trajectory.

Result


Similar Projects

Discover other similar projects and AI models.

RepositoryJavaScript
anuraghazra/EvolutionAquerium

:fish: :bug: Small Inteli Creatures Based On Steering Behaviours

197
Feb 12, 2022
RepositoryC#
nvjob/nvjob-boids

#NVJOB Simple Boids (Flocks of Birds, Fish and Insects). Flocking Simulation. Free Unity Asset.

105
Apr 10, 2023
RepositoryPython
langflow-ai/langflow

Langflow is a powerful tool for building and deploying AI-powered agents and workflows.

157.1k
Dec 1, 2026
RepositoryPython
commaai/openpilot

openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system on 300+ supported cars.

64.2k
Nov 26, 2026
RepositoryPython
microsoft/markitdown

Python tool for converting files and office documents to Markdown.

199.5k
Dec 2, 2026
RepositoryPython
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

188.2k
Nov 29, 2026
RepositoryTypeScript
TauricResearch/TradingAgents

TradingAgents: Towards Agentic Finance Research

124.3k
Nov 25, 2026
Repository
Developer-Y/cs-video-courses

List of Computer Science courses with video lectures.

85.1k
Nov 28, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026