Skip to main content
. 2025 Jun 11;10(6):388. doi: 10.3390/biomimetics10060388
Algorithm 1: Pseudo-Code of ESGA
Input: N, T, lb, ub, D.
Initialize the population using Equation (1).
FOR t = 1: T
     Calculate the fitness value of the search agent using Equation (2).
     Calculate the θ using Equation (14). //ASS
     IF θ<π
     Calculate the Pwmeant and Cov using Equations (16) and (17). //DGS
          Update the individual’s position using Equations (3), (7), and (15).
     ELSE
          IF rand < 0.5
               Update the individual’s position using Equation (18). //DSS
          ELSE
               Update the individual’s position using Equation (12).
          END IF
     END IF
END FOR
Output: The best position and the best fitness.