# A Knowledge-Guided Competitive Co-Evolutionary Algorithm for Feature Selection
## 3 Knowledge-Guided Evolutionary Algorithm
### Feature Grouping Based on Correlation
This dual approach ensures that, while one algorithm might explore more deeply into a certain region of

Figure 2: An example of knowledge-guided crossover and mutation. the solution space, the other may explore more broadly, thereby enhancing the overall explorative capabilities of the combined algorithm. Crossover and Mutation: After the initial evolutionary operations, both sub-populations undergo crossover and mutation processes. Mutation and crossover are applied differently in the two sub-populations to maintain their distinctive characteristics. For \(S_{1}\), mutation is knowledge guided, whereas for \(S_{2}\) it is more random and exploratory. Integration and Selection: The offspring from both \(S_{1}\) and \(S_{2}\), denoted as \(Q_{1}\) and \(Q_{2}\), respectively, are then integrated to form a unified offspring population. This integration is crucial as it brings together the diverse traits developed independently in each sub-population. The unified population undergoes a non-dominated sorting followed by crowding distance selection to ensure that the next generation, \(Q_{t}\), maintains a balanced representation of both exploration and exploitation traits. The size of \(Q_{t}\) is set to be equal to \(N_{ind}\), maintaining a consistent population size through the generations. Feedback and Adjustment: The performance of each sub-population in producing high-quality offspring is monitored. Based on their performance, the allocation ratio is dynamically adjusted for the next generation, ensuring that more resources are allocated to the more successful approach in the current generation. This adaptive mechanism allows the KCCEA model to respond to the evolving landscape of the problem space effectively. By fostering a balance between competition and cooperation, the KCCEA not only mitigates the risk of converging prematurely to local optima but also leverages the strengths of both evolutionary algorithms, leading to a robust mechanism for finding optimal solutions. Figure 3: Framework of competition–cooperation evolutionary mechanism. ### Dynamic Resource Allocation Based on Success Rate

Assuming the population size \(N_{ind}\) is 100, initially, the allocation ratio is set to 0.5, meaning that, during the allocation, individuals are equally distributed between the two algorithms, forming their respective parent populations with 50 individuals each. Individuals generated by the KGEA are marked as 0, and those generated by the traditional NSGA-II are marked as 1. By merging the parent and offspring populations of the two algorithms, and selecting 100 individuals to form a new generation, the elite retention mechanism ensures that excellent parent individuals will also appear in the new generation. We count the number of individuals marked as 0 and 1 to calculate the success rates of the two search methods. Suppose that, in the new generation, there are 40 individuals marked as 0 and 30 individuals marked as 1. Then, the success rate of the KGEA is 0.8, and the success rate of the NSGA-II is 0.6. Normalize 0.8 and 0.6 so their sum equals 1, yielding new search ratios of 0.57 and 0.43. Update the allocation ratio to 0.57, and set the mark of all individuals to 2. According to the new search ratio, randomly select the corresponding number of individuals from the solutions generated by the two search methods to form the offspring. The dynamic resource allocation mechanism based on success rate is shown in Figure 4.

In the process of population evolution, it may occur that, due to the strong optimization capability, one method's success rate is extremely high. Without restriction, this could lead to one model monopolizing all evolutionary resources, causing the loss of the other search method. In the later stages of iterative evolution, when the quality of individuals in the population is high, it may occur that the success rate of a certain search method is 0, which also requires manual intervention in the search ratio.