Animal and swarm-inspired algorithmsVerified

Grasshopper Optimisation Algorithm

Grasshopper Optimisation Algorithm (GOA)

Year introduced
2017
Original authors
Shahrzad Saremi; Seyedali Mirjalili; Andrew Lewis
Source of inspiration
Grasshopper swarms
Search space
Continuous
Optimization types
Hyperparameter Optimization, Feature Selection, Multi-objective Optimization
Applied research in the repository
0

Overview

It imitates the behaviour of grasshopper swarms: nymphs move slowly in small steps, and adults jump long distances. Each grasshopper's position is computed from social interaction forces (attraction and repulsion) with the rest of the swarm plus the direction of the target, with a coefficient c that shrinks to narrow the comfort zone gradually.

Source of inspiration and mechanism

Image illustrating the source of inspiration of the GOA algorithm: Grasshopper swarms
Grasshopper swarmsImage: http://www.birdphotos.com · CC BY 3.0 · Wikimedia Commons

Grasshoppers go through a nymph stage, in which they crawl in groups, and an adult stage, in which they fly and jump long distances. Individuals interact through social forces: repulsion when very close, attraction at medium distances, and a comfort zone between them.

Initialization

Uniform random positions.

Update mechanism

The position is recomputed fully from the interaction forces + the target.

Exploration

A large c at the start widens the interaction zone, so the grasshoppers spread out.

Exploitation

Decreasing c shrinks the comfort zone and gathers the swarm around the target.

Mathematical description

The new position is the sum of the social interaction forces computed with the function s(r) on each dimension after scaling by the range, multiplied by the coefficient c, which shrinks linearly, plus the position of the target (the best solution). There is no velocity; the position is recomputed completely each iteration.

Position update

X_i^d = c\left(\sum_{j\ne i} c\,\frac{ub_d-lb_d}{2}\, s\!\left(|x_j^d-x_i^d|\right)\frac{x_j-x_i}{d_{ij}}\right) + \hat{T}_d

T_d is the value of dimension d in the best solution, d_ij the distance between the two grasshoppers.

Social forces function

s(r) = f\,e^{-r/l} - e^{-r},\qquad f=0.5,\ l=1.5

f is the attraction intensity and l its characteristic length.

Decreasing coefficient

c = c_{max} - l\,\frac{c_{max}-c_{min}}{L}

c_max = 1 and c_min = 0.00001 in the paper.

Computational complexity: O(T\cdot N\cdot (D + C_f))

Pseudocode

Initialize X; target = best
for l = 1..L:
    c = cmax - l*(cmax - cmin)/L
    for each grasshopper i:
        normalize distances; X_i = c * sum_j c*(ub-lb)/2 * s(|x_j - x_i|) * (x_j - x_i)/d_ij + target
        clip X_i
    update target
return target

Python implementation

There is currently no tested python implementation of this algorithm in the lab. We did not include untested code so that it is not used as a reference implementation.

Coefficients

ParameterSymbolTypical valueRangeDescription
Population
N
30
c max
c_{max}
1
c min
c_{min}
0.00001

Advantages

  • An explicit social mechanism
  • One control parameter c
  • A multi-objective version (MOGOA) has been published.

Limitations

  • Complexity of O(N²) per iteration because of pairwise interaction
  • Converges strongly towards the target, which may reduce diversity.

Use in artificial intelligence

Domains documented in the card: Machine learning, deep learning, Feature Selection, hyperparameter tuning

Continuous optimization, structural design, tuning model parameters.

Hybridization potential

These are partnerships suggested theoretically in the card; any resulting design is presented as a "proposed hybrid method" until its results are compared with the literature.

Applied research from the repository

An aspect that did not appear in the current search results within the repository. This does not mean there is no published research outside it.

Original reference

Shahrzad Saremi; Seyedali Mirjalili; Andrew Lewis (2017). Grasshopper Optimisation Algorithm: Theory and application. Advances in Engineering Software, Elsevier BV.

Verified DOI: 10.1016/j.advengsoft.2017.01.004

The bibliographic data match the Crossref record (checked 2026-11-20). There is no tested Python code for this algorithm in this version.