Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nourmorsy/swarm-algorithm


https://github.com/nourmorsy/swarm-algorithm

python3 swarm-algorithm

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

# 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**:
```bash
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**:
```bash
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.