## 2 Basic Theory
### The Improved Gorilla Troops Optimizer  
#### 2.2.1 The Gorilla Troops Optimizer Algorithm  
By emulating the leading and following behaviors observed in gorillas, the GTO algorithm can effectively explore and exploit multidimensional spaces. This approach is particularly well-suited for addressing high-dimensional and multi-modal problems, offering advantages such as a streamlined structure and robust adaptability. In the Exploration Phase of the GTO, three behavior-based mechanisms, which are derived from the social patterns observed in gorillas, are utilized: migration to unfamiliar territories, migration to familiar territories, and movement towards other gorillas. These mechanisms function collaboratively to optimize the balance between global and local search capabilities. 1. Migration to Unknown Regions (with probability \(p\))  
The process of migrating to an unknown region emulates the exploratory behavior of group members by randomly generating novel solutions. This mechanism predominantly utilizes the probability \(p\) to ascertain the occurrence of migration. Specifically, if a randomly generated number, denoted as rand, is less than \(p\), migration to a new position is executed. The mathematical formulation is as follows:  
\[GX(t+1)=(LIB-LB)\times r_{1}+LB,\;if\;rand<p \tag{4}\]where \(GX\)\((t+1)\) is the candidate position vector in the next iteration; \(r_{1}\) is a random number between [0, 1]; \(UB\), \(LB\) represent the upper and lower bounds; \(p\) controls the probability of the exploration behavior; \(rand\) is a random number between [0, 1]. 2 Movement Towards Other Gorillas (if rand \(\geq\) 0.5)  
This mechanism simulates the interactions among gorillas within the troop. It enhances local search capabilities by randomly selecting the position of another gorilla and moving towards it. The mathematical formula is presented as follows:  
\[GX(t+1)=(r_{2}-C)\times X_{r}(t)+L\times H \tag{5}\]  
where \(X_{r}\)\((t)\) is the position of a randomly selected gorilla at the \(t\)-th iteration; \(L\) is the leadership factor, calculated as \(L=C\times l\), where \(l\) is a random number between [\(-\)1, 1]; \(H\) is a random direction disturbance term, defined as \(H=Z\times X\)\((t)\), where \(Z\) is a random perturbation term within the range of [\(-\)C, C] used to introduce random disturbances in the solution space, and \(C\) is a dynamic coefficient, controlling the precision of the search. It is computed as \(C=F\times(1-It/MaxIt)\), where \(F=\cos\)\((2\times r_{4})+1\); \(r_{2}\) is a random number between [0, 1], controlling the intensity of the movement. 3 Migration Towards Known Regions (if rand \(<\) 0.5)  
This behavior simulates that the members of the population adjust the search direction based on the historical optimal solution in order to avoid repeatedly searching the same region in the solution space, through this mechanism, the algorithm is able to improve the efficiency of the search and to avoid excessive concentration on the local region. The mathematical formula is presented as follows:  
\[GX(t+1)=X\left(t\right)-L\times(L\times(X(t)-GX_{r}(t))+r_{3}\times(X(t)-GX_{r }(t))) \tag{6}\]  
where \(X\)\((t)\) is the current position of the gorilla at the \(t\)-th iteration; \(GX_{r}\) is a randomly selected historical optimal solution; \(r_{3}\) is a random number between [0, 1]. The Exploitation Phase encompasses two principal behaviors: the following of the silverback and competition among adult males. The objective of this phase is to further refine local solutions and improve local search capabilities by emulating the dynamics of leadership following and male competition within the gorilla group. 4 Following the Silverback (if C \(\geq\) W)  
In the GTO, the behavior of following the silverback is modeled by other gorilla members converging towards the silverback's position for refined local search.