# Improvement of Dung Beetle Optimization Algorithm Application to Robot Path Planning
## 3 The Proposed Algorithm
### Improved Tent Chaos Mapping Strategy  
Similar to other metaheuristic optimization algorithms, the original Dung Beetle Optimization (DBO) Algorithm initializes the population by randomly assigning individual positions. However, this random initialization often leads to low population diversity and slow convergence, especially when dealing with complex problems. To address this issue and promote a more even distribution of individuals across the solution space, we propose initializing the population using a chaotic mapping technique. This approach enhances the diversity of the initial population, which can improve the overall search efficiency and convergence speed of the algorithm. Chaotic perturbation functions frequently cited in the literature include the Logistic and Tent mappings. The Logistic mapping is known for its uniform probability distribution in the center of the range, with a significantly higher probability at the boundaries. However, this distribution can be less effective in optimization problems where the global optimum is not near the boundaries of the design space. In contrast, the Tent mapping typically offers better performance compared to the Logistic mapping [39]. The Tent mapping provides a more balanced distribution of values across the entire range, which enhances the algorithm's ability to explore the solution space more effectively. Figure 1 illustrates the chaotic sequence generated by the Logistic mapping, while Figure 2 shows the chaotic sequence generated by the Tent mapping. Figure 1: Logistic chaotic mapping. As observed, Logistic chaotic maps have a significantly higher probability of generating values near the boundaries, while Tent chaotic maps offer a more uniform probability distribution across the feasible domain. Consequently, if Logistic chaotic mapping is used to initialize the population, the inhomogeneity of its chaotic sequence can negatively impact the speed and accuracy of the algorithm's optimization. In this paper, we utilize Tent chaotic mapping to initialize the population instead of random initialization. This approach is favored because the Tent chaotic mapping provides a more evenly distributed population compared to those generated by Logistic chaos mapping or random initialization. The Tent chaotic mapping is mathematically represented by Equation (6). \[x_{i+1}=\left\{ \begin{array}{ll}2x_{i}&0\leqslant x\leqslant\frac{1}{2},\\ 2(1-x_{i})&\frac{1}{2}<x\leqslant 1.\end{array} \right. \tag{6}\]  
Through the analysis of the Tent chaotic iteration sequence, we identified the presence of unstable cycle regions and small cycles. These cycles can cause the sequence to become trapped, leading to ineffective exploration of the solution space. To mitigate this issue and prevent the sequence from getting stuck in these cycles, we introduced a random variable into the original Tent chaotic mapping. This modification enhances the mapping's ability to explore the solution space more effectively and avoids the repetitive patterns found in small cycles. This adjustment allows for better population initialization by ensuring greater diversity and improving the algorithm's performance in complex optimization tasks. The enhanced Tent chaotic mapping is expressed by Equation (7). \[x_{i+1}=\left\{ \begin{array}{ll}2x_{i}+rand(0,1)\times\frac{1}{N}&0\leqslant x \leqslant\frac{1}{2},\\ 2(1-x_{i})+rand(0,1)\times\frac{1}{N}&\frac{1}{2}<x\leqslant 1.\end{array} \right. \tag{7}\]  
In Equation (7), \(N\) is how many particles there are in the sequence. In addition to maintaining the Tent chaotic mapping's regularity, ergodicity, and randomness, the \(rand(0,1)/N\) successfully keeps the algorithm from slipping into tiny, unstable cycles while iterating. Figure 3 displays the impact of the enhanced Tent chaotic sequence. As shown in Figure 3, the uniformity of the improved Tent chaotic mapping has been enhanced compared to the original version. This improvement in uniformity ensures a more even distribution of the initial population across the solution space.