Grey wolf optimizer

Also known as: GWO

On this page 7

The grey wolf optimizer (GWO) is a population-based metaheuristic for continuous optimization that updates each candidate solution by moving it toward the three best solutions found so far, which the method calls the alpha, beta and delta wolves. Within evolutionary computation, it belongs to the family of swarm intelligence algorithms, alongside particle swarm optimization and the artificial bee colony algorithm.

Introduced in 2014 by Seyedali Mirjalili, Seyed Mohammad Mirjalili and Andrew Lewis, GWO became popular because it has very few control parameters, is short to implement and performs reasonably on many benchmark functions. Its biological metaphor of a hunting pack is, however, mainly a narrative device: mathematically, it is a guided stochastic search with a linearly shrinking step size.

How the grey wolf optimizer searches

GWO maintains a population of N candidate vectors in a D-dimensional search space. After each fitness evaluation, the three best solutions are labeled alpha, beta and delta, and every other solution, called an omega wolf, is repositioned according to all three leaders. The leaders themselves are also updated, so the hierarchy can change in every iteration.

For each leader, a wolf computes a distance vector D = |C · X_leader − X| and a candidate position X_k = X_leader − A · D. The new position is the average of the three candidates, X(t+1) = (X_1 + X_2 + X_3) / 3. The coefficient vectors are A = 2a · r1 − a and C = 2 · r2, where r1 and r2 are uniform random vectors in [0, 1].

The scalar a decreases linearly from 2 to 0 over the run. While |A| is greater than 1, wolves can step beyond the leaders, which the authors describe as searching for prey (exploration). When |A| is less than 1, wolves contract toward the leaders, described as attacking the prey (exploitation). The coefficient C adds random weighting of the leader positions throughout the run.

The table below summarizes the elements of one iteration and their role.

ElementDefinitionRole in the search
Alpha wolfBest solution so farStrongest attractor
Beta and delta wolvesSecond and third best solutionsAdditional attractors that diversify direction
Omega wolvesAll remaining solutionsFollowers updated toward the leaders
Coefficient aDecreases from 2 to 0Controls step size and the exploration schedule
Vector ARandom in [−a, a]Decides whether a wolf overshoots or contracts
Vector CRandom in [0, 2]Randomly emphasizes or de-emphasizes a leader
Components of a GWO iteration

Parameters and typical settings

The standard GWO has only two user-set parameters: population size and the number of iterations, which together define the evaluation budget. Everything else follows from the fixed update rules, which explains much of its appeal for practitioners who do not want to tune crossover rates or inertia weights.

ParameterTypical valueEffect of increasing it
Population size20 to 50Better coverage, more evaluations per iteration
Maximum iterations500 to 1,000Longer exploitation phase and finer convergence
Initial value of a2Larger initial steps and wider exploration
Decay schedule of aLinearNonlinear schedules shift the exploration balance
Common GWO settings

Because the schedule of a is tied to the iteration counter, the algorithm must know its budget in advance. Stopping early leaves it in an exploratory state, while extending a run after it ends requires restarting the schedule.

GWO is closest to particle swarm optimization (PSO): both move vectors toward good solutions using random coefficients. The main differences are that GWO uses three global leaders instead of a personal and a global best, has no velocity term and relies on a deterministic decay of its step size.

MethodMain operatorMemoryTypical strength
Grey wolf optimizerAveraged moves toward three leadersThree best solutionsSimple, fast early convergence
Particle swarm optimizationVelocity update with personal and global bestEach particle’s bestWell studied, many variants
Differential evolutionDifference-vector mutation and crossoverCurrent populationRobust on rotated problems
CMA-ESSampling from an adapted GaussianCovariance matrixStrong on ill-conditioned functions
GWO and neighboring optimizers

Independent analyses have shown that GWO has a center bias: its update rule tends to pull solutions toward the origin of the coordinate system. On benchmarks whose optimum lies at zero, this inflates its apparent performance, and shifting the optimum often reduces its advantage considerably.

Applications and practical use

GWO is applied mainly to continuous, black-box problems where gradients are unavailable and evaluations are moderately cheap. Published uses include hyperparameter tuning, feature selection with binary variants, controller gain tuning, economic dispatch in power systems and the training of small neural networks.

  • Binary GWO maps positions through a transfer function to select or discard features.
  • Multi-objective GWO keeps an external archive of nondominated solutions for Pareto fronts.
  • Hybrid variants combine GWO with local search or differential evolution to improve exploitation.

For a new problem, GWO is a reasonable quick baseline, but it should be compared against established methods such as CMA-ES or differential evolution under the same evaluation budget and with several independent runs.

Limitations and criticism

Researchers in evolutionary computation have criticized GWO, together with many other metaphor-based algorithms, for presenting familiar search operators under new biological names. A detailed analysis argued that its mechanics are largely a variant of particle swarm ideas, which makes the wolf hierarchy explanatory rather than algorithmic.

WeaknessConsequenceMitigation
Center biasMisleading benchmark resultsTest on shifted and rotated functions
Premature convergenceStagnation in a local optimumAdd mutation, restarts or opposition-based learning
Fixed decay schedulePoor fit to unknown budgetsUse adaptive or nonlinear schedules
Weak on high dimensionsSlow progress beyond hundreds of variablesPrefer CMA-ES or decomposition methods
Known weaknesses of standard GWO

The no free lunch theorems also apply: no metaheuristic dominates on all problems, so claims of universal superiority should be treated with caution.

A plain-language summary

The grey wolf optimizer is a search method that copies a hunting pack. Many guesses spread across a problem. The three best guesses act as pack leaders. All other guesses move toward a point between those leaders.

At first, the moves are large, so the pack explores widely. Over time, the moves shrink, and the pack closes in. The result is a fast way to find good answers when no formula gives the best one directly.

An example from practice

An engineering team tunes a PID controller for a pumping station. Each candidate is a set of three gains, and each evaluation runs a ten-second simulation that measures overshoot and settling time. The team uses GWO with 30 wolves and 200 iterations, which means 6,000 simulations and roughly two hours on a workstation.

The best gains cut settling time by about 35 percent compared with the manually tuned baseline, without increasing overshoot. Because the team knows about center bias, it reruns the comparison with differential evolution under the same budget. Both methods reach similar results, so the team keeps GWO for its simpler configuration and documents the comparison for later audits.