Animal and swarm-inspired algorithmsVerified

Crayfish Optimization Algorithm

Crayfish Optimization Algorithm (COA)

Year introduced
2023
Original authors
Heming Jia; Honghua Rao; Changsheng Wen; Seyedali Mirjalili
Source of inspiration
Freshwater crayfish
Search space
Continuous
Optimization types
Hyperparameter Optimization
Applied research in the repository
0

Overview

It imitates the summer resort, competition and foraging behaviour of freshwater crayfish, where temperature controls the phase: high temperatures drive it into caves (summer resort or competition), and a suitable temperature drives it to forage, with an amount of food that follows a normal distribution.

Source of inspiration and mechanism

Image illustrating the source of inspiration of the COA algorithm: freshwater crayfish
Freshwater crayfishImage: Gusmonkeyboy at English Wikipedia · Public domain · Wikimedia Commons

The freshwater crayfish is a crustacean whose activity depends strongly on water temperature; it takes refuge in caves in the heat, competes for caves, and comes out to feed when the temperature is moderate.

Initialization

Random.

Update mechanism

The phase is chosen by the temperature.

Exploration

The competition phase.

Exploitation

Summer resort and foraging around the best.

Mathematical description

A random temperature temp is generated; if it exceeds 30, the crayfish enters the summer resort phase (approaching the cave = the mean of the local and global best) or the competition phase (according to a probability), otherwise it enters the foraging phase, where the amount of food p is computed with a normal distribution around the optimal temperature, and it decides whether to shred the food or eat it directly.

Amount of food

p = C_1\cdot\frac{1}{\sqrt{2\pi}\,\sigma}\exp\!\left(-\frac{(temp-\mu)^2}{2\sigma^2}\right)

μ is the optimal temperature (25), C1 and σ constants from the paper.

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

Pseudocode

Initialize
for t = 1..T:
    temp = rand*15 + 20
    if temp > 30: summer resort (rand < 0.5) or competition
    else:         foraging with food intake p(temp)
    update bests
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
μ
\mu
25Optimal temperature
C1
C_1
0.2

Advantages

A non-linear phase-switching mechanism inspired by a single environmental variable.

Limitations

Several constants (C1, C2, μ, σ) set empirically.

Use in artificial intelligence

Domains documented in the card: Machine learning, hyperparameter tuning

Continuous and engineering optimization.

Hybridization potential

No hybridization partners recorded in the card.

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

Heming Jia; Honghua Rao; Changsheng Wen; Seyedali Mirjalili (2023). Crayfish optimization algorithm. Artificial Intelligence Review, Springer Science and Business Media LLC.

Verified DOI: 10.1007/s10462-023-10567-4

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