## 5 Iwoa-Iga--Enhanced WOA Algorithm Featuring Improved Genetic Mechanism
### IGA Framework
#### 5.2.3 NoC Application Mapping: Directional Optimization Incorporating Crossover and Mutation  
The GA's central process significantly affects the algorithm's ability to seek improved and optimal solutions [45]. The more optimal the objective function is for any individual solution, the closer the mapping combination will be to the optimal region. Hence, the proposed IWOA-IGA uses a direction-based crossover operator. The modified crossover operation has good ability for searching the overall search space, and can produce mapping solutions with a larger probability of enhancing the objective function, thereby speeding up the algorithm's convergence. As in the initial step of the GA, the population of mapping solutions is divided into two groups, \(X^{(map_{a})}\) and \(X^{(map_{b})}\). The communication cost of the individual solutions in \(X^{(map_{a})}\) is superior to those of the solutions in \(X^{(map_{b})}\); thus, \(X^{(map_{a})}\) is the leader in the direction of crossovers for producing high quality solutions. The mathematical equation that generates the mapping solutions with directional-based crossover is provided by  
\[ \begin{cases}X_{i}^{*}=X_{i}^{map_{a}}+r_{ij}\cdot\vec{D_{ij}}\\ \vec{D_{ij}}=X_{i}^{map_{a}}-X_{i}^{map_{b}}\end{cases} \quad i=1,....3n/2,j=1,....,m^{\prime} \tag{35}\]  
where \(\vec{D_{ij}}\) represents the directional vector. The parameter \(r_{ij}\) is a uniformly distributed random number ranging from \(-1\) to \(1\). Thus, in directional crossover based on grouping-wise solutions, each mapping pair develops into one mapping solution, eventually generating new individuals. Finally, it sorts the high-quality mapping solutions with the best communication cost, developing n individuals as offspring of the crossover. To see the effect of the direction-based crossover operation on two of the paired mapping solutions, paired individuals are shown to occupy a certain space in the appropriate region. As \(r_{ij}\) takes on boundaries between \(1\) and \(-1\), the paired mapping solutions will take various directions to reach the optimal communication cost value. The various directions for solution \(X_{1}\) can be \(X_{1}\) with D11, D12, D11, D12, as shown in Figure 6. The solution in the region is shown by the rectangle with its center at \(X_{1}\) and \(X_{2}\) as one vertex. Having now obtained various paired mapping solutions, they can be used to generate many such rectangular patterns; along with the selection process, direction-based crossover assists the algorithm in generating high-quality solutions in the direction of the optimal solution. Parents \(X_{1}\) and \(X_{2}\) can produce offspring that will tend to have better communication costs. The crossover operation recombines the parents' chromosomes, and the best offspring undergo mutation and continue on to produce superior results. The mutation operation is applied to offspring to achieve more optimal results. Mutation allows for altering the placement of one or more mapped tasks of individuals in a population with a specified mutation probability, which can help to promote population diversity and prevent premature events. The communication cost of all the resulting mappings are computed after mutation, and the mutation is accepted if the communication cost of the mutated mapping is less than that of the original ones. To increase population diversity and prevent the GA version from falling into local optima, the mechanism of replacement operation is incorporated [43]. The basic goal of the replacement operation is to set aside the most elite K individuals from the population for every K generation. In traditional approaches, certain elite individual solutions are retained in parents. Nevertheless, the high-quality solutions created as a result of crossover may be affected by the mutation operation, and their quality may degrade to some extent. Thus, in this work we adopt a better approach to retain the most elite mapping solutions produced by the genetic operation.