Animal and swarm-inspired algorithmsVerified

Sparrow Search Algorithm

Sparrow Search Algorithm (SSA-2)

Year introduced
2020
Original authors
Jiankai Xue; Bo Shen
Source of inspiration
Producer and scrounger behaviour in sparrows
Search space
Continuous
Optimization types
Hyperparameter Optimization
Applied research in the repository
0

Overview

The producers update their positions according to a global alarm value, the scroungers follow the best producer, and a fraction of individuals aware of danger move towards a safe area.

Source of inspiration and mechanism

Image illustrating the source of inspiration of the SSA-2 algorithm: Producer and scrounger behaviour in sparrows
Producer and scrounger behaviour in sparrowsImage: Rhododendrites · CC BY-SA 4.0 · Wikimedia Commons

Sparrows split into producers that search for food and scroungers that follow them, while some individuals watch for danger and warn the flock.

Initialization

Random.

Update mechanism

Three groups with different roles.

Exploration

The movement of the producers on alarm and of the individuals aware of danger.

Exploitation

The scroungers follow the best producer.

Mathematical description

The common abbreviation in the literature is SSA; SSA-2 is used here to distinguish it from the salp algorithm.

Producers

X_{i}^{t+1} = \begin{cases} X_i^{t}\exp\left(\frac{-i}{\alpha T}\right) & R_2 < ST\\ X_i^{t} + Q\cdot L & R_2\ge ST\end{cases}

R₂ is the alarm value, ST the safety threshold.

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

Flowchart

StartInitialisationRandomEvaluationCompute the objective and find the bestsolutiont ≤ T ?ExplorationThe movement of the producers on alarm andof the individuals aware of dangerExploitationThe scroungers follow the best producerUpdate ruleThree groups with different rolesUpdate bestKeep the best solution and set t = t + 1EndReturn the best solutionYesNo

A simplified chart summarising the algorithm phases as described on its card in the lab; it is not the original figure published in the paper.

Pseudocode

Initialize sparrows
for t = 1..T:
    rank; update producers (alarm value R2 vs ST)
    update scroungers towards best producer
    update danger-aware sparrows
return best

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
Producers ratio
PD
0.2
Danger-aware ratio
SD
0.1–0.2
Safety threshold
ST
0.80.5 – 1

Advantages

Fast convergence on unimodal functions.

Limitations

A known bias towards the origin because of the exponential term X·exp(·).

Use in artificial intelligence

Domains documented in the card: Machine learning, hyperparameter tuning

Continuous optimization, parameter tuning.

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

Jiankai Xue; Bo Shen (2020). A novel swarm intelligence optimization approach: sparrow search algorithm. Systems Science & Control Engineering, Informa UK Limited.

Verified DOI: 10.1080/21642583.2019.1708830

Its papers abbreviate it SSA, which clashes with the Salp Swarm Algorithm, so it appears here as SSA-2. There is no tested Python code for this algorithm in this version.