# GA-PSO Algorithm for Microseismic Source Location
## 2 Materials and Methods
### Implementation of GA-PSO Algorithm  
The Genetic Algorithm is an algorithm proposed by [PERSON] to simulate the process of biological evolution based on the principles of genetics [29]. Starting with a population of chromosomally characterized individuals from the solution set, operations such as selection, crossover, and mutation are performed generation by generation from the initial population to produce a new population. Through the mechanisms of crossover and mutation, solution diversity is maintained, preventing the algorithm from becoming trapped in local optima. Mutation enables deeper exploration of local regions and enhances solution precision. Finally, the optimal chromosomes derived are decoded to obtain the best solution. The PSO algorithm, a heuristic optimization method, was proposed by [PERSON] and [PERSON] [30]. Its main principle is to solve optimization problems by simulating the process of a flock of birds searching for food. By simulating the interactions among individual particles within the flock, the optimal solution is progressively identified through iterative optimization, with the fitness value serving as a metric for solution quality. This algorithm is straightforward to implement, provides high accuracy and rapid convergence, and effectively seeks the global optimum by leveraging collaboration among individuals within the population. The algorithm steps of PSO are initialization, fitness evaluation, and then updating individual optimal positions and group optimal positions [31]. The formula for updating speed is  
\[v_{i}(t+1)=w\cdot v_{i}(t)+c_{1}\cdot r_{1}\cdot(\mathit{Pbest}_{i}-x_{i}(t))+ c_{2}\cdot r_{2}\cdot(\mathit{Gbest}_{i}-x_{i}(t)) \tag{5}\]  
The update formula for the position is  
\[x_{i}(t+1)=x_{i}(t)+v_{i}(t+1) \tag{6}\]where \(w\) is the inertia weight. In general, a larger \(w\) enhances the global search capability but weakens the local search capability, while a smaller \(w\) strengthens the local search capability at the expense of global exploration. A dynamically adjusted \(w\) allows for systematic variation during the PSO algorithm's search process, improving the optimization performance and achieving optimal solutions. \(c_{1}\), \(c_{2}\) are the learning factors, where \(i=1,2\ldots N\), and \(N\) is the total number of particles, usually \(c_{1}=c_{2}=2\). \(r_{1}\), \(r_{2}\) are random numbers in the range of 0-1, Pbest is the best position of an individual particle, and Gbest is the best position globally. \(v_{i}\) is the velocity of the particle, and the value of \(v_{i}\) is in between the values defining the velocity interval of the particle. The PSO algorithm tends to experience diminished search capability in later stages and is susceptible to falling into local optima [32]. This manuscript enhances the PSO algorithm by incorporating a dynamic learning factor and adaptive inertia weight. The dynamic learning factor can automatically adjust the particle behavior according to the iteration progress, without the need to manually adjust the parameters. \(c_{1}\) and \(c_{2}\) denote two learning mechanisms: the individual learning factor and the social learning factor [33]. \(c_{1}\) controls a particle's tendency to follow its own best historical position, while \(c_{2}\) governs its inclination to follow the global best position in the population. During different optimization phases, these two parameters need to be adjusted differently to maximize their effectiveness [34]. Research indicates that optimization strategies based on nonlinear variations using the sine function outperform those using the cosine function [35]. The use of a sine squared function, rather than linear decrement or increment, is preferred due to its smooth and continuous derivative, which mitigates oscillations caused by abrupt parameter changes and better accommodates the search requirements at different stages.