## 2 Materials and Methods
### Evolution Process  
In this paper, we propose a modified genetic encoding scheme for a neural network within the NeuroEvolution of Augmenting Topologies (NEAT) algorithm. This adaptation incorporates structural modifications to the genotype by integrating additional connection parameters and representing the phenotype as a structured list format as shown in Figure 2.  
At the genotypic level, the encoding includes a set of connection attributes, specifying details such as activation states (e.g., true/false flags), numerical weights (float values), and additional properties that refine the mutation and selection mechanisms. These modifications enhance the expressiveness of the genome, allowing for greater control over the evolutionary process. The phenotype is represented as a list (network), where the first element corresponds to the number of neurons in the input layer, followed by elements representing the number of neurons in each hidden layer. The final element in the list denotes the number of neurons in the output layer. This structured format provides an intuitive representation of the neural network architecture, enabling the efficient manipulation and analysis of evolving topologies. The proposed genome was used in conjunction with a genetic algorithm to develop a genetic algorithm aimed at enhancing neural network development. Genetic algorithms (GAs) [26] are optimization techniques inspired by the principles of natural selection and genetics. GAs operate by evolving a population of candidate solutions through iterative processes of selection, crossover, and mutation, aiming to find optimal or near-optimal solutions to complex problems. In the context of neural networks, GAs have been employed to optimize various aspects, including network architecture [27; 28], weights [29; 30], and hyperparameters [31; 32]. Figure 1: Genetic encoding from NEAT algorithm. Figure 2: Proposed structure for Artificial Neural Networks based on NEAT algorithm. The genome structures of the neural network were developed for the initial population of the genetic algorithm. The algorithm began by selecting candidates for the generation through a binary tournament. For genetic operators, mutation and crossover methods were designed based on the NEAT genome. The mutation method introduced changes at the genotype level, specifically modifying the weight on a specific connection. Algorithm 1 modifies the structure of neural networks by adjusting the weights and innovation numbers within the hidden layers. The procedure begins by selecting a random hidden layer and a neuron within that layer. A specific weight from the selected neuron is then chosen and modified. Then, the algorithm increments the innovation numbers for the hidden layer and the neuron to reflect the changes and updates the chosen weight with a new random value. ```
1:procedure\(GenOperator(NeuralNetwork\)\(Offsprings[])\)
2:for each i in Offs do
3:\(HL=rand(0,(Offs[i].hidL)-1)\)
4:\(N=rand(0,(Offs[i].hidL[HL].neurons)-1)\)
5:\(w_{m}=rand(0,(Offs[i].hidL[HL].neurons[N].w)-1)\)
6:\(Offs[i].hidL[HL].innov=Offs[i].hidL[HL].innov+1\)
7:\(Offs[i].hidL[HL].neurons[N].innov=Offs[i].hidL[HL].neurons[N].innov+1\)
8:\(Offs[i].hidL[HL].neurons[N].w=Offs[i].hidL[HL].neurons[N].w[w_{m}]\)
9:\(Offs[i].hidL[HL].neurons[N].w[w_{m}]=rand()\)
10:endfor
11:endprocedure
```  
**Algorithm 1** Genotype Mutation Operator  
For crossover, modifications were applied to the genome's information regarding the connections within the neural network. The crossover operator consists of a differential evolution strategy within a neural network framework. It adjusts the network weights based on differences computed from two-parent networks and introduces stochastic mutations while tracking modifications via innovation counters, as illustrated in Figure 3.  
Figure 3: Genotype operator. Algorithm 2 modifies the neural network structure based on evolutionary principles.