Skip to main content
. 2023 Feb 3;23(3):1722. doi: 10.3390/s23031722
Algorithm 2 Pseudocode of LSAM operator.
1: xr—random solution among the top half best agents in population (obtained from BOA).
2: Fitr=F(xr)—value of the fitness function for xr.
3: I—number of iterations, ξ—mutation rate.
4:
                  Iterative part.
5: for iterationi=1,2,…,I do
6:  Calculate: xnew=  Mutate(xr,ξ), Fitnew=Fit(xnew).
7:  if Fitnew<Fitr then
8:    xr=xnew, Fitr=Fitnew.
9:  else
10:    Set a random solution xrnd from the population, but not xr.
11:    Compute the fitness function Fitrnd=Fit(xrnd).
12:    if Fitnew<Fitrnd then
13:     xrnd=xnew
14:    end if
15:  end if
16: end for