Preprint
Article

This version is not peer-reviewed.

A Modified Seagull Optimization Algorithm with Latin Hypercube Sampling and Levy Flight for 3D Path Planning of UAV

Submitted:

20 June 2026

Posted:

22 June 2026

You are already at the latest version

Abstract
The Seagull Optimization Algorithm (SOA) [1 ]has been successfully applied in various domains, including large-scale industrial engineering optimization, engineering design, UAV (Unmanned Aerial Vehicle) path planning, and wireless sensor network node localization, owing to its advantages such as few parameters and a clear structure. However, when applied to UAV path planning, the original SOA still exhibits several critical limitations: insufficient diversity of the initial population, the lack of a predictive mechanism to guide the search toward the optimal solution, and the tendency to suffer from premature convergence caused by being trapped in local optima during the optimization process. To address these issues, this paper proposes a modified Seagull Optimization Algorithm with Latin Hypercube Sampling and Levy Flight (LLSOA). First, the Latin Hypercube Sampling (LHS) method is adopted to enhance the generation of the initial population, thereby improving the coverage and diversity of the sample space. Second, a Levy Flight perturbation mechanism is introduced into the position updating process to enhance the algorithm’s ability to escape from local optima. To validate the effectiveness of the proposed algorithm, simulation experiments are conducted on UAV path planning in complex three-dimensional environments. The performance of the improved SOA is compared with that of the original SOA, the Dung Beetle Optimization algorithm (DBO) [2], the Grey Wolf Optimization algorithm (GWO) [3], the Pigeon-Inspired Optimization algorithm (PIO) [4], and the Particle Swarm Optimization algorithm (PSO) [5]. The results demonstrate that the proposed improved SOA achieves significant advantages in terms of path quality and computational efficiency. Furthermore, experiments with varying waypoint configurations in different scenarios confirm the strong generalization ability and stability of the proposed method under diverse mission conditions. Finally, potential future application scenarios of this method in the field of UAV path planning are discussed.
Keywords: 
;  ;  ;  ;  ;  

1. Introduction

When conducting flight operations in intricate environments characterized by dense urban structures, UAVs encounter multifaceted challenges including numerous obstacles, stringent public safety requirements, and the imperative to prevent collision incidents; Concurrently, given the extensive array of viable trajectories, it becomes essential to harmonize path optimization with energy efficiency considerations to ensure mission objectives are accomplished effectively. Consequently, the trajectory planning and optimization challenge for UAVs in complex environments fundamentally represents a multi-constraint comprehensive optimization problem. The primary methodologies for addressing these challenges encompass: traditional mathematical programming techniques, swarm intelligence approaches, machine learning frameworks, hybrid algorithms, and other methodologies.
Although conventional mathematical programming approaches can ensure precise solutions for typical path planning challenges, their efficacy diminishes when addressing more complex path planning scenarios, typically yielding only a single solution per execution [6]. A review indicates that although the weighted sum method is the most widely used approach in military UAV path planning, its oversimplified nature may lead to the loss of critical trade-off information [7].
Cluster intelligent algorithms stand as the most widely adopted and intensively studied approach, exhibiting remarkable aptitude for tackling complexity and resolving multi-objective conflicts in unmanned UAVs path planning scenarios. The advantage of swarm intelligence algorithms resides in their capacity to produce multiple viable solutions for selection within a single execution, alongside their aptitude for managing nonlinear and intricate discrete environments. The limitation is that they fall under the category of heuristic approaches, which cannot ensure the identification of global optimal solutions, and the configuration of parameters substantially affects the results.
The advantage of machine learning approaches is demonstrated through their remarkable adaptability, ability to operate effectively in highly dynamic and unpredictable environments, and superior real-time performance capabilities. However, these methods come with certain limitations, such as the necessity for substantial training datasets or extended interaction periods, alongside the inherent “black box” characteristic of many models, which often results in limited interpretability and challenges in comprehending the underlying decision-making mechanisms [8,9].
Hybrid algorithms can harness complementary strengths by integrating the benefits of diverse methodologies. For instance, algorithms with strong global search capabilities are employed to identify rough paths, followed by fine-tuning and obstacle avoidance through local optimization or learning approaches. The advantages of fusion algorithms lie in their powerful performance, ability to handle extremely complex real-world problems, and good robustness. However, the disadvantages include complex algorithm design, potentially high demand for computing power, and greater difficulty in parameter tuning [4].
In the practice of UAV path planning within urban environments, traditional mathematical programming approaches typically necessitate the construction of accurate mathematical models. While mathematical modeling possesses intrinsic advantages in terms of problem interpretability and result predictability, the quality of mathematical modeling is closely associated with the designer’s comprehension of the fundamental logic of the problem and professional capabilities. Accurate modeling frequently entails substantial complex data requirements and computational demands. Currently, mainstream solving methods tend to opt for machine learning approaches or fusion methods based on swarm intelligence algorithms. [10,11]
Metaheuristic algorithms are a category of general swarm intelligence algorithms formulated based on intuition or experience, aiming to obtain approximate optimal solutions for complex optimization problems within an acceptable computational cost. These algorithms achieve a balance between the two mechanisms of diversified search and collective exploration. Classical metaheuristic algorithms encompass genetic algorithms (GA) [12] and differential evolution (DE) [13]. Presently, the prevalent and relatively novel swarm intelligence algorithms include Particle Swarm Optimization algorithm (PSO), the Dung Beetle Optimization algorithm (DBO), the Grey Wolf Optimization algorithm (GWO), the Pigeon-Inspired Optimization algorithm (PIO), and the Seagull Optimization Algorithm (SOA). At present, the development of swarm intelligence algorithms is demonstrating a tendency of dynamism and prosperity. [14,15,16,17]The metaheuristic algorithms only require designing a corresponding fitness function for comprehensive evaluation, combined with an appropriate optimization solver, making it highly suitable for solving urban environmental UAV path planning problems. [18]
Compared with machine learning algorithms, metaheuristic algorithms demonstrate superior compatibility regarding hardware resource requirements and development thresholds. Machine learning models usually demand high-performance GPUs or multiple servers for extended simulation training. Metaheuristic algorithms impose minimal hardware requirements and demonstrate low computational time costs. A standard personal computer can typically generate satisfactory results within minutes to tens of minutes, making them particularly suitable for solving problems requiring flexible deployment strategies. However, this approach demands designers to possess an in-depth understanding of the underlying logic of specific challenges. In terms of programming development, the logical framework of metaheuristic algorithms remains relatively intuitive, with code implementation and debugging complexities significantly lower compared to machine learning methodologies. Moreover, it does not rely on pre-accumulated datasets or self-generated data pools for training, offering advantages in terms of code openness, computational efficiency, and interpretability of results.
Furthermore, human expert experience and intuitive insights can be incorporated into metaheuristic algorithms. Such knowledge, often characterized by ambiguity and difficulty in quantification, can be integrated into the optimization search process by adjusting the fitness function or operational logic of the metaheuristic algorithm.
The Seagull Optimization Algorithm (SOA) was proposed by Gaurav Dhiman and Vijay Kumar in 2018 and officially published in the journal Knowledge-Based Systems in 2019. It is a newly proposed swarm intelligence optimization algorithm in recent years. The Seagull Optimization Algorithm (SOA) is an intelligently designed metaheuristic optimization algorithm characterized by simplicity in implementation and exceptional global search capabilities, with validated application value across diverse domains. To address the multi-objective optimization challenges encountered by UAVs operating in complex urban environments with dense buildings, targeted enhancements must be implemented to the original SOA framework.

2. Analysis and Improvement of Seagull Optimization Algorithm

2.1. Analysis of Seagull Optimization Algorithm

Inspired by the migratory and predatory behaviors of seagulls in nature, the inventor of the Seagull Optimization Algorithm proposed a novel swarm - intelligence optimization algorithm. The fundamental idea of the Seagull Optimization Algorithm is to regard the solution space of the problem as a sea area and the objective function to be optimized as food in the sea. The initial population of the Seagull Optimization Algorithm (SOA) is regarded as seagull individuals randomly distributed in the three - dimensional space of the sea area. The algorithm achieves the solution of the objective function through two behaviors: migration and attack. Migration behavior refers to seagulls flying from a place that is currently unsuitable for survival to a place that is suitable for survival, corresponding to the global exploration ability of the algorithm. The algorithm introduces individual collision avoidance in the migration mode to expand the search range of the algorithm and improve the individuals’ ability to find the optimal position. Attack behavior simulates the attack process of seagulls on food in the area during flight, corresponding to the local exploitation ability of the algorithm, and its mathematical model can be represented as a spiral [19].
SOA demonstrates stable search performance with minimal application parameters while balancing high - dimensional and low - dimensional optimization. This makes it ideal for solving complex multi - constraint problems. After its introduction, numerous scholars have conducted in - depth research and refinements on SOA according to the practical application requirements in their respective fields of study.[14,20]

2.1.1. Migration Behavior

During the migration process, seagulls can achieve position transformation and optimization by continuously adjusting their flight angle and speed. The algorithm conducts a global search by simulating the migration behavior of seagulls. In this process, the following conditions must be met:
  • Avoid collisions [19]
When the positions of seagulls change during migration, the position differences between individuals should be maintained, which ensures that the diversity of the population can be preserved. To prevent collisions between migrating seagulls, the inertia weight factor A is utilized to update the positions of seagulls.
C s = A · P s ( t ) ,
Where C s is the position where the search individual P s does not collide with other individuals;
P s is the location information of the current search individual;
t is the t - th iteration;
The inertia weight factor A represents the search movement behavior of the search individual in a given hunting space.
A = f c ( t · f c / T )
Where, T is the maximum number of iterations;
f c is used to control the frequency of A, and the value is usually 2.
The value of parameter A decreases linearly with the increase of iteration times.
  • Move to the optimal position [19]
The seagulls move to the optimal position to simulate the individual optimization process. Under the control of parameter A, seagulls move to the global optimal position based on the constraint of avoiding collision. The formula is as follows:
M s = B · ( P b s ( t ) P s ( t ) )
Where M s is the location information of the search individual P s after moving towards the best neighbor P b s ;
B is a random value to balance the algorithm’s exploration and development capabilities. Its calculation method is as follows:
B = 2 · A 2 · r a n d
Where rand is a random number between [0,1].
  • Optimal location migration [19]
After avoiding individual collisions during the movement process, seagulls will migrate towards the globally optimal position. In the process of multiple iterations, the overall position of the population gradually approaches the optimal solution of the algorithm, which is a continuous optimization process. The expression is as follows:
D s = | C s + M s |
Where D s is the distance between the search individual and the best individual.

2.1.2. Attack Behavior

The attack behavior corresponds to the local development process. By simulating the attack behavior of seagulls during predation and leveraging the historical experience in the search process, the algorithm allows seagulls to adopt a spiral motion mode of continuously adjusting the angle and speed after approaching the target position to capture prey. The description of mapping the attack behavior trajectory to three - dimensional space is as follows:
X ' = r · cos ( k ) Y ' = r · sin ( k ) Z ' = r · k r = u · e k v
Where, r is the radius of the circling behavior of seagulls;
k is a random number between [0, 2π];
u and v are a pair of constants, which are used to describe the specific characterization of the circling behavior, and the values are both 1;
e is the base of natural logarithm. To sum up, the location update formula of the search individual is as follows:
P s ( t ) = ( D s × X ' × Y ' × Z ' ) + P b s ( t )
P s ( t ) Is the final position of seagull.

2.2. Limitations of Seagull Optimization Algorithm

2.2.1. Room for Improvement in Initial Population Generation

Generating the initial population is the first step of the seagull optimization algorithm. The quality of the initial population has a decisive impact on the convergence speed, solution accuracy, and the acquisition of the global optimal solution of the algorithm. The seagull optimization algorithm uses a completely random way to generate the initial population. Although such methods can ensure the complete operation of the algorithm, there are often the following potential problems [21]:
  • Lack of population diversity
The lack of population diversity is closely related to the impact of the initial population quality.
On the one hand, the distribution of the randomly generated population is often uneven. In some regions, the individuals are too dense, while in other regions, they are relatively sparse. This uneven distribution easily causes the algorithm to fall into the local optimal trap, thus missing the opportunity to explore other potential optimal solution regions. If the convergence ability of the subsequent optimization algorithm is too strong, it will further accelerate the convergence process and eventually lead to premature convergence of the algorithm. On the other hand, like most swarm intelligence algorithms, the performance of SOA largely depends on the quality of the initial population. If the randomly generated initial solution is unevenly distributed or of poor quality, it will directly affect the final optimization effect and convergence speed of the algorithm.
The two factors are superimposed on each other, which makes the irrationality of the initial population distribution and the convergence characteristics of the algorithm restrict the global search ability and the stability of the optimization results.
  • Lack of prediction of the optimal solution
The defect of “blind exploration” caused by simple randomness is particularly prominent in complex optimization problems. For example, in the three - dimensional path planning of UAVs, the prior knowledge such as terrain obstacle distribution, no - fly zone location, and target point orientation actually constitutes the implicit solution space constraints. If this information can be integrated into the population generation process in some form during the initialization stage, the search direction can be guided to converge in the high - quality area within the feasible region. However, the traditional random initialization method treats all solution space regions equally. It can neither distinguish high - potential regions from low - value regions nor dynamically adjust the sampling density according to the characteristics of the problem, resulting in a highly disordered exploration of the algorithm in the solution space. More importantly, when the dimension of the problem increases, the volume of the solution space expands exponentially, and the proportion of effective areas covered by random sampling decreases sharply. The “dimension disaster” effect further aggravates the sparsity of the distribution of the population on key decision variables, and the probability of the algorithm finding the global optimal solution decreases significantly. In addition, random initialization lacks an active control mechanism for the difference between individuals of the population. Multiple individuals may be highly similar or even repeated, resulting in redundant consumption of computing resources and weakening the ability of the population to promote global exploration through information sharing in the early stage of evolution. For specific types of problems, human experts can usually identify the “suboptimal solution” or approximate solution of relative optimization and optimize it on this basis, which can significantly improve the optimization efficiency. However, the population generation method that completely relies on random initialization completely ignores this part of information with guiding value, which may cause additional computational resource consumption and time waste.

2.2.2. Potential Enhancements in the Optimization Process

SOA realizes global search by simulating the migration process of seagulls and local optimization by simulating the predatory attack process of seagulls. At present, according to the default method proposed by the author, there are mainly the following problems:
It is difficult to balance the convergence speed and accuracy. In the migration process of SOA, individuals move in the direction of the optimal individual in the population, which is overly linear. Although this approach is direct, it will lead to the premature loss of population diversity. All the individuals converge to the same region, causing the remaining regions in the search space to be ignored in the early stage of the optimization process, resulting in insufficient global exploration. The linear parameter setting of the algorithm often fails to perfectly match the nonlinear optimization process of complex problems. This may lead to insufficient global exploration ability and the inability to quickly locate high - quality areas in the early stage of the algorithm. In the late stage of the algorithm, the local development ability is not refined enough, which affects the convergence accuracy and speed.
The solution accuracy is insufficient, and it is prone to falling into local optimization. In the attack behavior of SOA, the default motion trajectory of seagulls is spiral. Although such a path is conducive to local optimization, it lacks sufficient randomness during the process, preventing the algorithm from jumping out of the local optimal region and exploring other adjacent regions. Once all the individuals gather in a local optimal region, the algorithm will fall into a local optimal situation. When dealing with complex multimodal functions, such as those with multiple local optima or high - dimensional optimization problems, SOA is prone to the “premature” phenomenon, that is, it stops in a local optimal region before finding the global optimal solution, resulting in low accuracy. In complex problems, the optimal solution exists among all local extremum points. It is necessary to dynamically adjust the intensity of exploration and exploitation during the search process to find the optimal solution or a sub - optimal solution as close to the optimal one as possible. However, the original SOA algorithm does not incorporate a method for breaking out of the local optimum, making it difficult to escape the local extremum area and initiate the process of seeking a better solution.

2.3. Improvement of Seagull Optimization Algorithm

2.3.1. Improvement of Initial Population Generation

To solve the problem of insufficient population diversity, the Latin hypercube sampling (LHS) method is introduced to optimize the initial population generation process.
Latin hypercube sampling is an efficient multivariate uncertainty analysis technology, which is essentially the generalization of the Latin matrix in a multidimensional space. The core idea is to divide the interval of each variable into equal - probability sub - intervals that do not overlap, and ensure that each sub - interval is sampled only once. This hierarchical sampling method can ensure the uniform distribution across all dimensions, so as to achieve high coverage of the parameter space with a small sample size. Since the number of samples does not need to increase exponentially as the dimension increases, this method is especially suitable for high - dimensional simulation models. It can significantly reduce the sample demand, optimize computing resources, and greatly improve the simulation efficiency.
  • The idea of Latin Hypercube Sampling (LHS)
The LHS method is based on the “partition balance” strategy:
Interval segmentation: For each dimension of multi - dimensional variables, the value range is divided into m sub - intervals with equal probability and no overlap. Generally, a uniform distribution is adopted, meaning that the length of each interval is the same.
Stratified sampling: First, for each dimension, the variable interval is evenly divided into n sub - intervals of the same number, and each sub - interval has the same probability. Then, a point is randomly selected from each sub - interval of each dimension. Once the sampling is completed, the sub - interval is no longer used to avoid repetition. Finally, these points are combined to form the initial sample set.
Random combination: The points independently extracted from each dimension are randomly arranged and combined into a multi - dimensional vector to form a matrix of M multi - dimensional sample points, ensuring that the sampling points on any dimension evenly cover the entire interval.
Termination condition: The sampling process strictly follows the principle of “no replacement”, and each sub - interval contributes only one sample and then stops.
  • Mathematical description of Latin Hypercube Sampling
For d - dimensional space and N samples, when calculating the sampling points of each dimension j, the arrangement π j ( i ) is randomly generated. The sampling points of each dimension j are calculated as follows:
The randomly generated arrangement π j ( i ) represents the interval number of the i - th sample in dimension J.
The calculation formula of sampling points is as follow:
x i j = π j ( i ) u i j N
Where u i j is the random number of uniformly distributed U(0, 1). The formula ensures that the sample points fall within the specified sub - interval while preserving randomness.
  • Advantages and applications of Latin hypercube sampling
Compared with Monte Carlo sampling, LHS can reduce the sample size by 30 - 50% under the same accuracy, especially for high - dimensional problems [22], The advantages of using LHS to generate the initial population are as follows:
Reduce sample demand: LHS uses stratified sampling technology to evenly extract sample points in each dimension to ensure the uniformity of multidimensional spatial distribution. Compared with Monte Carlo random sampling, LHS can achieve similar or higher accuracy with a smaller sample size.
Uniform coverage: It avoids the “hole” phenomenon in the parameter space and improves the robustness of the model. The Monte Carlo method is prone to the problem of uneven sample distribution in high - dimensional space, resulting in a sharp increase in computational costs; LHS effectively improves the sampling efficiency of high - dimensional problems by independently extracting the sample points of each dimension.
At the same time, considering that most optimization algorithms lack the prediction of the obvious relative optimal solution, when initializing the population, it imitates human beings’ intuitive judgment on things and allows some individuals to directly incorporate the way point information instead of generating them completely randomly.

2.3.2. Improvement of Optimization Strategy

Levy distribution was proposed by Paul Levy, a French mathematician, in the 1920s. It refers to a random walk where the probability distribution of step size follows a heavy - tailed distribution, and there is a relatively high probability of large strides during the random walk process. The Levy Flight strategy can help jumping out of the local optimum and quickly finding the global optimum. It does this by simulating the long - distance migration behavior of animals in nature and guiding particles to search in a wider range. Compared with traditional distributions, the Levy distribution cannot have its variance defined, and it has no moments. This makes it fundamentally different from traditional distributions such as the normal distribution in terms of statistical characteristics.
It is mentioned in the document [1]: The proposed SOA starts with a random generated population. The search agents can update their positions with respect to best search agent during the iteration process. A is linearly decreased from f c to 0.
In the original SOA, the global search process simulated by migration is linear, and the local optimization process simulated by spiral attack also lacks randomness. Usually, this searching method is prone to falling into local optimum due to the lack of randomness. For the above reasons, Levy Flight was introduced in the search phase.
Levy Flight can solve these problems precisely because of its unique random walk characteristics of both short-range exploration and occasional long-distance jumping.
Levy Flight can solve these problems precisely because of its unique random walk characteristics, which involve both short - range exploration and occasional long - distance jumps. The Levy Flight strategy adopts a random walking strategy, which is mainly characterized by the staggered movement of short and long distances [23]. When the step size is larger, the search range is wider; when the step size is small, the local optimization ability is stronger. Its expression is as follows:
L e v y ( x ) = 0.01 × r 1 × σ | r 2 | 1 β
Where β is a constant:
When 0 < β < 1, the algorithm will generate more large jump steps, hpossessstrong global exploration ability, and may skip local optimal solutions;
When β ≈ 1.5, the algorithm has a relatively balanced mixture of long and short steps, making it perform well in most optimization problems;
When β approaches 2, the step size distribution of the algorithm approaches a Gaussian distribution, indicating strong local search ability, but it is prone to getting stuck in local optima.
r 1 and r 2 are random numbers from 0 to 1.
x is the dimension of the position vector.
σ is calculated as follows:
σ = ( x 1 ) ( 1 + β ) × s i n ( π β 2 ) 1 β ( x 1 ) ( ( 1 + β ) 2 ) × β × 2 ( β 1 ) / 2
After the Levy Flight strategy is introduced, the position update formula of the seagull is as follows:
P s * ( t ) = P s ( t ) + L e v y ( x ) P s ( t )
An experiment was designed to prove the difference between Levy Flight and linear random movement. Specifically, in two - dimensional space, with the same number of steps (m = 1000) and the same starting point (0,0), the Levy Flight and linear random algorithms were run respectively. Then, the distributions of the two algorithms were compared and observed, and the key indicators were also compared.
Figure 1. Examples of comparison between Levy Flight and linear random method to generate trajectory.
Figure 1. Examples of comparison between Levy Flight and linear random method to generate trajectory.
Preprints 219415 g001
Figure 2. Distribution and comparison of average step length and search radius of Levy Flight and linear random method. (100 steps).
Figure 2. Distribution and comparison of average step length and search radius of Levy Flight and linear random method. (100 steps).
Preprints 219415 g002
Figure 3. Distribution and comparison of average step length and search radius of Levy Flight and linear random method. (500 steps).
Figure 3. Distribution and comparison of average step length and search radius of Levy Flight and linear random method. (500 steps).
Preprints 219415 g003
Figure 4. Distribution and comparison of average step length and search radius of Levy Flight and linear random method. (1000 steps).
Figure 4. Distribution and comparison of average step length and search radius of Levy Flight and linear random method. (1000 steps).
Preprints 219415 g004
Table 1. Comparison of average step length and search radius of trajectory generated by Levy Flight and linear random method.
Table 1. Comparison of average step length and search radius of trajectory generated by Levy Flight and linear random method.
Steps Methods Average step length Search radius
100 Levy Flight 1.3788 ± 0.3522 172.0278 ± 306.9391
Linear Random 0.7969 ± 0.0189 29.8907 ± 15.5099
500 Levy Flight 1.3831 ± 0.3742 171.2379 ± 327.3488
Linear Random 0.7977 ± 0.0193 27.5139 ± 14.8903
100 Levy Flight 1.4121 ± 0.7411 204.5708 ± 719.1354
Linear Random 0.7976 ± 0.0191 28.0201 ± 14.7558
From the above experiments, it can be observed that, compared with the linear random method, the distribution of Levy Flight exhibits stronger jumping ability and a wider distribution area, which effectively expands the spatial search range. The Levy Flight method is significantly superior to the linear random method in terms of average step size and search radius. After sufficient tests and verifications, the average step length distribution and search radius distribution of the Levy Flight method show an obvious linear trend statistically, while the linear random method shows a more concentrated distribution. Introducing the Levy Flight method in the optimization phase of the SOA can not only increase the probability of the algorithm jumping out of the local optimal solution but also contribute to enhancing the overall optimization ability.

2.3.3. Pseudo Code of LLSOA

By combining the above LHS method and Levy Flight method to improve the original SOA, a SOA algorithm based on LHS and Levy modification (LLSOA) is obtained. The pseudo - code is as follows:
Table 2. The pseudo – code of LLSOA.
Table 2. The pseudo – code of LLSOA.
Algorithm: SOA algorithm based on LHS and Levy modification(LLSOA)
Input: N (pop size), MaxIter, dim, [lb,ub], fobj, opt
Output: GBestX, GBestF, curve
1: // Phase 1: Latin Hypercube Sampling Initialization
2: X ← zeros(N,dim)
3: for d = 1:dim, X(:,d) ← (randperm(N)’/N + rand(N,1)/N); end
4: for i = 1:N, [fit(i),unsafe(i)] ← fobj(X(i,:),opt); fit(i) ← fit(i)*(1+0.5*unsafe(i)); end
5: [~,idx] ← sort(fit); X ← X(idx,:); GBestF ← fit(idx(1)); GBestX ← X(1,:)
6: // Phase 2: Main Loop with Levy Flight Enhancement
7: for t = 1:MaxIter
8: // SOA migration & attacking
9: for i = 1:N
10:     A ← 2 - t*2/MaxIter; Cs ← X(i,:)*A; Ms ← 2*A^2*rand()*(X(1,:)-X(i,:))
11:     Ds ← abs(Cs+Ms); θ ← rand(); r ← exp(θ); P ← [r*cos(2πθ), r*sin(2πθ), r*θ]
12:     Xnew(i,:) ← Ds.*P + X(1,:)
13:     lr ← 0.3*(1-t/MaxIter); Xnew(i,:) ← (1-lr)*Xnew(i,:) + lr*GBestX
14:     if t<MaxIter/2, Xnew(i,:) ← Xnew(i,:) + 0.05*(1-t/MaxIter)*(rand(1,dim)-0.5); end
15:   end
16:   Xnew ← max(min(Xnew,ub),lb)
17:   // Evaluate new population
18:   for i = 1:N, [fit(i),unsafe(i)] ← fobj(Xnew(i,:),opt); fit(i) ← fit(i)*(1+0.5*unsafe(i)); end
19:   X ← Xnew
20:   // Update global best
21:   for i = 1:N
22:      if unsafe(i)<GBestUnsafe || (unsafe(i)==GBestUnsafe && fit(i)<GBestF)
23:          GBestF ← fit(i); GBestX ← X(i,:); GBestUnsafe ← unsafe(i)
24:   end
25:   // Levy Flight perturbation (enhanced global search)
26:   L ← levy(1,dim,1.5); scale ← [1.2,1.2,0.5]; scale ← repmat(scale,1,dim/3)
27:   cand ← GBestX + 0.1*L.*(ub-lb).*scale
28:   cand ← max(min(cand,ub),lb)
29:   [fit_c,unsafe_c] ← fobj(cand,opt); fit_c ← fit_c*(1+0.5*unsafe_c)
30:   if unsafe_c<GBestUnsafe || (unsafe_c==GBestUnsafe && fit_c<GBestF)
31:       GBestF ← fit_c; GBestX ← cand; GBestUnsafe ← unsafe_c
32:   end

3. Simulation Scenario and Fitness Function Design

3.1. Simulation Environment Scenario

The flight path planning experiment of UAV in the urban building environment is designed. The experimental area is set as a 100 × 100 units’ grid, and the buildings are distributed in the area with appropriate spacing. The starting point, waypoint, and target point are preset in the area. The UAV starts from the starting point according to the established sequence, passes through each waypoint in turn, and finally reaches the target point. Since this research focuses on the path planning algorithm of UAV, parametric modeling is carried out for the aerodynamic characteristics, handling and stability, body weight, and flight ability of the UAV. Examples of flight area maps are as follows:
Figure 5. Terrain schematic diagram of UAV path planning.
Figure 5. Terrain schematic diagram of UAV path planning.
Preprints 219415 g005

3.2. Constraints for UAV Flight

It is specified that the following conditions shall be followed when solving the flight trajectory of the UAV:
  • To ensure flight safety, a “safety global surface” centered at the UAV with a radius of 1 unit is set. The collision and boundary - crossing of the UAV are determined through the surface of the safety globe.
  • Collision with buildings must be avoided during UAV flight.
  • It is forbidden for the UAV to fly out of the map boundary and enter the internal space of the building.
  • The minimum flight altitude of the UAV shall not be less than 5 units.

3.3. Fitness Function Design

As the objective function of the optimization problem, the fitness function plays an important role in evaluating the quality of each solution. The fitness value directly reflects the proximity between the path and the optimal solution. The smaller the value, the better the path. When evaluating the flight trajectory of a UAV, we should not use a single index for a simple evaluation. Instead, we should comprehensively consider multi - dimensional factors and weigh them. Therefore, the fitness function should be weighted by multiple cost items, including path length cost, path curvature cost, comprehensive collision penalty, lateral offset reward, and vertical change penalty.
  • Path length cost
Path length is an important indicator to evaluate the quality of the route planned by the algorithm, which can effectively save the energy of the UAV and improve the mission efficiency. The calculation method of path length fitness is as follows:
F i t l = ω l · l t o t a l
l t o t a l = i = 1 m a x l i
Where F i t l is the fitness to evaluate the path cost; l t o t a l is the total path of planning completion; l i is the path length component between each sampling point; ω l is the path length weight.
  • Path curvature cost
When the UAV is flying, excessive-angle turns and unnecessary turns should be avoided. Large-angle turning may not meet the dynamic limits of the UAV. Too many turns may lead to an increase in unnecessary path length, energy consumption, and flight time. The path curvature cost is obtained by calculating the sum of the squares of the tangent angles between adjacent path segments. For each path point, it is used to evaluate the smoothness of the path. The fitness function of path curvature calculates the radian of the angle between the two direction vectors before and after, and accumulates the square of the angle. The calculation method of curvature cost is as follows:
C c u r = s e g = 1 n θ s e g 2
Where C c u r is the curvature cost equivalent;
n is the number of waypoints;
θ is the tangent angle.
The curvature fitness function is expressed as:
F i t c u r = ω c u r · C c u r
ω c u r is the curvature cost weight.
  • comprehensive collision punishment
The determination of collision and safety distance is an important aspect, including the determination of the UAV flying below the constrained altitude. This directly affects the feasibility of the route and is assigned a high weight. In the simulation environment, the safe distance of the UAV is defined as a “safety global surface” with a radius of 1 unit length. Collisions between the UAV and buildings, exceeding the safe flight altitude, and exceeding the map boundary are comprehensively incorporated into the comprehensive collision punishment.
Let the fitness function of the comprehensive collision penalty be F i t c r a s h , the radius of the safety globe be R s a v e , the distance from the UAV to the building surface or the minimum flight altitude plane be L D , and the penetration depth be L P when the UAV is below the building surface or the minimum flight altitude plane. The comprehensive collision penalty takes into account the relative relationship between the UAV and the building or the minimum allowable flight altitude plane, and the calculation method of the comprehensive collision fitness function is as follows:
The UAV safety globe is located outside the building or above a safe - height plane with sufficient distance: F i t c r a s h = 0 ;
The UAV safety globe is located outside the building or above the safe - height plane, but the distance is not enough: F i t c r a s h = ( L D R s a v e ) 2 ;
The UAV safety globe is located inside or under the safe altitude plane but not completely submerged in the building: F i t c r a s h = ( L P + R s a v e ) 2 ;
If the UAV is not inside the building or under the safe - height plane, additional punishment will be imposed: F i t c r a s h = ( L P + R s a v e ) 2 × 10 ;
If the UAV exceeds the map boundary, it will be severely punished: F i t c r a s h = 1000000 .
  • Obstacle avoidance logic design
In terms of the choice of obstacle avoidance logic, in the scenario discussed in this paper, buildings are regarded as the main obstacles, and the detour mode of the UAV can be divided into two types: ascending first and then descending, or lateral detour. The horizontal detour is preferred in the design for the following reasons:
From the perspective of flight safety: for taller buildings, it is necessary to climb higher to avoid obstacles, which may lead to a more complex wind - shear environment and potential safety hazards. At the same time, the excessive accumulation of gravitational potential energy will cause more serious damage in the event of a UAV crash in the urban environment. Therefore, in actual flight, it is more advisable to maintain a relatively low safe altitude and try to avoid ascending operations. The lower limit of UAV flight altitude is also specified in the simulation scene.
Comprehensive analysis from the perspective of energy consumption: for taller buildings, the energy consumption of the transverse detour path is usually lower than that of the way of ascending first and then descending. This is because during the ascent and descent of the UAV, in addition to the basic energy consumption required to maintain level flight, the energy consumption per unit time also needs to overcome the potential energy change caused by ascent and descent, so the energy consumption is often greater. If the area is dominated by low - rise buildings, the energy consumption difference between the two paths may be small. But for high - rise buildings, this energy consumption difference will be more significant.
Therefore, the design fitness function encourages the UAV to bypass obstacles through the horizontal direction rather than frequent ups and downs, and the design bypass fitness is F i t h o r i z o n t a l . At the same time, in order to suppress unnecessary vertical fluctuations and make the flight more stable. Added F i t v e r t i c a l penalty for vertical changes.

4. Experimental Verification

4.1. Experiment Environment

The experiment environment adopts the personal notebook computer Acer predictor PHN16-71, the detailed configuration includes:
  • CPU:13th Gen Intel(R) Core(TM) i9-13900HX 2.20 GHz
  • RAM:64.0 GB
  • GPU:Intel(R) UHD Graphics & NVIDIA GeForce RTX 4060 Laptop GPU
  • Disk Drive:NVMe Micron 3400
  • Software Simulation Environment:Unreal Engine 4.27.2, Airsim 1.81, Matlab 2024b

4.2. Simulation Experiments

4.2.1. Ablation Experiment

In order to rigorously verify the improvement effect of LHS and Levy Flight method on SOA, ablation research is essential. The original SOA, while demonstrating competent global search capabilities, suffers from two inherent limitations when applied to UAV path planning in complex environments. First, its random population initialization often results in uneven spatial coverage of initial solutions, potentially overlooking promising regions of the search space. Second, its step - size update mechanism during the optimization phase lacks adaptive perturbation capacity, making the algorithm susceptible to premature convergence in local optima when navigating obstacle - dense environments.
The LHS and Levy Flight strategies address these limitations from distinct yet potentially complementary perspectives. LHS enhances the diversity and uniformity of the initial population distribution, thereby improving the algorithm’s exploration foundation. Levy Flight introduces a heavy - tailed step - size distribution during optimization, enabling the search agent to occasionally perform long jumps that facilitate escape from local basins of attraction. However, the individual and interactive contributions of these two mechanisms to the overall algorithmic performance cannot be assumed a priori. Specifically, it remains unclear whether the performance gain originates primarily from the improved initialization, the enhanced search dynamics, or their synergistic coupling.
The ablation study systematically disentangles these effects by comparing four configurations: the complete algorithm SOA+LHS+Levy, two single-improvement variants SOA+LHS and SOA+Levy, and the baseline SOA. Quantitative evaluation across metrics—including Fitness value, calculation time, number of final unsafe points, times of obstacle avoidance and path length—enables attribution of performance variations to specific algorithmic components. This decomposition is essential for three reasons. First, it prevents overclaiming by identifying whether each proposed module indeed contributes non-negligible marginal benefits. Second, it reveals potential interaction effects, such as whether LHS-enhanced initialization amplifies the effectiveness of Levy-based search or, conversely, whether one improvement renders the other redundant. Third, it provides interpretable design principles for subsequent research, avoiding the “black-box” syndrome wherein algorithmic improvements are asserted without causal justification.
The results of ablation experiments are as follows:
  • Ablation experiment 1: 10 architectural drawings
In this experiment, 10 scenes of buildings were selected, including:
Starting point coordinates: (7, 25, 5).
Coordinates of waypoints: (33, 49, 10), (54, 39, 15), (55, 61, 20), (76, 81, 18).
End coordinates: (99, 83, 5).
The path planning and optimization effects of SOA, SOA+HLS, SOA+Levy, LLSOA were compared under the same conditions.
Figure 6. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (1).
Figure 6. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (1).
Preprints 219415 g006
Figure 7. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (1).
Figure 7. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (1).
Preprints 219415 g007
Table 3. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 10 building scenarios (1).
Table 3. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 10 building scenarios (1).
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
SOA 61.2601 94.71 0 0 152.95
SOA+LHS 275330287655.3500 94.20 12 3 142.63
SOA+LEVY 76.4871 94.37 0 0 152.77
SOA+LHS+LEVY 30.6776 90.46 0 0 153.92
  • Ablation experiment 2: 10 architectural drawings
In this experiment, 10 scenes of buildings were selected, including:
Starting point coordinates: (7, 25, 5).
Coordinates of waypoints: (33, 49, 10), (78, 30, 12), (56, 66, 14), (76, 81, 8).
End coordinates: (99, 83, 5).
The path planning and optimization effects of SOA, SOA+HLS, SOA+Levy, LLSOA were compared under the same conditions.
Table 4. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 10 building scenarios (2).
Table 4. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 10 building scenarios (2).
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
SOA 14023293552.2919 89.99 21 3 200.53
SOA+LHS 655275211490.5550 91.53 21 5 185.99
SOA+LEVY 101.1416 99.71 0 0 202.06
SOA+LHS+LEVY 39.8940 113.62 0 0 199.98
Figure 7. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (2).
Figure 7. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (2).
Preprints 219415 g008
Figure 8. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (2).
Figure 8. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 10 building scenarios (2).
Preprints 219415 g009
  • Ablation experiment 3: 12 architectural drawings
In this experiment, 12 scenes of buildings were selected, including:
Starting point coordinates: (1, 1, 5).
Coordinates of waypoints: (25, 34, 15), (40, 56, 20), (50, 40, 25), (83, 70, 14).
End coordinates: (100, 100, 10).
The path planning and optimization effects of SOA, SOA+HLS, SOA+Levy, LLSOA were compared under the same conditions.
Figure 9. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 12 building scenarios.
Figure 9. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 12 building scenarios.
Preprints 219415 g010
Figure 10. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 12 building scenarios.
Figure 10. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 12 building scenarios.
Preprints 219415 g011
Table 5. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 12 building scenarios.
Table 5. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 12 building scenarios.
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
SOA 30264054424.8301 110.04 9 1 179.26
SOA+LHS 62201876421.5537 140.45 7 1 174.37
SOA+LEVY 87.0198 110.56 0 0 174.15
SOA+LHS+LEVY 35.8866 112.20 0 0 179.79
  • Ablation experiment 4: 15 architectural drawings
In this experiment, 15 scenes of buildings were selected, including:
Starting point coordinates: (95, 5, 5).
Coordinates of waypoints: (79, 33, 8), (55, 47, 10), (32, 38, 10), (13, 75, 6).
End coordinates: (5, 93, 5).
The path planning and optimization effects of SOA, SOA+HLS, SOA+Levy, LLSOA were compared under the same conditions.
Table 6. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 15 building scenarios.
Table 6. Performance comparison of SOA, LHS-based SOA, Levy-based SOA, and LLSOA in planning results across 15 building scenarios.
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
SOA 5743118830.9908 135.66 16 2 180.09
SOA+LHS 230855717510.9580 146.3500 24 4 162.74
SOA+LEVY 83.6572 138.46 0 0 167.44
SOA+LHS+LEVY 33.3409 133.26 0 0 166.78
Figure 11. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 15 building scenarios.
Figure 11. Comparison of planning results for SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 15 building scenarios.
Preprints 219415 g012
Figure 12. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 15 building scenarios.
Figure 12. Comparison of fitness values for planning results of SOA, LHS-based SOA, Levy-based SOA, and LLSOA across 15 building scenarios.
Preprints 219415 g013

4.2.2. Comparative Experiment

To comprehensively evaluate the performance of the proposed LHS-Lévy enhanced Seagull Optimization Algorithm (LLSOA) for UAV path planning, a systematic comparative study is conducted against four representative swarm intelligence algorithms: Dung Beetle Optimizer (DBO), Grey Wolf Optimizer (GWO), Pigeon-Inspired Optimization (PIO), and Particle Swarm Optimization (PSO). DBO, as a recently proposed bio-inspired algorithm, exhibits competitive performance in global search through its unique dung ball rolling and dancing behaviors. GWO, leveraging a hierarchical social hierarchy and encircling mechanism, has demonstrated strong convergence properties in continuous search spaces. PIO, inspired by homing navigation behaviors, incorporates map-and-compass and landmark operators specifically designed for multi-modal optimization. PSO serves as a classical velocity-position update framework widely adopted in early UAV trajectory optimization studies. The selection of these benchmark algorithms is justified by their distinct optimization paradigms and proven effectiveness in path planning problems.
To ensure fairness, each algorithm adopts a unified environmental setting, constraint - processing mechanism, and fitness function definition. The UAV flight environment randomly selects 10, 12, and 15 high - rise buildings distributed across the map. Each scene is set with a starting point, a terminal point, and different waypoints. The UAV needs to start from the starting point, pass through all waypoints in sequence, and finally reach the terminal point. The design of constraints and fitness functions has been described above. The results of each algorithm after 200 iterations are compared.
The results of several comparative experiments are as follows:
  • Comparative experiment 1: 10 architectural drawings
In this experiment, 10 scenes of buildings were selected, including:
Starting point coordinates: (7, 25, 5).
Coordinates of waypoints: (33, 49, 10), (54, 39, 15), (55, 61, 20), (76, 81, 18).
End coordinates: (99, 83, 5).
The path planning and optimization effects of DBO, GWO, PIO, PSO and LLSOA were compared under the same conditions.
Table 7. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 10 building scenarios (1).
Table 7. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 10 building scenarios (1).
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
DBO 72.3092 93.73 0 0 144.82
GWO 72.1246 97.13 0 0 144.36
PIO 74.4112 96.82 0 0 148.98
PSO 72.4777 96.16 0 0 145.14
LLSOA 30.6776 90.46 0 0 153.92
  • Comparative experiment 2: 10 architectural drawings
In this experiment, 10 scenes of buildings were selected, including:
Starting point coordinates: (7, 25, 5).
Coordinates of waypoints: (33, 49, 10), (78, 30, 12), (56, 66, 14), (76, 81, 8).
End coordinates: (99, 83, 5).
The path planning and optimization effects of DBO, GWO, PIO, PSO and LLSOA were compared under the same conditions.
Figure 13. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (1).
Figure 13. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (1).
Preprints 219415 g014
Figure 14. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (1).
Figure 14. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (1).
Preprints 219415 g015
Figure 15. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (2).
Figure 15. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (2).
Preprints 219415 g016
Figure 16. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (2).
Figure 16. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 10 building scenarios (2).
Preprints 219415 g017
Table 8. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 10 building scenarios (2).
Table 8. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 10 building scenarios (2).
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
DBO 175126.12 90.35 12 0 194.88
GWO 4850918.77 89.66 12 0 192.68
PIO 20458254330.13 89.26 13 2 190.75
PSO 4845780.75 90.34 12 0 191.88
LLSOA 39.89 113.62 0 0 199.98
  • Comparative experiment 3: 12 architectural drawings
In this experiment, 12 scenes of buildings were selected, including:
Starting point coordinates: (1, 1, 5).
Coordinates of waypoints: (25, 34, 15), (40, 56, 20), (50, 40, 25), (83, 70, 14).
End coordinates: (100, 100, 10).
The path planning and optimization effects of DBO, GWO, PIO, PSO and LLSOA were compared under the same conditions.
Figure 17. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 12building scenarios.
Figure 17. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 12building scenarios.
Preprints 219415 g018
Figure 18. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 12 building scenarios.
Figure 18. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 12 building scenarios.
Preprints 219415 g019
Table 9. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 12 building scenarios.
Table 9. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 12 building scenarios.
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
DBO 439623855.95 113.89 5 1 177.04
GWO 20896306570.14 108.95 4 1 171.65
PIO 39076890211.26 108.17 3 1 175.67
PSO 20896306568.70 110.26 4 1 171.58
LLSOA 35.89 112.20 0 0 179.79
  • Comparative experiment 4: 15 architectural drawings
In this experiment, 15 scenes of buildings were selected, including:
Starting point coordinates: (95, 5, 5).
Coordinates of waypoints: (79, 33, 8), (55, 47, 10), (32, 38, 10), (13, 75, 6).
End coordinates: (5, 93, 5).
The path planning and optimization effects of DBO, GWO, PIO, PSO and LLSOA were compared under the same conditions.
Figure 19. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 15building scenarios.
Figure 19. Comparison of planning results for DBO, GWO, PIO, PSO, and LLSOA across 15building scenarios.
Preprints 219415 g020
Figure 20. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 15 building scenarios.
Figure 20. Comparison of fitness values for planning results of DBO, GWO, PIO, PSO, and LLSOA across 15 building scenarios.
Preprints 219415 g021
Table 10. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 15 building scenarios.
Table 10. Performance comparison of DBO, GWO, PIO, PSO, and LLSOA in planning results across 15 building scenarios.
Algorithm Fitness value
(200 steps)
Calculation time (s) Unsafe points verified Times of climbing obstacle avoidance Path length
DBO 93803.42 137.97 6 0 162.26
GWO 984938.04 136.99 6 0 163.25
PIO 96549281756.69 137.54 7 2 159.4
PSO 1442272.54 136.37 0 6 163.84
LLSOA 33.34 133.26 0 0 166.78

4.3. High-Fidelity Simulation Validation

LLSOA is an offline planning strategy. In this strategy, the algorithm pre - plans the flight path for the drone, and the drone then follows this path during flight. To verify the feasibility of this method, experiments typically need to be conducted in real urban environments to obtain conclusions with sufficient reliability. At present, our simulation utilized Unreal Engine to create a simulated physical environment consisting of 12 buildings, which was chosen for its highly recognized physics simulation capabilities within the industry.
Figure 21. Example of a established 3D simulation scenario.
Figure 21. Example of a established 3D simulation scenario.
Preprints 219415 g022
This study utilizes the built - in quadcopter drone simulation model of Airsim, enabling the drone to trace the pre - planned path of the LLSOA throughout the simulation scenarios. To verify the robustness of this method, different levels of noise were introduced during the simulation. Multiple sets of repeated experiments were conducted, and the experimental results under different conditions were compared and analyzed.
Figure 22. Example of an established 3D simulation scenario.
Figure 22. Example of an established 3D simulation scenario.
Preprints 219415 g023
This experiment directly utilizes the built - in drone model and flight control controller of Airsim. It simulates uncertain factors by adjusting the error level and sensor noise parameters in the controller settings. The comparison results of flight trajectories in a 3D high-fidelity simulation environment with those calculated by LLSOA are as follows:
Table 11. Comparison of high-fidelity 3D simulation trajectories with deviations from LLSOA generated trajectories.
Table 11. Comparison of high-fidelity 3D simulation trajectories with deviations from LLSOA generated trajectories.
Noise Parameters Settings Maximum Trajectory Deviation Average Trajectory Deviation Standard Deviation Root Mean Square Error
Basic
Experiment
GPS horizontal error:0
GPS vertical error:0
IMU acceleration noise:0
IMU gyroscope noise:0
8.3331 3.8099 2.4602 4.5345
Low noise level
Experiment
GPS horizontal error:0.3
GPS vertical error:0.3
IMU acceleration noise:0.12
IMU gyroscope noise:0.15
8.3081 3.858 2.4521 4.5706
High noise level
Experiment
GPS horizontal error:1.2
GPS vertical error:1.2
IMU acceleration noise:0.5
IMU gyroscope noise:0.6
8.5259 3.9159 2.5497 4.6722

5. Analysis and Conclusion

5.1. Analysis of Ablation Experiment

By comparing the results of ablation experiments in three urban building scenes of different complexity, it can be seen that:
The standalone application of the LHS method has shown negative effects on SOA optimization, leading to performance degradation of LHS-based SOA compared to the original SOA. Although LHS enhances population uniformity and diversity, its uniform distribution may introduce an excessive number of low-quality initial solutions. Without complementary Levy Flights, this directionless initial population structure paradoxically increases the computational burden during subsequent optimization processes. Therefore, the isolated use of LHS methods does not guarantee positive algorithmic improvements, and their effectiveness depends on proper integration with search strategies.
The standalone application of the Levy Flight method exhibits significant positive effects on SOA optimization. The performance of Levy-based fusion approaches exceeds that of the original SOA. The heavy-tail step size characteristic of Levy Flight effectively enhances the local escape ability and global exploration capacity of seagull individuals during the optimization process. Even without modifying the initial population distribution, merely optimizing the step size update mechanism can result in substantial performance improvements.
When combined, the LHS method and the Levy Flight method exhibit positive synergistic effects on SOA optimization. The macro - level uniform layout of LHS complements the micro - level strong perturbations of the Levy Flight. LHS provides more comprehensive initial search starting points, while the Levy Flight effectively utilizes these points for deep exploration and escape. This combination generates synergistic benefits. LHS serves a foreshadowing role—it does not directly deliver immediate advantages but creates favorable initial conditions for the Levy Flight. The performance enhancement of the Levy Flight demonstrates robustness, remaining effective regardless of LHS integration, whereas the contribution of LHS is conditional, only manifesting positive effects when paired with the Levy Flight. Therefore, the Levy Flight should be regarded as the core improvement module, while LHS functions as an auxiliary enhancement module.
Without conducting ablation experiments, misleading conclusions may arise when comparing only the complete algorithm with the original one. For instance, assuming that LLSOA outperforms the original SOA might lead to the erroneous conclusion that both LHS and Levy are effective. Ablation experiments eliminate black - box performance claims, reveal complex inter - module interactions, and demonstrate the necessity of such experimental approaches.

5.2. Analysis of Comparative Experiment

By comparing the experimental results of LLSOA with DBO, GWO, PIO, and PSO algorithms in three urban building scenarios of different complexity, the following conclusions are drawn:
Across all three complexity scenarios, LLSOA consistently outperformed all competing algorithms in fitness metrics, demonstrating superior performance. This result validates that the synergistic combination of LHS initialization and Levy Flight optimization effectively enhances the quality of path planning in complex obstacle environments. When comparing multiple algorithms, including hierarchical - based GWO, behavior - specialized DBO and PIO, as well as the velocity - position update framework PSO, LLSOA consistently achieved the lowest fitness values under identical conditions. The results indicate that LLSOA delivers the most comprehensive and optimal path planning outcomes among all methods.
In the practical application of UAV path planning, safety and obstacle avoidance feasibility are the most fundamental constraints. In this experiment, two key hard indexes, the number of unsafe points and the number of ascending obstacle avoidance maneuvers, are set to evaluate the basic feasibility of the algorithm.
Among the above two hard indexes, LLSOA reaches 0, making it one of the best algorithms. This result has the following important implications: the number of unsafe points being 0 indicates that all paths planned by LLSOA meet the hard requirements of collision - free and intrusion - free security boundaries, proving that it has the basic credibility for engineering deployment. The number of ascending obstacle avoidance maneuvers being 0 shows that the LLSOA algorithm gives priority to avoiding obstacles in the horizontal direction, avoids unnecessary vertical maneuvers, and is conducive to reducing energy consumption and improving flight stability.
These two indicators are the core constraints in the algorithm design in this paper. LLSOA perfectly meets these constraints in all test scenarios, which verifies the effectiveness of the constraint processing mechanism.
In contrast, although some comparison algorithms are outstanding in some subdivision indicators, such as solution time or path length, there are non - zero values in the number of unsafe points or the number of ascending obstacle - avoidance times, which means that their planned path may face the risk of collision or execute infeasible maneuver instructions during actual flight, which is unacceptable in real - world UAV operations.
LLSOA is not completely optimal in terms of solution time and path length, which reflects a reasonable trade - off between constraint satisfaction and efficiency optimization.
In terms of calculation time, the introduction of the LHS and Levy Flight method leads to an increase in algorithm complexity and additional computational overhead. This makes the running time longer than that of some algorithms with a lower computational burden in certain scenarios. However, the increase in calculation time does not fluctuate significantly. For most non - real - time tasks, such as off - line planning before flight, a moderate increase in calculation time is acceptable, especially when considering safety and quality.
In terms of path length, the path generated by LLSOA is feasible but not necessarily the shortest. This is because, in the fitness function design, the algorithm assigns a high weight to indicators such as safety and smoothness. It ensures zero collision and zero - rise maneuver as a hard constraint at the expense of a slightly longer path, which meets the actual engineering needs.

5.3. Analysis of the High-Fidelity Simulation Verification

Although this high-fidelity experiment employed Airsim’s default drone model and flight control system, our tests with varying levels of sensor noise demonstrated that flight trajectory deviations remained within acceptable limits. Even under high-noise conditions, tracking errors showed no significant amplification, and the overall trajectory maintained satisfactory accuracy without occurrences of aircraft loss of control, trajectory divergence, or collisions with structures. In conclusion, LLSOA exhibits robust performance and reliable tracking capabilities across diverse sensor noise intensities, establishing a solid foundation for its transition to real-world UAV applications.

5.4. Conclusion and Prospect

In summary, when comparing mainstream meta - heuristic algorithms for urban UAV path planning, the improved LLSOA based on SOA exhibits superior optimization performance and convergence characteristics, presenting comprehensive advantages. Although there is a trade - off between computation time and path length, its fundamental strengths in safety assurance and path feasibility make it a competitive solution for real - world UAV deployment scenarios. In practical applications, LLSOA proves particularly suitable for mission environments that prioritize safety and have strict path feasibility constraints, including urban low - altitude logistics, [24] infrastructure inspection, and search - and - rescue operations.
In practical applications of evolutionary algorithms, the design of fitness functions significantly impacts optimization outcomes. Well-designed fitness functions enable algorithms to achieve rapid and high-quality optimization, while poorly-designed ones may hinder the entire optimization process. In the future, the implementations of LLSOA will focus on developing customized fitness function designs tailored to specific problems, adjusting weight parameters according to different environments, and establishing reference weight sets to facilitate more efficient optimization.
In terms of application expansion, leveraging the algorithm’s characteristics, it can be extended to path optimization for stereo warehouse UAVs or freight robots. Additionally, it can be applied to optimize the trajectories of robotic arms in complex production environments. Regarding urban UAV path planning, this approach can also be extended to swarm - level path planning, or integrate with other artificial intelligence algorithms to explore new improvement methods. [25,26]

Author Contributions

Conceptualization, Fangqi.Zhang. and Yi.Hu.; methodology, Fangqi.Zhang.; software, Fangqi.Zhang.; validation, Fangqi.Zhang., Yi.Hu., and Yuanjing.Ma.; formal analysis, Fangqi.Zhang.; investigation, Fangqi.Zhang.; resources, Yuanjing.Ma. and Qiang.Wang.; data curation, Fangqi.Zhang. and Yuanjing.Ma.; writing—original draft preparation, Fangqi.Zhang.; writing—review and editing, Fangqi.Zhang.; visualization, Fangqi.Zhang.; supervision, Yi.Hu.; project administration, Yi.Hu.; funding acquisition, Yi.Hu. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by institutional funding from the AVIC Shenyang Aircraft Design and Research Institute.

Data Availability Statement

The original contributions presented in this study are included in the article and the supplementary materials. Further inquiries can be directed to the corresponding author.

Acknowledgments

During the preparation of this manuscript, the authors used the following generative AI tools: 1) DeepSeek and Baidu Translate were used for grammar checking, sentence refinement, and translation. These tools were used solely for superficial text editing, which does not require disclosure per MDPI policy. The authors have reviewed and edited all AI-assisted text and take full responsibility for the final manuscript. 2) DeepSeek was also used to assist in generating MATLAB code for data visualization and plotting. All AI-generated content and code has been reviewed and edited by the authors, who assume full responsibility for the publication.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Dhiman, G.; Kumar, V. Seagull Optimization Algorithm: Theory and Its Applications for Large-Scale Industrial Engineering Problems. Knowl.-Based Syst. 2019, *165*, 169–196. [Google Scholar] [CrossRef]
  2. Xue, J.; Shen, B. Dung Beetle Optimizer: A New Meta-Heuristic Algorithm for Global Optimization. J. Supercomput. 2023, *79*, 7305–7336. [Google Scholar] [CrossRef]
  3. Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey Wolf Optimizer. Adv. Eng. Softw. 2014, *69*, 46–61. [Google Scholar] [CrossRef]
  4. Duan, H.; Qiao, P. Pigeon-Inspired Optimization: A New Swarm Intelligence Optimizer for Air Robot Path Planning. Int. J. Intell. Comput. Cybern. 2014, *7*(1), 24–37. [Google Scholar] [CrossRef]
  5. Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the 1995 IEEE International Conference on Neural Networks (ICNN’95), Perth, WA, Australia, 27 November–1 December 1995; IEEE: Piscataway, NJ, USA, 1995; Volume 4, pp. 1942–1948. [Google Scholar] [CrossRef]
  6. Huang, G.; Hu, M.; Yang, X.; Wang, X.; Wang, Y.; Huang, F. A Review of Constrained Multi-Objective Evolutionary Algorithm-Based Unmanned Aerial Vehicle Mission Planning: Key Techniques and Challenges. Drones 2024, *8*(7), 316. [Google Scholar] [CrossRef]
  7. Quadt, T.; Lindelauf, R.; Voskuijl, M.; Monsuur, H.; Čule, B. Dealing with Multiple Optimization Objectives for UAV Path Planning in Hostile Environments: A Literature Review. Drones 2024, *8*(12), 769. [Google Scholar] [CrossRef]
  8. Li, J.; Li, J.; Zhang, J.; Meng, W. A Comprehensive Review of Path-Planning Algorithms for Multi-Drone Swarms. Drones 2026, *10*(1), 11. [Google Scholar] [CrossRef]
  9. Khaneghaei, M.; Asadi, D.; Ebrahimi, B.; Nahavandi, S. Intelligent hybrid optimization algorithms for multi-agent aerial robots path planning: review of the recent emerging trends and open research directions. Artif. Intell. Rev. 2026, *59*, 94. [Google Scholar] [CrossRef]
  10. Jones, M.R.; Djahel, S.; Welsh, K. Path-Planning for Unmanned Aerial Vehicles with Environment Complexity Considerations: A Survey. *ACM Comput. Surv.* 2023, *55*(13s), 1–37. [Google Scholar] [CrossRef]
  11. Yuan, W.; Shi, Y. UAV Path Planning Based on APF-Q-Learning. In *6GN for Future Wireless Networks*; Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering; Springer: Cham, Switzerland, 2023; Vol. 505, pp. 290–300. [Google Scholar] [CrossRef]
  12. Holland, J.H. Genetic algorithms and the optimal allocation of trials. SIAM J. Comput. 1973, *2*(2), 88–105. [Google Scholar] [CrossRef]
  13. Storn, R.; Price, K. Differential Evolution – A Simple and Efficient Heuristic for Global Optimization over Continuous Spaces. J. Glob. Optim. 1997, *11*(4), 341–359. [Google Scholar] [CrossRef]
  14. Zhou, Z.; Liu, H.; Dai, Y.; Qin, L. A Tent-Lévy-Based Seagull Optimization Algorithm for the Multi-UAV Collaborative Task Allocation Problem. *Appl. Sci.* 2024, 14(13), 5398. [Google Scholar] [CrossRef]
  15. Ziqi, H. UAV Path Planning Based on Bird Flock Migration. In *Proceedings of the 6th International Conference on Computing and Data Science (CONF-CDS 2024)*, 2024; pp. 17–30. [Google Scholar] [CrossRef]
  16. Liu, Y.; Gu, Z.L.; Li, C.; Wang, B.G.; Wu, H.N.; Liu, W.J. UAV Path Planning Algorithm Based on Improved RRT. In *Proceedings of the Third International Seminar on Artificial Intelligence, Networking, and Information Technology (AINIT 2022)*, 2023; SPIE. [Google Scholar] [CrossRef]
  17. Zhou, Z.; Yang, X.; Niu, B. An Improved DMSQPSO Algorithm For 3D UAV Path Planning. In *Proceedings of the 2023 8th International Conference on Intelligent Information Processing (ICIIP 2023)*; ACM: New York, NY, USA, 2023. [Google Scholar] [CrossRef]
  18. Wang, J.; Zhao, Z.; Qu, J.; Yin, Y. UAV Path Planning in Three-Dimensional Complex Environments. In *Lecture Notes in Electrical Engineering*; Springer: Singapore, 2024. [Google Scholar] [CrossRef]
  19. Dhiman, G.; Singh, K.K.; Soni, M.; Nagar, A.; Dehghani, M.; Slowik, A.; Kaur, A.; Sharma, A.; Houssein, E.H.; Cengiz, K. MOSOA: A New Multi-objective Seagull Optimization Algorithm. Expert Syst. Appl. 2021, *167*, 114150. [Google Scholar] [CrossRef]
  20. Huang, Q.; Xia, L.; Wang, H.; Zhang, B. An Improved Seagull Optimization Algorithm for Multi-Center Maintenance Task Allocation of UAV Swarm Under Resource Constraints. in *2025 IEEE 8th Information Technology and Mechatronics Engineering Conference (ITOEC)*, Chongqing, China, 2025. [Google Scholar]
  21. Yan, A.; Hu, K. Improved Strategy and Its Application to the Optimization of Seagull Optimization Algorithm. Inf. Control 2022, *51*(6), 688–698. [Google Scholar] [CrossRef]
  22. Lyu, T. Research on Demand Response Strategy of User-Side Typical Resources for Promoting Renewable Energy Consumption. Master’s Thesis, Zhejiang University, Hangzhou, China, 2023. [Google Scholar]
  23. Sun, C.; Wang, X.; Jiang, G. NSST Image Enhancement Based on Levy-SOA Adaptive Threshold Segmentation and Improved Guided Filtering. Control Eng. China 2024, *31*(7), 1297–1304. [Google Scholar] [CrossRef]
  24. Shen, Y.; Jin, L.; Hu, K.; Hu, X.; Xue, C. Research on Logistics UAV Path Planning. *Proceedings of SPIE*; SPIE, 2024. [Google Scholar] [CrossRef]
  25. Rahman, M.; Sarkar, N.I.; Lutui, R. A Survey on Multi-UAV Path Planning: Classification, Algorithms, Open Research Problems, and Future Directions. *Drones* 2025, 9(4), 263. [Google Scholar] [CrossRef]
  26. Lv, C.; Xu, B.; Shi, C. UAV Path Planning Based on Improved TD3 Algorithm. In *Proceedings of the 2023 5th International Conference on Internet of Things, Automation and Artificial Intelligence (IoTAAI 2023)*; ACM: New York, NY, USA, 2023; pp. 1–6. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated