Physics and chemistry-inspired algorithmsVerified

Fick's Law Algorithm

Fick's Law Algorithm (FLA)

Year introduced
2023
Original authors
Fatma A. Hashim; Reham R. Mostafa; Abdelazim G. Hussien; Seyedali Mirjalili; Karam M. Sallam
Source of inspiration
Fick's law of diffusion
Search space
Continuous
Optimization types
Hyperparameter Optimization
Applied research in the repository
0

Overview

Inspired by Fick's first law of diffusion: molecules move from a region of high concentration to a region of low concentration. The population is split into two regions, and the algorithm goes through three phases: diffusion, equilibrium and steady state.

Source of inspiration and mechanism

Image illustrating the source of inspiration of the FLA algorithm: Fick's law of diffusion
Fick's law of diffusionImage: Sbyrnes321 · Public domain · Wikimedia Commons

Fick's first law, J = −D·dC/dx, describes a flux of matter directly proportional to the concentration gradient; molecules move from high to low concentration until the concentration evens out.

Initialization

Random, with two regions.

Update mechanism

The phase is chosen with a time-based transfer function.

Exploration

Diffusion between the two regions.

Exploitation

Equilibrium and steady state.

Mathematical description

The population is split into two regions with two concentrations. In the diffusion phase the molecules move from the region of higher concentration to the lower one with a flux computed from Fick's law, in the equilibrium phase they move towards the best molecule in their region, and in the steady state towards the best molecule overall.

Fick's first law

J = -D\,\frac{dC}{dx}

J is the flux, D the diffusion coefficient, dC/dx the concentration gradient.

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

Flowchart

StartInitialisationRandom, with two regionsEvaluationCompute the objective and find the bestsolutiont ≤ T ?ExplorationDiffusion between the two regionsExploitationEquilibrium and steady stateUpdate ruleThe phase is chosen with a time-basedtransfer functionUpdate 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; split into two regions
for t = 1..T:
    TF = transfer function of t
    if TF < 0.9: diffusion between regions (Fick flux)
    elif TF <= 1: equilibrium within region
    else: steady state toward global best
    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
C1, C2
C_1, C_2
0.5, 2
D
D
0.01

Advantages

  • Splitting into two regions preserves diversity
  • Gradual transition between phases.

Limitations

Several constants (C1–C5, D).

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

Fatma A. Hashim; Reham R. Mostafa; Abdelazim G. Hussien; Seyedali Mirjalili; Karam M. Sallam (2023). Fick’s Law Algorithm: A physical law-based algorithm for numerical optimization. Knowledge-Based Systems, Elsevier BV.

Verified DOI: 10.1016/j.knosys.2022.110146

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