Animal and swarm-inspired algorithmsVerified

Marine Predators Algorithm

Marine Predators Algorithm (MPA)

Year introduced
2020
Original authors
Afshin Faramarzi; Mohammad Heidarinejad; Seyedali Mirjalili; Amir H. Gandomi
Source of inspiration
Marine predators (sharks, tuna and marlins)
Search space
Continuous
Optimization types
Hyperparameter Optimization, Feature Selection, Weight Optimization
Applied research in the repository
0

Overview

An algorithm that imitates the foraging strategies of marine predators such as sharks and tuna, switching between Lévy motion and Brownian motion according to the ratio of the predator's speed to the prey's speed. The optimization goes through three roughly equal time phases that move from exploration to exploitation, with the effect of "fish aggregating devices" (FADs), which makes solutions jump far away to avoid local optima.

Source of inspiration and mechanism

Image illustrating the source of inspiration of the MPA algorithm: marine predators (sharks, tuna and marlin)
Marine predators (sharks, tuna and marlins)Image: Unknown authorUnknown author · Public domain · Wikimedia Commons

Marine ecology studies observed that predators use Lévy motion in environments with few prey and Brownian motion where prey is abundant, and that the relative speed of the prey determines the best strategy. Fish movement is also affected by fish aggregating devices (FADs) and eddies, so fish sometimes make long jumps to new regions.

Initialization

Uniform distribution of the prey inside the bounds, and the Elite matrix is built from the best prey.

Update mechanism

An elite-guided update according to the time phase, then memory saving (greedy acceptance), then the FADs effect.

Exploration

The first phase with large Brownian steps, and the FADs effect, which makes 20% of the solutions take wide random jumps.

Exploitation

The last phase with Lévy motion around the elite, with the decreasing factor CF that shrinks the step gradually.

Mathematical description

An Elite matrix made of copies of the best solution and a Prey matrix are kept. In the first third the prey moves with Brownian motion (exploration); in the second third the population is split, half with Lévy motion and half with Brownian motion; and in the last third the predator moves with Lévy motion around the elite (exploitation). After each update the FADs effect is applied, then "memory saving" by greedy selection.

First phase (Brownian motion)

\vec{S}_i = \vec{R}_B \otimes \left(\vec{E}_i - \vec{R}_B \otimes \vec{P}_i\right),\quad \vec{P}_i = \vec{P}_i + P\,\vec{R} \otimes \vec{S}_i

R_B is a vector of normal random numbers, E the elite matrix, P = 0.5 a constant, R a uniform vector in [0,1].

Third phase (Lévy around the elite)

\vec{S}_i = \vec{R}_L \otimes \left(\vec{R}_L \otimes \vec{E}_i - \vec{P}_i\right),\quad \vec{P}_i = \vec{E}_i + P\,CF \otimes \vec{S}_i,\quad CF = \left(1-\tfrac{t}{T}\right)^{2t/T}

R_L are random Lévy-distributed steps, CF a factor that controls the step length and decreases over time.

Effect of fish aggregating devices (FADs)

\vec{P}_i = \begin{cases}\vec{P}_i + CF\left[\vec{X}_{min} + \vec{R}\otimes(\vec{X}_{max}-\vec{X}_{min})\right]\otimes\vec{U} & r \le FADs\\ \vec{P}_i + \left[FADs(1-r)+r\right]\left(\vec{P}_{r_1}-\vec{P}_{r_2}\right) & r > FADs\end{cases}

FADs = 0.2 is the jump probability, U a binary vector, r1 and r2 random indices.

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

Flowchart

StartInitialisationUniform distribution of the prey inside thebounds, and the Elite matrix is built fromthe best preyEvaluationCompute the objective and find the bestsolutiont ≤ T ?ExplorationThe first phase with large Brownian steps,and the FADs effect, which makes 20% of thesolutions take wide random jumpsExploitationThe last phase with Lévy motion around theelite, with the decreasing factor CF thatshrinks the step graduallyUpdate ruleAn elite-guided update according to the timephase, then memory saving (greedyacceptance), then the FADs effectUpdate 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 Prey; Elite = repeat(best)
for t = 1..T:
    CF = (1 - t/T)^(2t/T)
    if t < T/3:      stepsize = RB*(Elite - RB*Prey); Prey += P*R*stepsize
    elif t < 2T/3:   first half: Levy step around prey; second half: Prey = Elite + P*CF*(RB*(RB*Elite - Prey))
    else:            Prey = Elite + P*CF*(RL*(RL*Elite - Prey))
    memory saving (keep better of old/new); update Elite
    FADs effect; memory saving; update Elite
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
Population
N
3020–50Size of the prey population
Constant P
P
0.5Step size factor
FADs probability
FADs
0.20.1–0.3Probability of the fish aggregating devices effect

Advantages

  • An explicit balance between exploration and exploitation through the three phases
  • Few parameters (P and FADs)
  • Strong performance in comparison studies on the original CEC functions.

Limitations

  • Splitting iterations into fixed thirds may not suit every problem
  • Lévy movement increases variance between runs
  • The published performance is tied to the paper's test functions and settings.

Use in artificial intelligence

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

Non-differentiable continuous optimization, constrained engineering design, hyperparameter tuning, estimating the parameters of physical models.

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

Afshin Faramarzi; Mohammad Heidarinejad; Seyedali Mirjalili; Amir H. Gandomi (2020). Marine Predators Algorithm: A nature-inspired metaheuristic. Expert Systems with Applications, Elsevier BV.

Verified DOI: 10.1016/j.eswa.2020.113377

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