Grey Wolf Optimizer — GWO

Decision Sciences
Introduced by
Seyedali Mirjalili, Seyed Mohammad Mirjalili, Andrew Lewis
Year
2014
Type
Swarm-intelligence metaheuristic

What does it do?

The Grey Wolf Optimizer (GWO) is a swarm-intelligence metaheuristic introduced by Mirjalili, Mirjalili, and Lewis in 2014, modelled on the social hierarchy and cooperative hunting of grey wolves.

A population of candidate solutions is ranked into alpha, beta, delta, and omega roles, and the three best solutions at each iteration guide the rest of the swarm toward better regions of the search space.

The intuition behind the method

Picture a wolf pack tracking prey, with the alpha, beta, and delta wolves acting as leaders and the other members repositioning in response to all three. GWO follows this pattern: the three fittest solutions found so far serve as guides, and each remaining candidate moves to the equal-weight average of the positions suggested by those leaders. A control parameter a falls linearly from 2 to 0 over the run. While a is large, candidates can overshoot and search widely; as it falls, they are drawn closer to the leaders and refine the region around the best solutions.

History

Mirjalili, Mirjalili, and Lewis proposed GWO in 2014 in Advances in Engineering Software. The design was inspired by observed grey wolf pack structure: a strict social hierarchy of alpha, beta, delta, and omega wolves, and a hunting process of encircling, harassing, and attacking prey. The original paper reported experiments on benchmark and engineering design problems. Faris, Aljarah, Al-Betar, and Mirjalili (2018) reviewed subsequent variants and applications of the algorithm.

When to use it

Choose GWO for continuous optimisation problems in which the objective is expensive to evaluate, lacks an analytical gradient, or is a black box, such as engineering design, parameter tuning, and some feature-selection tasks. Treat population size as a setting to check rather than a fixed rule: a very small population loses diversity quickly, so repeated runs with different random seeds are advisable. Avoid GWO for discrete or combinatorial problems unless the encoding is adapted, and do not use it where an exact or closed-form solution is available. GWO cannot guarantee that the global optimum is reached.

Limitations and considerations

  • Global optimality is not guaranteed; the quality of the result depends on population diversity and the iteration budget.
  • The position updates are defined for real-valued variables, so binary, integer, or categorical problems need an additional encoding or transfer scheme.
  • Every candidate is guided by the same three leaders (alpha, beta, and delta), so the swarm can converge prematurely toward them. If these leaders cluster in one suboptimal region early, the swarm can stagnate there.
  • Without gradient information, the method typically needs many objective evaluations in high-dimensional spaces, whereas gradient-based solvers can exploit derivatives on smooth problems.
  • The linear decrease of the coefficient a from 2 to 0 is fixed and does not adapt to the landscape. On problems that require a longer exploratory phase, the shift to exploitation can occur before the search has located the right region.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Gradient-free: it needs only a scalar objective value per candidate, so simulation-based or black-box objectives can be used directly.
  • Few settings: the user chooses the population size and iteration count, while the coefficient a follows a fixed schedule.
  • Exploration and exploitation are governed by one linearly decreasing coefficient a, so the shift from wide to local search is easy to inspect.
  • Comparatively simple to implement (difficulty 2 in the page's rating), which makes it a practical baseline for continuous problems.

Applications

  • Power-system automatic generation control: GWO applied to controller tuning and weighted objective minimisation for a two-area interconnected power system (Krishna et al., 2023).
  • Controller order reduction, for example for a self-balanced bicycle-robot controller (Yadav et al., 2022).
  • Flood classification: fuzzy clustering combined with an immune grey wolf optimizer (Zou et al., 2019).

How it works

How it works

1

Candidate positions are sampled uniformly at random within the lower and upper bounds of each variable. Before the run starts, the user sets only the population size and the maximum number of iterations.

2

Each candidate is scored by the objective function, which must return one scalar fitness value per position. GWO uses no gradient, so the objective can be a black box, such as a simulation, as long as it returns a value for each candidate.

3

Candidates are sorted by fitness: the best becomes alpha, the second best beta, the third best delta, and all others are omega. The roles are recomputed at every iteration, so the three leaders always reflect the current best positions.

4

Each omega wolf computes a distance vector toward each of alpha, beta, and delta, derives three target positions from them, and moves to their equal-weight average (the centroid). The coefficient a decreases linearly from 2 to 0 across the run: large values let candidates search far from the leaders, while small values keep them close to the leaders.

5

The hunt step repeats until the maximum number of iterations is reached or another stopping criterion is met. The position of the alpha wolf at termination is returned as the best solution found.

Common pitfalls

  • A very small population loses diversity early, so the three leaders may converge on the same region and the run explores little.
  • Stopping while a is still large means the algorithm has not entered its exploitation phase, so the reported best may be far from a refined optimum.
  • Applying the continuous update equations to integer or categorical variables without rounding or a transfer function produces positions that do not correspond to valid designs.
  • Very wide bounds combined with a small population leave most of the space unsampled in early iterations; bounds should reflect realistic ranges for each variable.

Frequently asked questions

How do I choose population size and iteration count?

Treat population size as a heuristic starting point and check it through repeated runs rather than a fixed rule. Set the iteration budget so that the run is long enough for the best fitness to stop changing noticeably; because a reaches zero only at the end of the run, a run that stops early never reaches the exploitation phase. GWO is stochastic, so repeat the run with several independent random seeds and report the spread of the best fitness rather than a single value.

Can GWO handle discrete or binary variables?

Not natively. The standard position-update equations are defined for continuous real-valued spaces. Binary or discrete variants exist in the literature, typically using a transfer function to map continuous positions to binary decisions, but these are extensions rather than the original algorithm.

How does GWO compare to Particle Swarm Optimization?

Both are population-based swarm methods with broadly similar per-iteration cost. The main structural difference is that GWO updates each candidate from three leaders (alpha, beta, delta), whereas PSO is guided by a global best and each particle's personal best. Relative performance depends on the problem and the benchmark set, and neither method dominates in all cases.

What does the parameter a control, and do I need to tune it?

The parameter a decreases linearly from 2 to 0 over the course of the run and controls whether wolves explore (high a) or exploit (low a). This schedule is fixed by the algorithm, so a is not tuned directly. The levers you control are the population size and the total number of iterations, which together determine how slowly or quickly the search moves from exploration to exploitation.

Related methods

Sources

  1. Mirjalili, S., Mirjalili, S. M., & Lewis, A. (2014). Grey Wolf Optimizer. Advances in Engineering Software, 69, 46-61.

    Open DOI reference
  2. Faris, H., Aljarah, I., Al-Betar, M. A., & Mirjalili, S. (2018). Grey Wolf Optimizer: A Review of Recent Variants and Applications. Neural Computing and Applications, 30(2), 413-435.

    Open DOI reference