# Neuroevolution for Parameter Adaptation in Differential Evolution
## 2 Materials and Methods
### Proposed Approach  
The problem of tuning parameters is one of the most studied in evolutionary computation [48]. The idea of automating the search for parameter adaptation heuristics is, to the best of our knowledge, relatively new, and was considered in [22]. In [22], genetic programming (GP) [49] was applied to find heuristics for controlling the \(F\) and \(Cr\) values via symbolic regression [50; 51], and separate solutions were evolved for \(F\) and for \(Cr\). In this paper, instead of GP, which was previously used for designing hyper-heuristics [52], the NEAT approach is applied. One of the advantages of NEAT over GP is that it is capable of evolving structures with several inputs and outputs, and allows interaction between inputs and outputs within one solution, unlike GP, where two separate trees were built to control both \(F\) and \(Cr\) at the same time. As a baseline approach to be used for hyper-heuristic design with NEAT, a simplified version of the recently developed NL-SHADE-RSP approach [39] was considered. Being the winner of the CEC 2021 competition on bound-constrained single-objective optimization for biased, shifted and rotated cases, NL-SHADE-RSP represents a state-of-the-art approach. Thus, improving its performance further is a challenging task. However, the version of NL-SHADE-RSP used in this study is simplified (NL-SHADE-RSP\({}_{s}\)), i.e., some of the specific parameter adaptation techniques are removed in order to allow improved flexibility for NEAT during heuristics search. NL-SHADE-RSP\({}_{s}\) uses non-linear population size reduction, as described above, and the current-to-pbest/r mutation strategy with rank-based selection. The additional selection mechanism, proposed in [53], and further studied in [54], assigns ranks \(R_{i}=e^{-i/NP}\) in an array sorted by fitness values, with largest ranks assigned to better individuals. Theseranks are further used to calculate the probabilities of choosing an individual from the population for the \(r2\) index:  
\[pr_{i}=\frac{R_{i}}{\sum_{j=1}^{NP}R_{j}}, \tag{13}\]  
where \(i=1\ldots NP\). Hence, better individuals with larger fitness have higher chances of being used in the mutation. The \(pb\) parameter in the current-to-pbest/r mutation strategy is gradually increased, i.e., the initial value of \(pb_{min}\) is set to 0.2, and the number of individuals to choose \(pbest\) from is linearly increased as follows:  
\[pbest=max(2,NP(0.2+0.1\frac{NFE}{NFE_{max}})). \tag{14}\]  
The minimal value of \(pb\) is set to 2 individuals. NL-SHADE-RSP\({}_{s}\) uses only binomial crossover and does not apply any heuristics for controlling the \(Cr\) value depending on current computational resource. NL-SHADE-RSP\({}_{s}\) does not include adaptive archive probabilities and crossover rate sorting. The pseudocode of NL-SHADE-RSP\({}_{s}\) is presented in Algorithm 2. The inputs for the NEAT individuals included the following parameters:  
* The ratio of the currently used computational resource \(NFE_{r}=\frac{NFE}{NFE_{max}}\);
* The success ratio, defined as \(SR=\frac{|A|}{NP}\);
* The individual number ratio \(IN=\frac{i}{NP}\);
* The last good \(F\) value for individual \(i\);
* The last good \(Cr\) value for individual \(i\). For the third parameter, \(IN\), to be informative, the whole population was sorted by fitness at the beginning of each generation. It allows different values of \(F\) and \(Cr\) to be assigned depending on the quality of an individual. This makes it possible to replicate the sorting of \(Cr\) values, which was applied in NL-SHADE-RSP, by setting the appropriate weights in the NEAT individual. The DE with built-in NEAT parameter adaptation does not use memory cells, and the resulting values returned by the designed neural network are used to sample \(F\) and \(Cr\) with Cauchy and normal distribution instead of memory cell values. The NEAT algorithm applied in this study had several features, which were specifically added for the problem of parameter adaptation heuristic design.