# A Cellular Automata-Based Crossover Operator for Binary Chromosome Population Genetic Algorithms
## 5 CGACell Operator for Binary Chromosomes Population of Genetic Algorithms
Let the set of chromosomes chosen for reproduction in the \(GA\) selection stage be of the form \(C_{s}=\{ch_{1},ch_{2},ch_{3}\}\) from the current population \(P(t)\)._  
_Having the representation of chromosomes \(ch_{i}=\{g_{1i},g_{2},\ldots,g_{ing}\}\), \(g_{ii}\in\{0,1\}\) for \(q=\overline{1..ng}\) (\(ng=9\)) and \(i=\overline{1..nc}\), \(nc=3\), the neighborhood \(V_{h}\) is formed for the application of the CGACell ECA crossover operator, by \(V_{h}=\{v^{1},v^{2},v^{3}\}\), with \(v^{i}=g_{ij}\), \(j\in\{1,2,\ldots,ng\}\), \(v^{i}\in\{0,1\}\), \(n_{r}=3\), \(i=\overline{1..n_{c}}\)._  
_The application of the operator CGACell ECA at a mixed level on three chromosomes using ECA with rule \(110\) is presented in Figure 19 and by using ECA with rule \(90\) in Figure 20. We can see the descendant chromosome (\(D1\) or \(D2\)) obtained by CGACell ECA crossover using ECA rule \(110\) or \(90\) with the neighborhood formed by taking the values of the genes on the same positions from the three chromosomes selected for crossing._  
Figure 17: The CGACell ECA crossover for two parents with 9 genes by applying ECA rule 110 at the individual chromosome level. Descondant chromosome (D1 or D2) cells that differ from the corresponding states in chromosome two, after applying CGACell ECA crossover and ECA rule \(110\) or \(90\), are highlighted on a white background. **Remark 4** (**CGACell 2D CA**). : _By using two-dimensional cellular automata, the version of the CGACell 2D CA crossover operator is obtained. We have the relationship \(CGACell(C_{s},V_{h},\gamma)=2D\ CA(C_{s},V_{h},\gamma)\), where the neighborhood \(Vsh\) is built in accordance with the templates presented for two-dimensional cellular automata (Remark 2), with the most representative being the von Neumann neighborhood with five neighbors; the Moore neighborhood with nine neighbors, \(V_{h}=\{v^{1},v^{2},v^{nv}\}\), \(v^{i}\in\{0,1\}\), \(i=\overline{1..n_{r}}\), and \(nv\in\mathbb{N}^{*}\) is the number of neighbors in \(V_{h}\)._  
Figure 19: The CGACell ECA crossover in the mixed variant for three chromosomes with 9 genes by applying ECA rule 110. Figure 20: The CGACell ECA crossover in the mixed variant for three chromosomes with 9 genes by applying ECA rule 90. **Property 1**. : _The configuration space of the cellular automaton \(V\) is formed by completing the two-dimensional space with chromosomes chosen as \((C_{s})\) from the current population \(P(t)\) to participate in the creation of descendants and the new generation of individuals._  
_Example 3--CGACell 2D CA_  
_The results of applying the 2D CA crossover operator are displayed graphically in Figures 21-24. The figures show graphical representations of the binary images corresponding to the application of CGACell 2D CA crossover with evolution in 100 generations of the chromosomes selected in \(C_{s}\) to denote the two-dimensional configuration space of the 2D CA automaton for von Neumann neighborhoods with rules 6 and 11, respectively, and Moore with rules 330 and 490 with the use of 10 chromosomes consisting of 20 genes. In all four figures, the chromosomes descended from time \  
**Remark 5** (**Application in data classification with KNN method of the CGACell crossover-based genetic algorithm**). : _This is considered a data classification application using the KNN algorithm based on the nearest neighbors [51; 52; 53; 54; 55; 56]. Performance testing in data classification through the KNN algorithm is performed on the basis of a set of training data \(X^{L}\) and a set of test data \(X^{t}\), both sets of data from multiple data classes, and the key element that determines the improvement of the results is the parameter k number of neighbors taken into account for classification. For the optimal establishment regarding the performance in classification of the value of the k parameter, it can be achieved by applying a genetic algorithm based on CGACell crossover.