File Exchange

image thumbnail

Minimizing the Himmelblau Function using GA and PSO

version (14.1 MB) by Karl Ezra Pilario
Genetic algorithm (GA) and Particle Swarm Optimization (PSO) for minimizing a multi-modal function


Updated 20 Aug 2020

View Version History

View License

This submission contains standard implementations of GA and PSO for minimizing the Himmelblau function. This function has 2 decision variables and is mutli-modal, i.e. it has 4 known minima within the bounds [-5, 5]. Thus, the answer would be any one among the 4 minima, and is different each time the codes are run.

The outputs of PSOHimmel.m and GAHimmel.m are:
1. Plot of worst, average, and best solutions against the elapsed iterations.
2. Plot of all candidates as a moving scatter plot on the search space.
3. Global minima where the run has converged.

Cite As

Karl Ezra Pilario (2021). Minimizing the Himmelblau Function using GA and PSO (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!