Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.61 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.61 KB

Swarm Algorithms

Project Overview

This repository contains a Python script that implements and compares various swarm intelligence algorithms for optimization. The algorithms included are Particle Swarm Optimization (PSO), Teaching-Learning-Based Optimization (TLBO), Ant Colony Optimization algorithm (ACO), Artificial Bee Colony (ABC) for both minimization and maximization. The script evaluates these algorithms based on their ability to find the optimal solution and the time taken for the optimization process.


Files

  • PSO.py: Contains the implementation of the Particle Swarm Optimization algorithm.
  • TLBO.py: Contains the implementation of the Teaching-Learning-Based Optimization algorithm.
  • ACO.py: Contains the implementation of the Ant Colony Optimization algorithm.
  • ABC.py: Contains the implementation of the Artificial Bee Colony algorithm, including both minimization and maximization variants.

Usage

  1. Clone the repository:

    git clone https://github.com/yourusername/Swarm-Algorithm
  2. Install required dependencies: Ensure you have the necessary Python libraries installed. You can use pip to install any missing libraries.

  3. Run the any script:

    python "file_name".py

    This will execute and print the results.


Results

The script runs each algorithm with the same initial population and prints the best solution, best fitness, and execution time for each algorithm.


Contributing

Contributions are welcome! Please create a pull request or open an issue to discuss your changes or suggestions.