Welcome to the Swarm Intelligence Algorithms Repository! This repository contains implementations of various swarm intelligence algorithms in C++, OpenMP, CUDA, and Thrust. The goal of this repository is to provide a comprehensive collection of swarm intelligence algorithms for educational and research purposes.
- Particle Swarm Optimization (PSO)
- Firefly Algorithm (FA)
- Moth-Flame Optimization (MFO) Algorithm
- Grey Wolf Optimizer (GWO)
- Whale Optimization Algorithm (WOA)
- Artificial Bee Colony (ABC) Algorithm
- Dragonfly Algorithm (DA)
- Salp Swarm Algorithm (SSA)
- Grasshopper Optimization Algorithm (GOA)
- Ant Colony Optimization (ACO)
Each algorithm has its own dedicated folder, named after the algorithm's abbreviation (e.g., PSO, ACO, FA). Within each algorithm folder, you will find four subfolders:
CPP
: Contains the pure C++ implementation of the algorithm.OMP
: Contains the OpenMP implementation of the algorithm for parallel processing.THRUST
: Contains the THRUST implementation of the algorithm for GPU acceleration.CUDA
: Contains the CUDA implementation of the algorithm for GPU acceleration.
Inside each subfolder, you will find the respective code files and a README file with instructions on how to compile and run the code.
To compile and run CPP and OMP codes, make sure to have GCC installed. For CUDA and THRUST codes, make sure to have NVCC installed. Additionally, ensure CMake is installed for all. Simply navigate to the desired algorithm's folder and run make
to generate the executable file. After you're done running the executable, you can run make clean
to remove all of the generated files.
The benchmarking results presented in this repository were obtained under controlled conditions to ensure comparability across different implementations. Below are the details of the testing environment and parameters:
- Function Used for Testing: Rastrigin Function. Lower
Execution Time
andResult
means better performance. - Parameters: All algorithms were tested using identical parameters to ensure fair comparison.
- Hardware Specifications:
- CPU: Intel i9-12900K
- GPU: NVIDIA RTX A6000 (Ampere Architecture)
These specifications were maintained consistently to evaluate the performance of each algorithm implementation accurately.
Contributions to this repository are welcome! If you have an implementation of a swarm intelligence algorithm that is not currently included, or if you want to improve an existing implementation, please submit a pull request. Make sure to follow the repository's structure and provide clear instructions on how to compile and run your code.
For a detailed benchmarking study using the findings of this repository, you can read the article Swarm Intelligence Showdown: A Benchmarking Study on Medium.
This repository is licensed under the MIT License. Feel free to use the code for educational and research purposes. If you use any of the implementations in your work, please consider citing this repository.