**4. The Proposed Solution Methodology**

This section describes and explains the main aspects of GTO, BWO, and the proposed HMGTO-BWO.

#### *4.1. Gorilla Troops Optimizer (GTO)*

The GTO is an efficient optimization algorithm that was inspired by the social life of gorillas, including their movements and lifestyles [69]. The leader in a gorilla group is known as a silverback and all the males and females follow it. The young male gorillas are known as blackbacks; they help the silverback and act as backup protection for the group. Two phases of exploitation and exploration form the GTO. Three operators are used in the exploration phases; the first operator is the migration to new locations, while the second operator is based on the movement of other gorillas; the third operator is dependent on the motion of the groups to known areas. In the GTO, the parameter *X* refers to the gorilla position, and the *GX* denotes the candidate gorilla locations, while the best solution position is represented as the silverback position. The exploitation phase is based on three motions of the gorillas, including their motion to a new unknown area, their motion to each other, and their movement to unknown locations. Mathematically, the exploration phase of the GTO can be described as follows:

$$\mathbf{GX}(t+1) = \begin{cases} (\mathbf{L}\mathbf{B} - \mathbf{L}\mathbf{B}) \times r\_1 + \mathbf{L}\mathbf{B}, & \text{rand} < p \\ (r\_2 - \mathbf{C}) \times \mathbf{X}\_\mathbf{r}(t) + \mathbf{L} \times \mathbf{H}, & \text{rand} \ge 0.5 \\ \mathbf{X}(t) - \mathbf{L} \times (\mathbf{L} \times (\mathbf{X}(t) - \mathbf{G}\mathbf{X}\_\mathbf{r}(t)) + r\_3 \times (\mathbf{X}(t) - \mathbf{G}\mathbf{X}\_\mathbf{r}(t))) & \text{rand} < 0.5 \end{cases} \tag{12}$$

where *r*1, *r*2, and *r*<sup>3</sup> are random values in the range [0, 1]; *UB* and *LB* are the upper and lower limits of the variables; the *P* operator is a generated random value; and *C*, *L*, and *H* are operators that can be computed as follows:

$$\mathcal{C} = F \times \left( 1 - \frac{t}{t\_{\text{max}}} \right) \tag{13}$$

$$F = \cos(2 \times r\_4) + 1\tag{14}$$

$$L = \mathbb{C} \times l \tag{15}$$

$$H = Z \times X(t) \tag{16}$$

$$Z = [-\mathbb{C}, \mathbb{C}] \tag{17}$$

where *t*max *and t* are the maximum and current iterations, and *r*<sup>4</sup> is a random value in the range [0, 1]. The exploitation phase in this algorithm is based on the motion of the followers to the silverback gorilla. However, when the silverback dies or becomes ill, the male blackback gorillas become leaders; these gorillas fight to obtain the female gorillas. The exploitation phase mimics the motion of the males and females to the silverback. In addition to that, when the silverback dies or becomes old, the blackback gorilla males become leaders. Thus, the group may follow the silverback or the blackback gorilla males. The transition between the two movements can be adjusted using two operators, *C* and *W*. In the case that *C* ≥ *W*, the gorillas update their locations with respect to the silverback as follows:

$$\mathbf{G}X(t+1) = M \times L \times (X(t) - X\_{\text{best}}\ ) + X(t) \tag{18}$$

$$M = \left( \left| \frac{1}{N} \sum\_{i=1}^{N} \text{GX}\_i(t) \right|^{\mathcal{S}} \right)^{\frac{1}{\mathcal{S}}} \tag{19}$$

$$\mathbf{g} = \mathbf{2}^{L} \tag{20}$$

where *X*best represents the silverback's location. If *C* < *W*, the other gorillas follow the adult males; this may be described as follows:

$$GX(t) = X\_{\text{silverback}} - \left(X\_{\text{best}} \times Q - X(t) \times Q\right) \times A \tag{21}$$

$$Q = 2 \times r\_5 - 1\tag{22}$$

$$A = \beta \times E \tag{23}$$

where *r*<sup>5</sup> represents a random value in the range [0, 1], *β* denotes a predefined operator, and *E* is a random value obtained from the normal distribution. The GTO's pseudocode is depicted in Algorithm 1.


*4.2. Beluga Whale Optimization (BWO)*

BWO is a new optimizer that was conceptualized from the motion, preying, and behavior of beluga whales (BWs) in the seas and oceans [70]. BWs are social creatures that share information and communicate together to search for food locations. Initially, the fitness function is expressed as follows:

$$F\_X = \begin{bmatrix} f(\mathbf{x}\_{1,1}, \mathbf{x}\_{1,2}, \dots, \mathbf{x}\_{1,d}) \\ f(\mathbf{x}\_{2,1}, \mathbf{x}\_{2,2}, \dots, \mathbf{x}\_{2,d}) \\ \vdots \\ f(\mathbf{x}\_{n,1}, \mathbf{x}\_{n,2}, \dots, \mathbf{x}\_{n,d}) \end{bmatrix} \tag{24}$$

The swimming motion of the two BW pairs represents the exploration phase, which may be mathematically described as follows:

$$X\_{i,j}^{t+1} = \begin{cases} X\_{i,p\_j}^t + \left(X\_{r,p\_1}^t - X\_{i,p\_j}^t\right)(1+r\_1)\sin(2\pi r\_2), & j=\text{even} \\ X\_{i,p\_j}^t + \left(X\_{r,p\_1}^t - X\_{i,p\_j}^t\right)(1+r\_1)\cos(2\pi r\_2), & j=\text{odd} \end{cases} \tag{25}$$

where *X<sup>t</sup> <sup>r</sup>*,*p*<sup>1</sup> is a whale selected randomly from the generated BWs. The BWO exploitation phase is conceptualized from the hunting and preying process of BWs. They update their locations based on the best solution using the Levy flight strategy, as follows:

$$X\_{\rm i}^{t+1} = r\_3 X\_{\rm best}^t - r\_4 X\_{\rm i}^t + \mathcal{C}\_1 \cdot L\_F \cdot \left(X\_r^t - X\_{\rm i}^t\right) \tag{26}$$

$$C\_1 = 2r\_4(1 - t/t\_{\text{max}}) \tag{27}$$

where *X<sup>t</sup>* best represents the best location, *<sup>X</sup><sup>t</sup> <sup>r</sup>* refers to a randomly selected BW, and *LF* is a Lévy flight function, which can be determined as follows:

$$L\_F = 0.05 \times \frac{\mu \times \sigma}{|v|^{1/\beta}}\tag{28}$$

$$\sigma = \left(\frac{\sin(\pi \beta/2) \times \Gamma(1+\beta)}{\beta \times \Gamma((1+\beta)/2) \times 2^{(\beta-1)/2}}\right)^{1/\beta} \tag{29}$$

where *u* and *v* are random variables, and *β* is an adaptive variable used to enable the transition between the exploitation and the exploration phases; it can be calculated as,

$$B\_f = B\_0(1 - t/2t\_{\text{max}}) \tag{30}$$

where *B*<sup>0</sup> is a random value in the range [0, 1]. If *Bf* > 0.5, the BWs update their locations in the exploration phase; otherwise, they update their locations in the exploitation manner. The final stage of the BWO is based on the whale fall of BWs when they have been attacked by the killer whales. The dead BWs are deposited on a deep seabed. This stage is represented as follows:

$$X\_{i}^{t+1} = r\_{5}X\_{i}^{t} - r\_{6}X\_{r}^{t} + r\_{7}X\_{\text{step}} \tag{31}$$

$$X\_{\rm step} = (\mathcal{U}b - L\_b) \exp(-\mathcal{C}\_2 t/t\_{\rm max})\tag{32}$$

$$\mathbf{C}\_2 = \mathbf{2}\mathbf{W}\_f \times \mathbf{n} \tag{33}$$

$$\mathcal{W}\_f = 0.1 - 0.05t/t\_{\text{max}}\tag{34}$$

where *r*5, *r*6, and *r*<sup>7</sup> denote random variables in the range [0, 1]. The pseudocode of BWO is depicted in Algorithm 2.

