Skip to main content
. 2026 Apr 3;11(4):247. doi: 10.3390/biomimetics11040247
Algorithm 1. Pseudo-Code of MFISOA.
1: Initialize the parameters (population size (N), dimension (dim), upper bound (ub), lower bound (lb), Max iterations (T)).
2: Initialize the solutions’ positions randomly.
3: while t≤T do
4:        Calculate the fitness value of each individual, and determine the global optimal individual Xbest , global worst individual Xworst and population average fitness mean(fit).
5:      Calculate the population centroid centroidj for each dimension j using Equation (8).
6:  for i = 1:N do
7:  Classify the individual as “high-quality” (fit(i) ≤ mean(fit) ) or “poor-quality” ( fit(i) > mean(fit) ) based on its fitness.
8:    if fit(i) > mean(fit) then
9:     Compute weights AFL1 and AFL2 using Equation (2).
10:   Update the position by Equation (3).
11: else
12:         Generate the Levy flight disturbance matrix RL using Equation (4).
13:   Update the position by Equation (3).
14: end if
15:        Randomly select two distinct individuals Xr2 and Xr3( r2≠r3≠i).
16:   Generate the binary mask vector F1 using Equation (5).
17:   Fine-tune the position by Equation (6).
18:     if Xij<lbj or Xij>ubj then
19:   Map Xij to the valid range by Equation (9).
20:  end if
21:  Enforce the secondary boundary constraint by Equation (10).
22: End for
23: Update the fitness values, Xbest, Xworst and mean(fit) for the new population.
24: End while
25: Return  Xbest.