Grey Wolf Optimizer

Grey Wolf Optimizer #

Name #

Grey Wolf Optimizer (GWO)

Taxonomy #

The Grey Wolf Optimizer is a metaheuristic optimization algorithm inspired by the social hierarchy and hunting behavior of grey wolves in nature. It belongs to the field of Swarm Intelligence, which is a subfield of Computational Intelligence.

  • Computational Intelligence
    • Biologically Inspired Computation
      • Swarm Intelligence
        • Grey Wolf Optimizer

Strategy #

The Grey Wolf Optimizer mimics the leadership hierarchy and hunting mechanism of grey wolves. The algorithm divides the wolves into four categories: alpha, beta, delta, and omega. The alpha wolf is the leader of the pack and is responsible for making decisions. The beta and delta wolves assist the alpha in decision-making and hunting, while the omega wolves follow the orders of the higher-ranking wolves.

The hunting behavior of grey wolves consists of three main phases: searching for prey, encircling prey, and attacking prey. In the search phase, the wolves explore the search space to locate potential prey. Once the prey is found, the wolves encircle it and gradually tighten the encirclement. Finally, the wolves attack the prey when it stops moving.

The GWO algorithm incorporates these hunting strategies to solve optimization problems. The alpha, beta, and delta wolves represent the best three solutions found so far, while the omega wolves represent the remaining candidate solutions. The position of each wolf is updated based on the positions of the alpha, beta, and delta wolves, allowing the pack to converge towards the optimal solution.

Procedure #

Data Structures:

  • alpha: The position of the best solution found so far
  • beta: The position of the second-best solution found so far
  • delta: The position of the third-best solution found so far
  • positions: An array storing the positions of all wolves (candidate solutions)


  • num_wolves: The number of wolves (population size)
  • max_iterations: The maximum number of iterations
  • a: A linearly decreasing parameter from 2 to 0 over the course of iterations


  1. Initialize a population of num_wolves wolves with random positions
  2. Evaluate the fitness of each wolf
  3. Set alpha, beta, and delta as the positions of the three best wolves
  4. While the stopping criterion is not met (e.g., maximum iterations):
    1. For each wolf in the population:
      1. Update the position of the current wolf using the positions of alpha, beta, and delta
      2. Clip the position of the current wolf to be within the search space boundaries
      3. Evaluate the fitness of the updated wolf position
      4. Update alpha, beta, and delta if the updated wolf position is better
    2. Decrease the value of a linearly from 2 to 0
  5. Return alpha as the best solution found

Considerations #


  • Simple and easy to implement
  • Requires few control parameters
  • Exhibits fast convergence compared to some other metaheuristic algorithms


  • May get stuck in local optima for complex optimization problems
  • Performance depends on the proper tuning of parameters
  • Lacks a mechanism to adapt the search behavior during the optimization process

Heuristics #

Parameter Settings:

  • Set num_wolves based on the complexity of the problem. A larger population size can help in exploring the search space more effectively but increases the computational cost.
  • Set max_iterations based on the available computational resources and the desired solution quality. Increasing the number of iterations allows for more extensive search but takes longer.


  • Initialize the wolf positions randomly within the search space to ensure good coverage and exploration.
  • If prior knowledge about the problem is available, consider initializing some wolves in promising regions of the search space.

Boundary Handling:

  • Ensure that the positions of wolves are always within the valid search space boundaries.
  • If a wolf moves outside the boundaries during the position update, clip its position to the nearest boundary value.

Termination Criteria:

  • Use a maximum number of iterations as the primary termination criterion to control the computational budget.
  • Consider additional termination criteria based on the convergence of the best solution or the lack of improvement over a certain number of iterations.


  • Consider hybridizing GWO with other optimization techniques, such as local search methods, to improve its performance and avoid getting stuck in local optima.
  • Incorporate problem-specific knowledge or heuristics into the position update mechanism to guide the search towards promising regions.