# Difference-Based Mutation Operation for Neuroevolution of Augmented Topologies +
## 3 Results
In the RIP problem, the pendulum is mounted on the output arm, which is driven by a servo motor. The position of the pendulum and the arm are measured by encoders. The input to the system is the servo motor voltage and direction. The pendulum has one stable equilibrium point, when the pendulum is pointing down, and another unstable point, where it is pointing up, and the goal is to keep it up and turn the arm to the desired angle. In this study, the model described in [34] is used for experiments. The system is described with the following state variables:  
\[[x_{1}x_{2}x_{3}x_{4}]^{T}=[\theta_{1}\theta_{2}\theta_{1}^{\prime}\theta_{2}^ {\prime}]^{T} \tag{5}\]  
These four state variables are the input signal for the controller. Figure 6 shows the RIP and its main characteristics. The full list of parameters and their values was taken from [34] and is provided in Table 9. The modeling was performed with step size of h = 0.01 and time Tmax = 10 s. During modeling, the number of revolutions of arm and pendulum was also measured. Figure 5: One of the solutions to the Phoneme dataset, test accuracy is 0.80705. As long as the goal of the control was to set the pendulum to the upright position and the arm to the predefined zero position, the fitness calculation was based on the total difference between the desired and actual positions of the pendulum and the arm, as well as their angular velocity. So, the fitness was defined as follows:  
\[f_{i}=\frac{1}{\pi}\sum_{j=0}^{\frac{T_{max}}{b}}|x1_{j}|+\frac{1}{\pi}\sum_{j=0} ^{\frac{T_{max}}{b}}|x2_{j}|+\frac{1}{2}\sum_{j=0}^{\frac{T_{max}}{b}}|x3_{j}|+ \frac{1}{20}\sum_{j=0}^{\frac{T_{max}}{b}}|x4_{j}| \tag{6}\]  
Each state variable in fitness calculation was weighted by its range. The controller design consisted of four separate steps, where the goal of the first step was to stabilize the pendulum in an upright position, the second was to stabilize and bring an arm to the desired position, and the third and fourth were to repeat the same with swing-up sequence. The parameters of the starting points for the control are presented in Table 10.  
Figure 6: Rotary inverted pendulum. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Name** & **Description** & **Value** \\ \hline \(m_{1}\) & Mass of arm & 0.056 kg \\ \(l_{1}\) & Length of arm & 0.16 m \\ \(c_{1}\) & Distance to arm center of mass & 0.08 m \\ \(J_{1}\) & Inertia of arm & 0.00215058 kg\(\cdot\)m\({}^{2}\) \\ \(m_{2}\) & Mass of pendulum & 0.022 kg \\ \(l_{2}\) & Length of pendulum & 0.16 m \\ \(c_{2}\) & Distance to pendulum center of mass & 0.08 m \\ \(J_{2}\) & Inertia of pendulum & 0.00018773 kg\(\cdot\)m\({}^{2}\) \\ \(R_{m}\) & Armature resistance & 2.5604 \(\Omega\) \\ \(K_{b}\) & Back-emf constant & 0.01826 V\(\cdot\)s/rad \\ \(K_{t}\) & Torque constant & 0.01826 N\(\cdot\)m/A \\ \(\theta_{1}\) & Angular displacement of arm & - \\ \(\theta_{1}^{\prime}\) & Angular velocity of arm & - \\ \(\theta_{2}\) & Angular displacement of pendulum & - \\ \(\theta_{2}^{\prime}\) & Angular velocity of pendulum & - \\ \(\tau\) & Applied torque & - \\ \hline \hline \end{tabular}
\end{table} 
Table 9: List of parameters of rotary inverted pendulum. The learning process was divided into four parts, the maximum number of generations was set to 2500, the population size was set to 100 individuals. To test the efficiency of the approach there were 10 independent runs of the algorithm performed. For every run, at each generation, the best individual was used to build the graphs of control. First, the sensitivity analysis was performed for different values of mean, used in normal distribution for \(F\) sampling. The comparison results are shown in Table 11. The Mann-Whitney statistical tests were performed with the same parameters as for classification problems. According to the sensitivity analysis in Table the best results on average were achieved with the mean value in \(F\) sampling equal to 0.5, and the median value is the second smallest here.