Grey Wolf Optimizer Toolbox

A toolbox for the Grey Wolf Optimizer (GWO) algorithm
Updated 22 May 2018

View License

This is a simple toolbox with a use-friendly graphical interface, which is very suitable for those without high programming skills.
The parameters of the GWO algorithm can be easily defined in the toolbox.
The default name of the objective function is CostFunction. If you have a look at the CostFunction.m file, you may notice that the cost function gets the variables in a vector ([x1 x2 ... xn]) and returns the objective value. You can either write you objective function in this file or create a new file and pass its name to the toolbox. Remember to follow the same structure for input and output if you decided to go for the second option.
The lower bounds and upper bounds of variables should also be written as lb1,lb2,...,lbn and ub1,ub2,...,ubn. If all of the variables have equal lower and/or upper bounds you can just define lb and ub as two single number numbers: lb, ub.

Just run the GWO_toolbox.m file and enjoy!

The GWO algorithm can also be downloaded here:

This is the source codes of the paper:

S. Mirjalili, S. M. Mirjalili, A. Lewis, Grey Wolf Optimizer, Advances in Engineering Software, Volume 69, March 2014, Pages 46-61, ISSN 0965-9978,

More information can be found in:

Other relevant submissions:

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 (2024). Grey Wolf Optimizer Toolbox (, MATLAB Central File Exchange. Retrieved .

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

Inspired: Multi-Objective Grey Wolf Optimizer (MOGWO)

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

A link has been added to the description.
Links added:

GWO is now available as a Toolbox file in R2014b.