Skip to content

AIMSIIITA/Consensus-Model

Repository files navigation

Consensus-Model

Table of Contents

  1. Project Description
  2. Features
  3. Branch Information
  4. Technologies Used
  5. Installation Instructions
  6. Usage Instructions
  7. Example/Preview
  8. Contributing Guidelines
  9. License
  10. Contact Information

Project Description

This project focuses on consensus and obstacle avoidance in swarm robotics using various models, including the voter model, HK model, and majority rule model. The objective is to simulate and analyze how different decision-making strategies can be applied to swarms to achieve efficient navigation and obstacle avoidance.

Features

  • Implementation of consensus algorithms for swarm robotics.
  • Simulation of obstacle avoidance.
  • Analysis and comparison of different decision-making models.
  • Detailed reports and presentations for each model.
  • Simulation videos showcasing model performance.

Branch Information

Main (Consensus Model)

Description: This is the main branch containing the comprehensive consensus model implementation. The main branch serves as the backbone of the project, integrating various decision-making models for swarm robotics and their respective obstacle avoidance techniques. The models were developed using Python, with simulations built from scratch using libraries such as Pygame for visual representation, Matplotlib for data plotting, and in many cases, deep reinforcement learning facilitated by OpenAI Gymnasium.

In this branch, extensive work has been done to ensure that the simulations are robust and scalable. Each model was meticulously tested to handle various swarm sizes and dynamic obstacle environments. The codebase is well-documented, making it easy for new contributors to understand the implementation details.

Key Files/Directories:

Branch 1: HK Model

Description: The Hegselmann-Krause (HK) model branch focuses on implementing the HK consensus model for swarm robotics. This model is essential for understanding how agents in a swarm can reach consensus over time while avoiding obstacles. The simulations were meticulously developed from scratch using Pygame for rendering the agent movements, Matplotlib for plotting the data, and incorporating deep reinforcement learning techniques using OpenAI Gymnasium to enhance the decision-making process of the agents. This approach allows for a robust simulation environment where swarms can adapt to dynamic obstacles and changing conditions.

In this branch, the HK model was extended to include obstacle avoidance, making it a comprehensive tool for studying real-world swarm behaviors. Detailed presentations and reports were created to document the methodology and findings, providing valuable insights for further research.

Key Files/Directories:

Branch 2: Swarm Majority Rule

Description: This branch implements the swarm majority rule model, a decision-making process where the majority vote determines the action of the swarm. The simulations in this branch are crafted from scratch, utilizing Pygame for the visualization of agent movements and interactions, and Matplotlib for analyzing the simulation results. Deep reinforcement learning is integrated through OpenAI Gymnasium to refine the agents' ability to navigate and avoid obstacles based on the majority rule consensus. This model demonstrates how simple majority voting mechanisms can lead to efficient and robust swarm behaviors in complex environments.

In this branch, the focus was on optimizing the majority rule decision-making process to handle real-time dynamic changes in the environment. Comprehensive presentations and detailed reports were created to capture the essence of the model and its effectiveness in various scenarios.

Key Files/Directories:

Branch 3: Voter Model

Description: The voter model branch is dedicated to implementing the voter model for consensus and obstacle avoidance in swarm robotics. This model explores how individual agents, acting based on the state of their neighbors, can achieve consensus and navigate through environments with obstacles. The simulation is developed using Pygame for dynamic visualization, Matplotlib for detailed data analysis, and incorporates deep reinforcement learning via OpenAI Gymnasium to optimize the agents' decision-making processes. The voter model is particularly effective in demonstrating decentralized decision-making and its impact on swarm behavior.

This branch involved extensive experimentation to refine the voter model, ensuring it performs efficiently in various scenarios. Detailed documentation, including research papers and presentations, was created to provide a thorough understanding of the model and its applications.

Key Files/Directories:

Technologies Used

  • Python
  • Pygame
  • Matplotlib
  • Deep Reinforcement Learning
  • OpenAI Gymnasium

Installation Instructions

  1. Clone the repository:
    git clone https://github.com/AIMSIIITA/Consensus-Model.git
  2. Navigate to the project directory:
    cd Consensus-Model
  3. Install necessary dependencies:
    pip install -r requirements.txt

Usage Instructions

Running the Simulations

  1. For the HK model:
    python HKModel.py
  2. For the Voter model:
    python CONSENSUS_AND_OBSTACLE_AVOIDANCE_USING_VOTER_MODEL.py
  3. For the Swarm Majority Rule model:
    python Consensus_and_Obstacle_Avoidance_using_Majority_Rule.py

Example/Preview

Obstacle Avoidance Simulation

Contributing Guidelines

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a pull request.

Please ensure your code adheres to our coding standards and includes relevant tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact Information

For any questions or suggestions, please contact us at [email protected].


Feel

Contributing Guidelines

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (`git commit -m 'Add some feature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages