This paper proposes an Improved Spider Wasp Optimizer (ISWO) to address inaccuracies in calculating the population (N) during iterations of the SWO algorithm. By innovating the population iteration formula and integrating the advantages of Differential Evolution and the Crayfish Optimization Algorithm, along with introducing an opposition-based learning strategy, ISWO accelerates convergence. The adaptive parameters trade-off probability (TR) and crossover probability (Cr) are dynamically updated to balance the exploration and exploitation phases. In each generation, ISWO optimizes individual positions using Lévy flights, DE’s mutation, and crossover operations, and COA’s adaptive update mechanisms. The OBL strategy is applied every 10 generations to enhance population diversity. As the iterations progress, the population size gradually decreases, ultimately yielding the optimal solution and recording the convergence process. The algorithm’s performance is tested using the 2017 test set, modeling a mountainous environment with a Gaussian function model. Under constraint conditions, the objective function is updated to establish a mathematical model for UAV flight. The minimal cost for obstacle-avoiding flight within the specified airspace is obtained using the fitness function, and the flight path is smoothed through cubic spline interpolation. Overall, ISWO generates high-quality, smooth paths with fewer iterations, overcoming premature convergence and the insufficient local search capabilities of traditional genetic algorithms, adapting to complex terrains, and providing an efficient and reliable solution.
Read full abstract