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.
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.
-
Clone the repository:
git clone https://github.com/yourusername/Swarm-Algorithm
-
Install required dependencies: Ensure you have the necessary Python libraries installed. You can use
pip
to install any missing libraries. -
Run the any script:
python "file_name".py
This will execute and print the results.
The script runs each algorithm with the same initial population and prints the best solution, best fitness, and execution time for each algorithm.
Contributions are welcome! Please create a pull request or open an issue to discuss your changes or suggestions.