Skip to main content
. 2022 Nov 11;24(11):1640. doi: 10.3390/e24111640
Algorithm 1: The pseudo-code of IBWOA
Initializing populations using Gauss chaos mapping
Calculate the fitness value of each spider
Record the current worst fitness value, the best fitness value and its location information
while t<Tmax
 initialize random parameters m,β,p,l1,l2,l3,l4
for i=1:N
  if random ≤ 0.3
  the spider moves and update its location information using Equation (1)
  or else
  the spider moves and update its location information using Equation (2)
  end if
  calculating the pheromone value of the spider using Equation (3)
  update the spider with low pheromone values using Equation (13)
   if random ≤  p
   h = 0
   if ≤ 0.5
   update the spider location information using Equation (7)
   or else
   update the spider location information using Equation (8)
   end if
   or else
   h = 1
   end if
  calculate the fitness value of the spider
  if the fitness value of the spider ≤ the best fitness value,
  update the best fitness value and its location information
  end if
 end for
 if h == 1
 Obtain opposition solutions using Equation (11)
 Retaining spiders with higher fitness values
 end if
t=t+1
end while
Output the best fitness value