In modern warfare and civil applications, drone technology has become increasingly vital for tasks such as reconnaissance, strike missions, logistics delivery, and disaster monitoring. One of the core challenges in autonomous flight is trajectory planning—finding an optimal or feasible path from a start point to a destination while satisfying constraints like obstacle avoidance, fuel consumption, and radar threat avoidance. Many classical algorithms, such as A*, artificial potential field, and Dijkstra, work well in simple scenarios but struggle with high-dimensional, cluttered environments. Swarm intelligence algorithms, particularly ant colony optimization (ACO), offer strong adaptability for complex NP-hard problems. However, traditional ACO suffers from slow convergence, numerous turning points, and a tendency to fall into local optima. In this work, we propose an improved ant colony algorithm that addresses these limitations by fusing ideas from artificial potential fields, elite ant strategies, and A*-inspired heuristic functions. Our method significantly enhances convergence speed, path quality, and smoothness for drone technology trajectory planning. Extensive simulations in both simple and complex environments demonstrate the superiority of our approach over the conventional ACO.
Problem Formulation for UAV Trajectory Planning
We model the flight environment as a two‑dimensional grid. The drone must navigate from a designated start point to a target point while avoiding static obstacles and radar threat zones. The overall trajectory cost integrates three components: path length cost, radar threat cost, and turning cost. Each component is weighted according to mission priorities.
Path Length Cost
We assume the trajectory consists of N waypoints. The total path length cost FJ is given by
$$
F_J = c \sum_{g=1}^{N-1} L_{\text{path},g}
$$
$$
L_{\text{path},g} = \sqrt{(x_{g+1} – x_g)^2 + (y_{g+1} – y_g)^2}
$$
where c is the weight coefficient for path length, and \((x_g, y_g)\) is the coordinate of the g-th waypoint.
Radar Threat Cost
To evaluate the threat from ground‑based detection radars, we adopt a classical distance‑decay model. Each path segment is divided into five equal sub‑segments, and the threat is approximated by summing the detection probabilities at the five sampling points (as illustrated in the concept, but not referenced by figure). For a given radar r, the detection probability \(P_r(L)\) is defined as
$$
P_r(L) =
\begin{cases}
0, & L < R_{r,\min} \\
1, & L > R_{r,\max} \\
\frac{R_{r,\max}^4}{L^4}, & R_{r,\min} \le L \le R_{r,\max}
\end{cases}
$$
where \(L\) is the distance from the drone to the radar center, \(R_{r,\max}\) and \(R_{r,\min}\) are the maximum and reliable detection distances. The total radar threat cost over the whole trajectory is
$$
J_R = \sum_{r=1}^{R_n} \alpha_r \sum_{g=1}^{N} P_r(L_g)
$$
with \(R_n\) the number of radars, \(\alpha_r\) the threat coefficient of radar r, and \(L_g\) the distance between the midpoint of segment g and radar r.
Turning Cost
Sharp turns increase energy consumption and destabilize the drone. We define the turning cost at waypoint z as
$$
J(\theta_z) =
\begin{cases}
\varepsilon \frac{\theta_z}{\theta_{\max}}, & \theta_z \le \theta_{\max} \\
\varepsilon \frac{\theta_z}{\theta_{\max}} + \frac{\theta_z – \theta_{\max}}{2}, & \theta_z > \theta_{\max}
\end{cases}
$$
where \(\theta_z\) is the turning angle, \(\theta_{\max}\) is the maximum allowable turn, and \(\varepsilon\) is a weighting factor. The total turning cost is
$$
J_\theta = \sum_{z=1}^{N-1} J(\theta_z)
$$
Overall Objective Function
The composite cost function that we aim to minimize is
$$
f = \omega_1 F_J + \omega_2 J_R + \omega_3 J_\theta
$$
where \(\omega_1\), \(\omega_2\), \(\omega_3\) are positive weights that sum to 1, reflecting mission priorities.
Traditional Ant Colony Optimization (ACO)
The classical ACO simulates the foraging behavior of ants. Ants deposit pheromone on traversed paths, and subsequent ants probabilistically choose routes based on pheromone intensity and heuristic information. The probability that ant k moves from node i to node j is
$$
P_{ij}^k(t) =
\begin{cases}
\frac{[\tau_{ij}(t)]^\alpha [\eta_{ij}(t)]^\beta}{\sum_{j \in \text{allow}} [\tau_{ij}(t)]^\alpha [\eta_{ij}(t)]^\beta}, & j \in \text{allow} \\
0, & \text{otherwise}
\end{cases}
$$
where \(\tau_{ij}(t)\) is the pheromone concentration on edge \((i,j)\) at iteration t, \(\eta_{ij}(t)\) is the heuristic value (typically the reciprocal of distance), \(\alpha\) and \(\beta\) control the relative importance of pheromone and heuristic, and allow is the set of feasible neighboring nodes.
After each iteration, pheromone is updated globally:
$$
\tau_{ij}(t+1) = (1-\rho) \tau_{ij}(t) + \Delta\tau_{ij}
$$
$$
\Delta\tau_{ij} = \sum_{k=1}^{m} \Delta\tau_{ij}^k
$$
$$
\Delta\tau_{ij}^k =
\begin{cases}
Q / L_k, & \text{if ant } k \text{ traverses edge } (i,j) \\
0, & \text{otherwise}
\end{cases}
$$
Here, \(\rho\) is the pheromone evaporation rate (0 < \(\rho\) < 1), m is the number of ants, \(Q\) is a constant, and \(L_k\) is the total length of the path found by ant k.
Proposed Improved Ant Colony Algorithm
We introduce three major improvements to the standard ACO to accelerate convergence and enhance solution quality for drone technology trajectory planning.
Differentiated Initial Pheromone Distribution
In the basic ACO, all edges initially have the same pheromone level, causing ants to wander blindly in early iterations. We employ an artificial potential field to pre‑structure the pheromone. The target point exerts an attractive force, while obstacles and radar centers exert repulsive forces. The initial pheromone value at location q is set proportionally to the attractive potential:
$$
\tau_0(q) = U_{\text{att}}(q) = \frac{1}{2} \xi \cdot d(q, q_{\text{goal}})^2
$$
where \(\xi\) is the attraction gain and \(d(q, q_{\text{goal}})\) is the Euclidean distance from q to the goal. This initialization provides a global gradient that guides ants toward the target from the very beginning, reducing early‑stage randomness.
Elite Ant Colony Strategy
We divide the ant colony into two groups: elite ants and ordinary ants, in a ratio of 1:2. Ordinary ants move in an 8‑neighborhood (adjacent cells), while elite ants operate in a 24‑neighborhood (all cells within a 5×5 square excluding the center). This wider search horizon enables elite ants to discover shorter routes and bypass obstacles more effectively. Furthermore, elite ants use a more sensitive pheromone update mechanism. Their evaporation rate is not constant but follows an exponential distribution:
$$
\rho_e(x) = \frac{R}{\lambda} e^{-x / \lambda}
$$
where x is the iteration index, \(R\) is a scaling factor, and \(\lambda\) is the characteristic decay. To prevent extreme values, we clamp \(\rho_e(x)\) to the range [0.2, 0.6]. This adaptive evaporation allows elite ants to intensify exploration in early iterations and exploitation later.
Improved Heuristic Function
The heuristic function in the standard ACO uses only the inverse of the distance between two nodes. This myopic view often leads ants into dead ends. Inspired by the A* algorithm, we incorporate the distance from the candidate node to the goal:
$$
\eta_{ij} = \frac{1}{d_{ij}} + \frac{\lambda}{h(j)}
$$
where \(d_{ij}\) is the Euclidean distance from node i to node j, \(h(j)\) is the estimated distance from node j to the goal (e.g., straight‑line distance), and \(\lambda\) is a guiding parameter. This modification strengthens directional guidance, helping ants move consistently toward the target.
Summary of Algorithmic Modifications
Table 1 lists the key parameters used in our simulations.
| Parameter | Value |
|---|---|
| Start coordinates | (5,5) |
| Target coordinates | (45,45) |
| Radar center | (25,25) |
| Radar max detection range | 10 |
| Obstacle 1 center | (20,16) |
| Obstacle 2 center | (35,32) |
| Obstacle radius | 5 |
| Pheromone importance α | 1 |
| Heuristic importance β | 2 |
| Pheromone intensity Q | 1 |
| Number of ants m | 50 |
| Max iterations | 100 / 200 |
Simulation Results and Discussion
We performed extensive simulations on a 50×50 grid using Python. Two environments were tested: a simple environment (one radar, two obstacles) and a complex environment (multiple radars and obstacles). For each scenario, ten independent runs were executed, and the best result in terms of total cost was recorded.

The figure above conceptually illustrates a typical path generated by the improved algorithm (note: no figure numbers are referenced in the text). In the simple environment, the improved ACO produced a noticeably smoother path that avoids sharp turns while staying clear of threats. Table 2 summarizes the quantitative comparison.
| Algorithm | Best Iteration | Total Cost |
|---|---|---|
| Improved ACO | 51 | 58.66 |
| Traditional ACO | 61 | 67.25 |
The improved algorithm achieved a 12.7% reduction in total cost and reached the optimal solution 16.3% earlier than the classical method. This improvement stems from three factors: the initial pheromone gradient reduced early blind search; the elite ants with a larger neighborhood discovered more promising routes; and the A*-inspired heuristic accelerated convergence toward the target.
We then tested a challenging scenario with four threat zones and five obstacles. The environment size remained 50×50, and the maximum number of iterations was increased to 200. Table 3 presents the best results.
| Algorithm | Best Iteration | Total Cost |
|---|---|---|
| Improved ACO | 83 | 185.72 |
| Traditional ACO | 91 | 231.08 |
In this more demanding setting, the improved ACO delivered a 19.6% lower cost and required 8.8% fewer iterations to reach the optimum. The traditional ACO often got stuck in local minima early, producing jagged paths that pass dangerously close to threat centers. In contrast, the improved algorithm maintained a balanced exploration‑exploitation trade‑off, consistently generating safer and shorter trajectories.
The evolution of the best cost over iterations for the complex environment is summarized below (distances normalized for visualization):
During the first 20 iterations, the standard ACO struggled to find any feasible path due to lack of initial guidance. The improved algorithm, thanks to the pheromone gradient, already had a valid path within the first 10 iterations. As iterations progressed, the elite ants’ adaptive evaporation prevented premature convergence, allowing the colony to escape local optima and further refine the route.
We also evaluated the smoothness of the resulting trajectories. The improved algorithm reduced the average turning angle by approximately 23% compared to the classical ACO. This smoother flight path is particularly beneficial for fixed‑wing drone technology where sharp turns cause significant loss of altitude and energy.
Computational Complexity
Although the improved algorithm introduces additional operations (initial pheromone computation, elite ant handling, and adaptive evaporation), the overhead is negligible. The average runtime per iteration increased by less than 5% in our experiments. Given the substantial gains in convergence speed and solution quality, this trade‑off is entirely acceptable for real‑time or near‑real‑time drone technology applications.
Conclusion
We have presented an improved ant colony algorithm tailored for drone technology trajectory planning in complex environments. By fusing artificial potential field initialization, elite ant colonies with wider search neighborhoods, and an A*-style heuristic function, our method significantly enhances early‑stage exploration, accelerates convergence, and yields paths that are both shorter and smoother. Simulation results in two representative scenarios demonstrate cost reductions of 12.7% to 19.6% and faster attainment of optimal solutions.
Future work will extend this approach to three‑dimensional airspace, incorporate dynamic obstacles and moving threats, and explore multi‑drone cooperative planning. We also plan to integrate the algorithm with real‑time onboard sensors to enable adaptive re‑planning during flight, further advancing the autonomy and safety of drone technology.
The proposed framework can be readily applied to a variety of drone technology domains, including precision agriculture, infrastructure inspection, emergency response, and military operations. With the continuous growth of unmanned aerial systems, efficient and reliable trajectory planning remains a cornerstone of operational success.
