This project is dedicated to optimizing benchmark functions like Bohachevsky, Ackley, Schwefel, and Himmelblau using Evolutionary Algorithms (EAs), specifically Particle Swarm Optimization (PSO) and Grey Wolf Optimization (GWO). It features a GUI for visualizing the optimization process in both 2D and 3D, allowing users to interactively choose variables and observe algorithm performance.
- Optimization: Utilizes PSO and GWO for function optimization.
- Visualization: Offers 2D and 3D visualization of the optimization process.
- Benchmark Functions: Includes Bohachevsky, Ackley, Schwefel, and Himmelblau functions.
- Interactive GUI: Built with Tkinter for a user-friendly experience to make it easy to visualize the movement of particles.
- Install dependencies:
pip install numpy matplotlib
- Run the GUI:
python swarm/UI.py
- Select the algorithm (PSO/GWO) and function.
- Set algorithm parameters (particles, iterations, etc.).
- Visualize and analyze the optimization process.
Comparing_algorithms.py
: the main file to get the difference between 2 algorithms considering iterations and best fitness value.PSO_algorithm.py
: the main code of the Particle swarm optimization algorithm.GWO_algorithm.py
: the main code of the Grey Wolf Optimizer algorithm.PSO_animated.py
: PSO implementation with animation and visualization of the plot in 3d and 2d perspective.GWO_animated.py
: GWO implementation with animation and visualization of the plot in 3d and 2d perspective.Common_libs.py
: Shared utilities for PSO and GWO.
Follow the GUI instructions to run PSO and GWO algorithms, adjust parameters, and visualize the optimization in real-time.
Supported functions:
- Bohachevsky Function:
- Ackley Function:
- Schwefel Function:
- Himmelblau Function:
- NumPy: For numerical computations.
- Matplotlib: For creating visualizations.
- Python: the main programming language algorithms implemented with it.
This project is inspired by the extensive research in Swarm Intelligence and optimization algorithms.
Contributions are welcome! Please read the contributing guidelines to get started.