File Exchange

image thumbnail

Whale Optimization Algorithm Toolbox

version 1.0 (245 KB) by Seyedali Mirjalili
A toolbox for the Whale Optimization Algorithm (WOA) for solving optimization problems


Updated 22 May 2018

View License

This is a handy toolbox for the recently proposed Whale Optimization Algorithm (WOA) algorithm. The WOA algorithm is a new optimization technique for solving optimization problems. This algorithm includes three operators to simulate the search for prey, encircling prey, and bubble-net foraging behavior of humpback whales.
This is the source codes of the paper:

S. Mirjalili, A. Lewis, The Whale Optimization Algorithm, Advances in Engineering Software , in press, 2016, DOI:


Th original version of this algorithm can be found here:

If you have no access to the paper, please drop me an email at and I will send you the paper.

All of the source codes and extra information as well as more optimization techniques can be found in my personal website at

I have a number of relevant courses in this area. You can enrol via the following links with 95% discount:

A course on “Optimization Problems and Algorithms: how to understand, formulation, and solve optimization problems”:

A course on “Introduction to Genetic Algorithms: Theory and Applications”

Cite As

Seyedali Mirjalili (2020). Whale Optimization Algorithm Toolbox (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Hi Dr. Seyedali Mirjalili
Is there a code available for binary and multi-objective version of WOA?


Hi Dr. Mirjalili,

Thank you very much for sharing with us the code for this amazing optimization algorithm. I would like to use it on my research for structural optimization, just as you did in your paper. My question is , the code you shared with us contain examples of optimizing objective function with explicit expressions, can you shed me some light on how to modify the code so that it works for an optimization problem without an explicit expression. For example, I build a parametric finite element model of a structure, then I would like to optimize the structural parameters setting the maximum stress as the objective function. Can you share with us the code for one of the examples of truss optimization in your paper?


Tried on some CEC 2011 competition problems => Not convincing at all.

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

Inspired by: The Whale Optimization Algorithm