## 4 Experimental Results
### Wall-Following Control of a Mobile Robot
\[SF_{2}=\frac{\sum_{t=1}^{T_{stop}}WD(t)}{T_{stop}}\] (25) where \(d_{null}\) is the expected distance of the robot from the wall. A predefined distance \(d_{null}\) was set to 4 cm, as shown in Figure 19a, and \(T_{stop}\) is the time step of the mobile robot during the learning process of the wall-following motion. If the mobile robot maintains a fixed expected distance from the wall, then the value of \(SF_{2}\) is equal to zero. 3. The degree of parallelism between the mobile robot and the wall: The fitness function \(SF_{3}\) was used to evaluate the degree of parallelism between the mobile robot and the wall. If the robot was parallel to the wall, then the angle between the sensor \(S_{2}\) on the right side of the mobile robot and the wall was 90\({}^{\circ}\). According to the law of cosines, \(x(t)\) must be equal to \(RS_{2}\), forming an isosceles triangle, as depicted in Figure 19b. The formulas are expressed as follows: \[RS_{1}=r+ps_{1},RS_{2}=r+ps_{2}\] (26) \[x(t)=\sqrt{{RS_{1}}^{2}+{RS_{2}}^{2}-2 RS_{1}RS_{2}\cos(45^{\circ})}\] (27) where \(S_{1}\) and \(S_{2}\) are the distances of the mobile robot sensors, and \(r\) is the radius of the mobile robot. The fitness function \(SF_{3}\) is defined as the average value of the degree of parallelism between the mobile robot and the wall during the moving time. If the mobile robot is parallel to the wall, then the value of \(SF_{3}\) is equal to zero. Figure 16:0 (28) Therefore, a fitness function \(F\) (\(\cdot\)) was used to evaluate overall control performance. This fitness function was formed by combining the aforementioned subfitness functions (\(SF_{1},SF_{2},SF_{3}\)) as follows: Figure 16:1 (29) This proposed DGCPSO was compared with other evolutionary algorithms. Table 5 lists the initial parameter settings of DGCPSO. To evaluate the algorithm stability, the experiment was performed ten times for each algorithm. Figure 16:2 (**a**) Distance the mobile robot kept from the wall and (**b**) degree of parallelism between the mobile robot and the wall. The effectiveness of the algorithm in the wall-following mode can be verified with Figure 16:3 The fitness value of the best, worst, average, SD, and number of successful runs (NSR) of each algorithm were compared. The number of times the mobile robot successfully learned to circle the training setting in ten evolutionary simulations was noted. Table 6 presents a comparison of the effectiveness of the fitness values of various algorithms for wall-following control in the training setting. Under the same conditions, DGCPSO exhibited superior wall-following learning. Furthermore, the STD data revealed that the algorithm proposed in this study has high stability (Table 6). To verify whether different algorithms could successfully adapt the mobile robot to various settings after learning, two test settings were established and the results were compared with the original training setting to verify the effectiveness of the wall-following control of the mobile robot. In the wall-following control, the fitness value of the mobile robot was used to assess the wall-following control of the mobile robot. Table 7 indicates that the control efficiency of the proposed DGCPSO was superior to other algorithms (Figures 20 and 21). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Algorithm**} & \multicolumn{4}{c}{**Fitness Value**} & \multicolumn{2}{c}{**Number of Successful**} \\ \cline{2-6}  & **Best** & **Worst** & **Average** & **SD** & **Runs (NSR)** \\ \hline DGCPSO & 0.942 & 0.905 & 0.922 & 0.004 & 10 \\ Artificial Bee Colony (ABC) [22] & 0.862 & 0.794 & 0.837 & 0.004 & 8 \\ Whale Optimization & & & & & \\ Algorithm (WOA) [23] & 0.933 & 0.826 & 0.872 & 0.015 & 8 \\ DE [24] & 0.848 & 0.824 & 0.853 & 0.005 & 10 \\ PSO [25] & 0.932 & 0.844 & 0.901 & 0.005 & 10 \\ QPSO [26] & 0.937 & 0.867 & 0.921 & 0.002 & 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Efficiency of difference algorithms in the training setting.