Skip to main content
. 2023 May 9;13(5):1147. doi: 10.3390/life13051147
Algorithm 2: Pseudocode for “the krill herd optimization algorithm”.
Begin
Define the population size (S') and the loop iteration (I^max ):Initialization Phase:
Set the initial sequence I'=1;
Set up the population data and cluster information as input.S˜=1,2,3,..S' Of krill arbitrarily.
Fitness assessment:
Analyze each krill following the location’s instructions.
While I'<I^max do
Sort the population or krill from best to worst.
For i=1:S' do
Calculate the three motions,
(1) The krill drive action
(2) Hunting behavior
(3) Physical agglomeration
The krill location in the inquiry space should be updated.
Consider each krill in light of its proximity.
End For i
Sort the current krill from best to worst, then identify the “best” ones with optimal metrics.
I^max=I'+1.
End While
Predict (“The krill’s finest result”).
End