Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 14, No. 1, 2025 73 Path Planning for Agricultural Robots Based on the Improved Dung Beetle Optimization Algorithm Tianjun Zhou 1, Zhesheng Hou 2 1 School of Information and Control Engineering, Jilin University of Chemical Technology, Guangzhou Guangdong, 132022, China 2 School of Mechanical and Electrical Engineering, Jilin University of Chemical Technology, Guangzhou Guangdong, 132022, China Abstract: Heuristic algorithms are a commonly used type of algorithm in the path planning of agricultural robots. However, during the iteration process, there may be situations where one gets stuck in a local optimal solution. To solve the above problems, this paper proposes a multi-strategy improved dung beetle optimization algorithm. A raster map environment model is established to plan the path of agricultural robots. In the dung beetle algorithm, Logistics chaotic mapping is first adopted to perform chaotic initialization on Zhongchun, making the population distribution more uniform in the search space and improving the search quality of the population. Secondly, the Levy flight strategy is introduced in the theft behavior to enhance the search ability and diversity of the algorithm and reduce the probability of getting stuck in the local optimal solution. A raster map model for simulating the field working environment was constructed using Matlab. Comparative experiments were conducted among the improved dung beetle algorithm, the original dung beetle algorithm, the sparrow optimization algorithm, and the goose flock optimization algorithm. The results show that the improved dung beetle algorithm has more outstanding performance in terms of path length, number of iterations, and stability. Keywords: Dung Beetle Optimization Algorithm; Path Planning; Agricultural Robot. 1. Introduction With the rapid development of technology, agricultural machinery is gradually moving towards intelligence and automation. [1]Agricultural robots are a flexible, efficient and low-cost product and an important research direction in artificial intelligence technology. As agricultural robots, achieving autonomous movement and reasonable path planning is one of their core and basic functions. Compared with pure mechanical human driving, they can not only save a lot of human and material resources, It is also possible to calculate more effective and reasonable driving routes through algorithms, and its significance is self-evident. It requires agriculture and its people to be able to plan an optimal path from the starting point to the end point in a complex environment. With the continuous deepening of research, various new types of intelligent optimization algorithms keep emerging. For example, the Grev Wolf Optimizer (GWO)[2], the Sparrow Search ALgorithm (SSA)[3], and the Particle Swarm Optimization Such as PSO[4], Osprey Optimization ALgorithm (OOA)[5], etc. However, swarm intelligence optimization algorithms are prone to problems such as poor global search performance and falling into local optimal solutions. Therefore, the improvement of algorithms has become an important research hotspot nowadays. 1.1. Environmental Map Modeling In the path planning of mobile robots, the first step is to model the map. Commonly used modeling methods include geometric graph method, topological map method and raster map method. In raster maps, the representation of feasible areas and obstacles is achieved through the distribution of 0 and 1 in an array. Among them, white areas represent passable areas, while black rasters represent situations where obstacles exist and passage is impossible. Therefore, this paper adopts raster maps for environmental map modeling. The grid map model is shown in Figure 1. The robot is not allowed to pass through the black obstacle area in the grid. The white grid indicates that it can be passed through. Set each grid to 1CM. Fig 1. Grid map 2. Dung Beetle Optimization Algorithm The Dung Beetle Optimizer (DBO) is an emerging swarm intelligence optimization technology, whose design inspiration comes from a series of survival behaviors of dung beetles (commonly known as dung beetles) in the natural environment[6]. This algorithm constructs a multi-role collaborative search framework by simulating the complex behaviors of dung beetle populations such as rolling balls, dancing, reproduction, foraging and stealing, aiming to efficiently solve global optimization problems, especially demonstrating strong optimization capabilities in complex scenarios such as path planning. 74 2.1. Rolling Dung Beetle Dung beetles have a unique ball-rolling behavior in nature. They can use celestial cues (such as sunlight or moonlight) for navigation, making their dung balls roll in a straight line. However, when in a completely dark environment, its movement path will become curved. This feature was inspired for the design of optimization algorithms. In the simulation of the navigation process of dung beetles. The corresponding position update model can be expressed as follows π‘₯ 𝑑 1 π‘₯ 𝑑 π‘Ž βˆ— π‘˜ βˆ— π‘₯ 𝑑 1 𝑏 βˆ—β–³ π‘₯, β–³ π‘₯ |π‘₯ 𝑑 𝑋 | (1) In this formula, k is a deflection coefficient, and b is a random parameter, a coefficient that simulates the influence of natural factors (such as wind force or uneven ground) on the direction.. The larger the value, the weaker the illumination, thereby encouraging the algorithm to conduct more extensive exploration. 2.2. Breeding Dung Beetles The reproductive behavior in the dung beetle optimization Algorithm (DBO) simulates the key biological habit of female dung beetles to safely hide their dung balls and lay eggs for reproduction. This behavior is abstracted as a dynamic boundary selection strategy and an egg ball position update mechanism, jointly responsible for the local fine search of the algorithm during the iterative process. The boundary area selection strategy for simulating dung beetle spawning is defined as follows: Lbβˆ— max Xβˆ— βˆ— 1 R , Lb (2) Ubβˆ— max Xβˆ— βˆ— 1 R , Ub (3) Here, Xβˆ— represents the position of the local optimal solution in the current iteration,Lbβˆ—, Ubβˆ—, They respectively represent the upper and lower bounds of the dynamic spawning region, which are used to define the local search space of this iteration. R is a convergence factor, and the calculation method isR=1-t/ 𝑇 , Here, t represents the current number of iterations,𝑇 is the maximum number of iterations, and the value of R linearly decreases to 0 as the number of iterations changes.Lb and Ub represent the fixed upper and lower bounds of the solution space of the entire optimization problem.After the egg-laying area is determined, the female dung beetle will lay eggs in this area. Assuming that each reproductive dung beetle produces only one egg ball in each iteration of the algorithm, the position update formula is as follows: 𝐡 𝑑 1 π‘‹βˆ— 𝑏 βˆ— 𝐡 𝑑 πΏπ‘βˆ— 𝑏 βˆ— 𝐡 𝑑 π‘ˆπ‘βˆ— (4) 2.3. Foraging Dung Beetles Foraging dung beetles simulate the natural behavior of adult dung beetles in search of food after emerging from underground. In the DBO algorithm, such individuals are called "little dung beetles", responsible for conducting local fine searches in the region near the global optimal solution to enhance the algorithm's development capability. Its design inspiration comes from the habit of dung beetles in nature to forage around high-quality food sources (such as dung balls). The boundary of the foraging area is defined as: Lb max X βˆ— 1 R , Lb (5) Ub max X βˆ— 1 R , Ub (6) Here, X represents the position of the current global optimal solution; Lb and Ub respectively represent the dynamic lower and upper bounds of the foraging area. Therefore, the position during foraging is updated to: 𝑦 𝑑 1 𝑦 𝑑 𝐢 𝑦 𝑑 𝐿𝑏 𝐢 𝑦 𝑑 π‘ˆπ‘ (7) 2.4. Steal Dung Beetles In the living habits of dung beetles, a small number of them play the role of "thieves", seizing the dung balls of other dung beetles to quickly obtain food. Although this kind of theft is competitive, from the perspective of population ecology, it promotes the redistribution of dung ball resources among different individuals, avoiding excessive concentration of resources. It helps the population maintain overall adaptability and vitality in a variable environment. The position update formula for stealing dung beetles is: 𝑧 𝑑 1 𝑍 𝑆 βˆ— 𝑔 βˆ— |𝑧 𝑑 π‘βˆ—| |𝑧 𝑑 𝑍 | (8) 2.5. Population Division of Dung Beetles Fig 2. Population distribution When applying the dung beetle optimization algorithm, it is necessary to divide different dung beetle populations in a certain proportion. Each part of the dung beetles searches according to different divisions of labor to achieve the application effect of the algorithm. xue et al[6]. proposed that when optimizing the dung beetle algorithm, the proportion of rolling ball dung beetles is 20%, egg ball dung beetles is 20%, foraging dung beetles are 25%, and stealing dung beetles are 35%. The proportions of each type are shown in Figure 2. 3. Improve the Optimization Algorithm for Dung Beetles 3.1. Population Logistics Chaos Initialization Traditional dung beetle optimization algorithms usually generate the initial population in a random way. This method is prone to cause uneven distribution of population individuals in the solution space, which in turn leads to a low level of population diversity. The insufficiency of diversity will cause the algorithm to tend to develop in local areas at the early stage of search, resulting in premature convergence and making it difficult to obtain high-quality global optimal solutions. To solve the above problems, Logistics chaotic mapping is introduced to replace the traditional random initialization method. Logistics mapping is a classic chaotic 75 system with a concise mathematical expression and rich dynamic behavior, making it highly suitable for generating initial populations. The formula for Logistics chaotic mapping is: x t 1 ΞΌ βˆ— x t βˆ— 1 x t (9) In the formula,x t represents the position information at the TTH iteration: x t 1 represents the position information at the t+1 th iteration, and ΞΌ is the control parameter. 3.2. Introduce the Levy Flight Strategy Levy walks randomly during flight, and the number of steps is determined by the step length. Compared with the Gaussian distribution, Levy does not decline rapidly over long distances. For Brownian motion, each size is usually small and the variance of the distribution is finite. Levy jumps have no characteristic length scale. Therefore, combining Levy flight with the DBO algorithm can effectively enhance the global search ability and diversity of the algorithm and prevent it from falling into a local optimal state. After introducing Levy Flight, the algorithm's position update formula for theft behavior is: π‘₯ 𝑑 1 π‘₯ 𝑆 βˆ— 𝑔 βˆ— |π‘₯ 𝑑 π‘₯βˆ—| |π‘₯ 𝑑 π‘₯ | βˆ— 𝑙𝑒𝑣𝑦 𝛽 (10) 3.3. Improved Location Update Strategy For the first p individuals of the producer, two strategies are adopted. With an 80% probability, exploration based on the worst individual and random perturbation is used, and with a 20% probability, exploration based on angles is adopted. If the angles are 0, 90, or 180, small perturbations are added; otherwise, the tangent function is introduced for update. Its formula is: π‘₯ 𝑝π‘₯ π‘Ž βˆ— π‘‘π‘Žπ‘› πœƒ βˆ— |𝑝π‘₯ π‘₯π‘₯ | (11) 4. Simulation Experiment Fig 3. Each optimization algorithm path Fig 4. Iterative curves of each optimization algorithm 76 To verify the effectiveness of the algorithm, an experimental raster map was built using Matlab simulation software. The number of population iterations was set to 100 generations, and the population size was 50. Different types of dung beetle populations were allocated according to the previous proportion, among which the number of rolling dung beetles was 10, the number of breeding dung beetles was 10, the number of foraging dung beetles was 13, and the number of stealing dung beetles was 17. Set the starting point coordinates to (1,1) and the ending point coordinates to (20,20). During the experiment, the improved dung beetle algorithm, the original dung beetle algorithm, the sparrow optimization algorithm and the goose swarm optimization algorithm were selected for comparative experiments. The optimal paths and iterative curves of the improved dung beetle algorithm, the original dung beetle algorithm, the sparrow optimization algorithm, and the goose swarm optimization algorithm are shown in the following Figure 3 and Figure 4. To reduce experimental errors, the data results of running the four algorithms independently for 20 times in the raster map show that the improved dung beetle optimization algorithm has modified performance in terms of average path length, average number of iterations, and optimization stability. Compared with the other three algorithms, the average path length has decreased by 11.49%, 9.45%, and 31.2% respectively. The average number of iterations decreased by 12.3%, 15.6% and 18.4% respectively. 5. Summary (1) The initial population adopts the chaotic mapping method, which makes the initial dung beetle population more evenly distributed in the search space and improves the search ability of the algorithm. The strategy of incorporating Levy flight into the theft behavior enhances the global search ability of the algorithm and adopts a more flexible processing approach for the location update strategy (2) A map model was designed in Matlab, and a comparative experiment was conducted among the four algorithms. The results showed that the improved dung beetle algorithm had better effects in terms of average path length, average number of iterations and stability, verifying the effect of the algorithm improvement. (3) The main argument is that the improved dung beetle algorithm takes the walking route of agricultural mobile robots as the optimization objective, simulates the agricultural working environment with a grid map, simplifies the robot as a particle, and the obstacles as black grids. Subsequently, it is considered to deploy the algorithm to physical robots for experimental verification to further improve the algorithm. References [1] Shi Zhigang, Mei Song, Shao Yifan, et al. Based on artificial potential field method of mobile robot path planning research status and prospect of [J]. Journal of Chinese agricultural mechanization, and 2021 (12): 182-188. [2] Mirjalili S, Mirjalili M S ,Lewis A .Grey Wolf Optimizer [J].Advances in Engineering Software,2014,6946-61.DOI: 10. 1016/j.advengsoft.2013.12.007. [3] XUE J K, SHEN B, A novel swarm intelligence optimization approach: sparrow search algorithm [J].Systems Science & Control Engineering.2020,8(1):22-34. [4] KNNEDY J, EBERHART R. Particle swarm optimization [C] //Proceedings of ICNN’95-International Conference on Neuml Networks.IEEE,1995:1942-1948. [5] Dehghani M ,Bektemyssova G ,Montazeri Z , et al.Lyrebird Optimization Algorithm: A New Bio-Inspired Metaheuristic Algorithm for Solving Optimization Problems[J]. Biomimetics, 2023,8(6):507-.. [6] Jiankai X, Bo S .Dung beetle optimizer: a new meta-heuristic algorithm for global optimization[J].The Journal of Supercomputing, 2022, 79(7):7305-7336.