## 2 Algorithms
### Genetic Algorithm  
The Genetic Algorithm (GA) is very different from PSO in its method of optimization, as it does not rely on momentum or points of attraction. Instead, it uses the fitness of individuals from the last generation [17]. The first step of modifying the parameters is selecting parents. In this study, it is carried out through a roulette-style competition without replacement, where each individual's fitness is determined by the following  
Figure 2: The difference between exploitation with PSO (blue envelope) and DPSO (red points on the grid).  
\[\hat{r}(i)=\frac{(r_{i}-\min(\vec{r}_{\text{gen}}))\times(1-\frac{\text{len}( \text{argmin}(\vec{r}_{\text{gen}}))}{N})}{\max(\vec{r}_{\text{gen}})-\min( \vec{r}_{\text{gen}})}+\frac{\text{len}(\text{argmin}(\vec{r}_{\text{gen}}))}{ N^{2}}. \tag{13}\]  
where \(\text{len}(\text{argmin}(\vec{r}))\) returns the number of individuals who obtained the current minimum fitness, which allows the fitness distribution to approach a uniform distribution as more individuals produce equivalent fitness values.  
As there is no order on the resulting list of parent indices, they are considered sufficiently mixed. These parents are used in pairs to produce the \(k\)th child  
\[\text{parent1}=\mod(k,q_{0}), \tag{14}\] \[\text{parent2}=\mod((k+1),q_{0}). \tag{15}\]  
where \(\mod(k,q)\) is the modulus division of \(k\) by the number of selected parents \(q\). parent1 and parent2 are the indices of the chosen parents whose genes are \(\vec{p}_{\text{parent1}}\) and \(\vec{p}_{\text{parent2}}\), respectively.  
The number of parents permitted to produce offspring is defined by  
\[q_{0}=\max(2,\min(N-2,\lfloor c_{0}\times N\rfloor)), \tag{16}\]  
where \(c_{0}\) is the percent population allowed to reproduce. The percent replacement is determined by \((1-c_{0})\), i.e., the population that was not selected is replaced to minimize redundant evaluations. After the parents are selected, crossover occurs with  
\[\vec{p}_{\text{child}}=\vec{p}_{\text{parent1}}\times\vec{b}_{g}+\vec{p}_{ \text{parent2}}\times(1-\vec{b}_{g}), \tag{17}\]  
where \(b_{g}=1\) with random permutation \(\vec{g}=P(G,\lfloor G/2\rfloor)\) and \(b_{g}=0\) otherwise. \(G\) is the length of the genome, and \(P(G,X)\) denotes a random choice of \(X\) elements of \(G\) without replacement, while \(P^{R}(G,X)\) is with replacement. Gene mutation for each child is determined by a random permutation with replacement \(\vec{g}=P^{R}(G,\lfloor c_{1}\times G\rfloor)\), where \(c_{1}\) is the maximum allowed percent mutation a genome can undergo (the minimum is one mutated genome). For each unique gene/dimension selected for mutation, a uniform random value within the respective limits is applied. The general process flow for GA is shown in Figure 1b. The individual fitness calculation time complexity is \(O(4N)\), parent selection which shuffles and fully utilizes the current population is \(O(2N)\), a random permutation of the genes for each child is \(O(D\times N)\), crossover with full replacement is \(O(2D\times N)\), mutation is \(O(D\times N)\), and each dimension limit check is \(O(D\times N)\), resulting in a total time complexity per iteration of \(O((5D+6)\times N)\).