# Neuroevolution for Parameter Adaptation in Differential Evolution
## 2 Materials and Methods  
### Differential Evolution  
Differential Evolution is a population-based evolutionary algorithm proposed by [PERSON] and [PERSON] [24]. The key idea of DE is the usage of difference vectors between individuals, which allows for efficient exploitation of the functions' landscape. DE starts with an initialization step, whereby points are randomly generated within the boundaries \([xmin_{j},xmax_{j}]\): \(x_{i,j}\), \(i=1\ldots NP\), \(j=1\ldots D\), where \(D\) is the problem dimension and \(NP\) is the population size. The main loop of DE consists of mutation, crossover and selection operators. The mutation is the main part of DE, which makes it different from other algorithms. Most recent DE-based algorithms use the current-to-pbest/1 strategy [25], which generates mutant (donor) vector \(v_{i}\) for each target vector \(x_{i}\) as follows:  
\[v_{i,j}=x_{i,j}+F(x_{pbest,j}-x_{i,j})+F(x_{r1,j}-x_{r2,j}), \tag{1}\]  
where _pbest_ is an index of one of the \(p*100\%\) best individuals, \(r1\) and \(r2\) are randomly chosen indices from \([1,NP]\). \(F\) is called the scaling factor and is usually chosen in the range \([0,1]\). Note that _pbest_, \(r1\) and \(r2\) are generated to be different from each other. After mutation, the generated donor vector \(v_{i}\) is combined with a target vector \(x_{i}\) to produce a trial vector \(u_{i}\) with crossover. The commonly used crossover operation is binomial crossover, in which the trial vector receives randomly chosen components from the mutant vector with a probability \(Cr\in[0,1]\):  
\[u_{i,j}= \begin{cases}v_{i,j},&\text{if }rand(0,1)<Cr\text{ or }j=jrand\\ x_{i,j},&\text{otherwise}\end{cases} , \tag{2}\]  
where \(jrand\) is a randomly chosen index from \([1,D]\), required to make sure that the trial vector is smaller than the target vector to avoid unnecessary fitness calculations. Before calculating the goal function value for the trial vector \(u_{i}\) the Bound Constraint Handling Method (BCHM) should be applied. One of the often-used approaches is called midpoint target [26]:  
\[u_{i,j}= \begin{cases}\frac{xmin_{i}+x_{ij}}{2},&\text{if }u_{i,j}<xmin_{i}\\ \frac{xmax_{i}+x_{ij}}{2},&\text{if }u_{i,j}>xmax_{j}\end{cases} . \tag{3}\]  
After applying BCHM and the fitness calculation, the selection step is performed. If the goal function value of the trial vector is small than that of the target vector (minimization problem), then the replacement occurs:  
\[x_{i,j}= \begin{cases}u_{i,j},&\text{if }f(u_{i})\leq f(x_{i})\\ x_{i,j},&\text{if }f(u_{i})>f(x_{i})\end{cases} . \tag{4}\]  
Although the general scheme of DE is relatively simple, it comes with the price of high sensitivity to parameter values. Nowadays there are many studies addressing this issue [27], and further several well-known approaches will be considered. In [28] the jDE algorithm was proposed, in which the parameter values were adapted as follows:  
\[F_{i,t+1}= \begin{cases}random(F_{l},F_{u}),&\text{if }random(0,1)<\tau_{1}\\ F_{i,t},&\text{otherwise}\end{cases} , \tag{5}\]  
\[CR_{i,t+1}= \begin{cases}random(0,1),&\text{if }random(0,1)<\tau_{2}\\ CR_{i,t},&\text{otherwise}\end{cases} . \tag{6}\]  
where \(F_{l}\) and \(F_{u}\) are the lower and upper boundaries for \(F\), and \(\tau_{1}\) and \(\tau_{2}\) control the frequency of \(F\) anc \(Cr\) changes, usually set to 0.1. The jDE algorithm updates \(F\) and \(Cr\) if the trial vector is better than the target vector storing the successful values. The jDE approach is known to be quite efficient, and its modifications jDE100 [29] and j2020 [30] demonstrated high efficiency on bound-constrained test problems. Another branch of parameter adaptation techniques started with the JADE algorithm [31], which,together with the current-to-pbest/1 mutation strategy, proposed automatic parameter tuning.