1 Introduction

The technological advancements brought unpredictable capabilities to some vehicles and changed their usage purposes for the commercial and military operations. Unmanned aerial vehicles (UAVs) and their variants specialized for the battlefields and called the unmanned combat aerial vehicles (UCAVs) are in the group of the mentioned vehicles and solving challenging problems about them as important as designing, developing or maintaining of a UAV or UCAV system [1, 2]. The success of the task being performed by a UAV and flight safety are directly related to the path and it is obtained after deciphering an optimization problem that requires minimization of objectives about the enemy threats, fuel or battery consumption and turning maneuvers. In recent years, powerful techniques such as Rapid-Exploring Random Trees (RRT), Artificial Potential Field (APF), Probabilistic Road Map (PRM) and graph-based methods including A*, D* lite and Voronoi diagram have been tested successfully for the path planning problem [3, 4]. However, these techniques usually have some difficulties escaping from local minimum or minimums and suffer from a relatively high computational burden [5]. Also, some of them work on a map that should be prepared in detail for the accuracy of the path being discovered and tremendous spaces in the memory can be requested for storing the map.

The geometric description of the path planning problem in which an enemy threat corresponds to a circle with a known center coordinate and radius and a UAV or UCAV path is drawn by connecting points each fulfills a unique line equation reduces the requirement of detailed maps. Although the geometric description of the path planning problem brings some advantages, the points being connected are chosen from a continuous search space and using intelligent computation techniques, especially meta-heuristic algorithms, gets more critical for the path planning problem similar to other complex engineering and real world problems. However, most of the meta-heuristics struggle to handle the unique properties of the path planning problem and require strong modifications on their basic structures, hybridization with other meta-heuristics, multi-colony or multi-population based configurations and subtle control parameter adjustment. Developing new algorithms that are capable of planning flight efficient paths quickly by executing an appropriate heuristic inherently handling the various aspects of the path planning problem and usable with the meta-heuristics becomes crucial for a UAV or UCAV system. In this study,

  • A new greedy algorithm called the Back-and-Forth (BaF) was proposed for the solving geometrical path planning problem.

  • As guessed from the name given to the algorithm, the BaF employees a heuristic for calculating two predecessor paths that are consumed later with the purpose of obtaining more qualified candidates.

  • While the first predecessor path of the BaF is determined from the start point to the target point, the second predecessor path of the BaF is determined from the target point to the start point.

  • The BaF algorithm divides each of two predecessor paths by considering the most similar line segment between them and then applies a combination procedure to discover the candidates representing more better paths than the previously found predecessors.

The performance of the BaF algorithm was investigated over three different battlefield scenarios and their twelve test cases. Also, a set of comparison between the BaF and other meta-heuristic based path planners including artificial bee colony algorithm (ABC), Genetic algorithm (GA), Moth Flame Optimization (MFO), Salp Swarm algorithm (SSA), Pathfinder algorithm (PFA), Stain Bowerbird Optimizer (SBO), Sine-Cosine algorithm (SCA), Grey Wolf Optimizer (GWO), Artificial Ecosystem Optimizer (AEO) and four more variants of some of them was conducted. The comparative studies showed that the BaF algorithm with the exact stability is among the top three in the tested path planners. The relatively low computational cost, exact consistency and qualified paths of the BaF algorithm gave an idea about its integration into a meta-heuristic for enhancing the solving capabilities. In order to understand how the integration of the BaF into a meta-heuristic changes the qualities of the calculated solutions, the ABC algorithm was chosen and a hybrid path planner, BaF–ABC, was introduced. The paths planned by the BaF–ABC were compared with the paths of the BaF, ABC, and other thirteen algorithms and it was seen that the BaF–ABC performs better than all other techniques for 75 percent of the test cases. The rest of the paper is organized as follows: The literature about the usage of meta-heuristics for UAV or UCAV path planning is summarized in Sect. 2. Details of the geometric path planning problem, representation of a path and cost or quality score calculation schema are given in Sect. 3. The design approach and fundamental steps of the BaF algorithm are all presented in Sect. 4. Section 5 is devoted to the experimental studies about the BaF and BaF–ABC algorithms. Finally, in Sect. 6, some conclusion and future remarks about the BaF are stated.

2 Literature summary

The Ant Colony Optimization (ACO) algorithm was used by Duan et al. and combined with the satisficing decision that defines some criteria for accepting a solution meeting the minimum requirements when solving UCAV path planning problem [6]. Duan et al. also developed a UCAV path planner based on the Intelligent Water Drops (IWD) algorithm inspiring from the dynamics of river systems and interactions between the water drops [7]. In another study, Duan et al. utilized from the Differential Evolution (DE) algorithm to optimally adjust the pheromone trail of the ACO algorithm and a hybrid meta-heuristic called ACO-DE tried to calculate UCAV paths for a three-dimensional mesh environment [8]. A Particle Swarm Optimization (PSO) algorithm supported with the second order oscillation for balancing the global and local search was proposed by Ma and Lei and tested as a path planner [9]. The Artificial Fish School algorithm (AFSA) was experimented by Ma and Lei for planning UCAV paths and the obtained paths were compared with the paths of other PSO based methods [10].

Xu et al. [11] overcame the existing flaws on the ABC to do with the convergence speed and tendency of trapping local optimums by generating chaotic candidates around the best solution and showed the path planning capabilities of the chaotic ABC algorithm. Zhang et al. [12] improved their ABC algorithm referenced path planner by integrating a discrimination mechanism. Zhang et al. [13] also developed a PSO variant in which the acceleration coefficients and inertia weights are determined dynamically and a fitness scaling approach is executed for calculating the selection probabilities. Experimental studies showed that Fitness-Scaling Adaptive Chaotic PSO (FAC-PSO) performs better than a variant of GA, Simulated Annealing (SA), chaotic ABC and standard implementation of the PSO algorithm [13]. Li and Duan [14] redesigned the moving strategy of the Gravitational Search algorithm (GSA) by using the memory and social information concepts of the PSO and verified the effectiveness of GSA based path planner against PSO, GSA and two different GSA implementations. Fu [15] updated the velocities of the particles in PSO algorithm with a mathematical model referencing the formation of geese groups and introduced MGeesePSO for planning UCAV paths in a two-dimensional environment.

Modified Firefly algorithm (MFA) that is an improved version of the Firefly algorithm (FA) with a new information sharing procedure between the high quality solutions was presented by Wang et al. [16] and a set of comparative studies between the MFA and other meta-heuristic guided path planners such as ACO, DE, PSO, GA, stud GA (SGA), Population-based Incremental Learning (PBIL), Evolutionary Strategies (ES) and Biogeography-based Optimization (BBO) on solving UCAV path planning problem was conducted. Another study published by Wang et al. [17] was devoted to a hybrid three-dimensional path planner in which the DE and Cuckoo Search (CS) algorithms are combined. Wang et al. [18, 19] continued contributing to the literature by developing path planners one of them uses the Bat algorithm (BA) after modifying it with the mutation operation of the DE, while the latter one also employs BA in which the most suitable population members are chosen with the DE algorithm. The attractiveness of fireflies in FA was related to the number of iterations by Liu et al. [20] and Adaptive FA (AFA) was announced. Zhu and Duan [21] enhanced the path planning performance of the BBO in which the known search mechanism is completely altered with the chaos theory and predator–prey concept. Heidari and Abbaspour [22] investigated an improved Black Hole (BH) algorithm as a UCAV path planner and proved that the convergence is accelerated while the robustness of the BH algorithm is maintained. The idea lying behind the utilization from the advantageous equations of the PSO algorithm was exploited by Tang and Zhou [23] when the Glowworm Swarm Optimization (GSO) was changed. Detailed experiments showed that the PGSO where P represents the particle word finds more better paths especially for the test cases with the lower number of segmentation points [23].

A UAV flying at the fixed altitude was planned with the Teaching–Learning based Optimization (TLBO) in the study of Yu et al. [24] and the results of the TLBO were compared with the results of well-known meta-heuristics such as PSO, DE, ABC and GSO. Zhang and Duan [25] first carefully modeled the anti-air guns, enemy radars, missiles, terrain and non-flight zones in addition to the constraints about the turning angle, gliding or climbing slope, altitude and total length and then experimented a DE algorithm with \(\alpha \) level comparison based constraint-handling. Zhou et al. [26] hybridized the Wolf Colony Search (WCS) and Complex method and then planned UCAV paths for a battlefield with five enemy threats. Duan and Qiao [27] illustrated how the Pigeon-Inspired Optimizer (PIO) is applied to the path planning problem and verified the better convergence and solving characteristics of the PIO against the DE algorithm. Li et al. [28] considered the convergence information of a cycle in order to subtly adjust the exploitation and exploration dominant operations and local and global search capabilities with an approach named the Balance-Evolution Strategy (BES) for the ABC algorithm and showed the effectiveness of their ABC implementation on the path planning problem.

Zhang and Duan [29] contributed to the convergence properties of the PIO by adding the predator–prey concept and predator–prey PIO (PPPIO) as a three-dimensional path planner for dynamic environments was announced. Chen et al. [30] brought together the searching mechanism of the PSO and mutation operation of the GA for addressing some drawbacks of the Central Force Optimization (CFO) and used modified CFO (MCFO) with the purpose of planning a rotary wing vertical take-off and landing (VTOL) system. Comparative studies between the MCFO, CFO, PSO, GA, FA and Random Search (RS) method demonstrated the suitability of the MCFO for real dynamic model of a VTOL or similar rotary wing aerial vehicle [30]. Zhou et al. [31] redesigned the mutation operation in the Wind Drive Optimization (WDO) algorithm according to the quantum non-gate strategy while the population creation procedure of the same algorithm was managed by the quantum rotation gate strategy and quantum WDO (QWDO) was proposed. QWDO algorithm was simulated for planning paths of a UCAV being operated in two-dimensional battlefield environment and detailed comparisons between QWDO, WDO, PSO, DE, BA and some quantum based implementations such QPSO and QBA were carried out [31].

Zhang et al. [32] studied on the GWO and different simulations were conducted for analyzing how the GWO is successful on finding UCAV paths. Liu et al. [33] focused on the defects of the PSO algorithm about the slow convergence and trapping local optimums and developed adaptive sensitivity decision operator that locates the high potential particles while the other ones are deleted. The new PSO algorithm was tested and compared with the standard PSO, GA and FA for various three-dimensional environments [33]. Another study completed by Liu et al. [34] also utilized from the PSO as a main path optimizer supported with the Spatial Refined Voting Mechanism that is responsible for addressing the drawbacks about the convergence and local minimums and Spatial-Temporal Collision Avoidance that manages the possible collisions. Luo et al. [35] first replaced the existing solution representation schema of BA with the quantum encoding and updated the candidate generation method with the quantum rotation gate and quantum not gate for their path planner. Collection Decision Optimization algorithm (CDOA) was chosen by Zhang et al. [36] as a path planner and two battlefields one of which contains five enemy threats and the second one contains six enemy threats were utilized in the experiments.

Alihodzic et al. [37] investigated the path planning capabilities of the Elephant Herd Optimization (EHO) algorithm over a battlefield with five enemy threats by changing the termination criteria. Alihodzic et al. [38] also experimented a Fireworks algorithm (FW) in which the number of sparks and exploitation amplitude are determined according to the quality of the solution when solving path planning problem. The powerful sides of the Simplex method were consumed by Miao et al. [39] for supporting the Symbiotic Organisms Search (SOS) algorithm and a new path planner was introduced. From the results of the experimental studies on both random and fixed threat areas, it was decided that the new algorithm or SMSOS is more talented solver than ABC, BA, CS, GWO and Flower Pollination algorithm (FPA) in terms of the convergence speed and qualities of the final solutions [39]. Dolicanin et al. [40] applied the Brain Storm Optimization (BSO) algorithm for solving UCAV path planning problem and concluded that the paths of BSO are more eligible than the paths of ACO, PSO, DE, GA, SGA, ES, FA, BA and two variants of FA and BA known as MFA and BAM especially for the cases containing less than 30 segmentation points.

Pan et al. [41] specialized the CS algorithm by adding a mechanism for assigning adaptive values to the fraction probability, scaling factor and Circle-type Chaotic Map for the random number sequences and illustrated how the discovered paths are improved with the modifications. Pan et al. [42] also changed the encircling procedures of the Whale Optimization algorithm (WOA) and tested WOA version on solving path planning problem. Another valuable study completed by Pan et al. [43] was devoted to developing a path planner known as the CIJADE that brings strong sides of two DE based techniques together. Lin et al. [44] altered the position update model of BA by referencing the APF. Moreover, they added an extra mechanism to adaptive configuration of the inertia weight and integrated chaos strategy in order to avoid local minimums when designing a UAV planner [44]. A creative path planner in which each individual of GWO is assumed as an agent of Q-learning and four states including exploration, exploitation, geometric adjustment and optimal adjustment are defined was presented by Qu et al. [45] and a UAV being operated in a three-dimensional environment was planned. The powerful structure of the GWO gave inspiration to Qu et al. [46] for a new path planner combining GWO and SOS and then HSGWO-MSOS was introduced. The results of the experimental studies proved that HSGWO-MSOS outperforms GWO, SOS and SA based approaches [46].

Yi et al. [47] abandoned a group of solutions whose qualities are less than the remaining part of the solutions and produced them after executing quantum operations for a Monarchy Butterfly Optimization (MBO) originated path planner. Wu et al. [48] considered the physical limitations of a UAV system with the purpose of initializing food sources of the ABC algorithm. Chen et al. [49] enhanced the population diversity of the FPA with a novel neighborhood schema and a UAV path planner namely neighborhood global learning based FPA for short NGFPA was offered. Visual comparison between the NGFPA, A*, APF and RRT demonstrated how NGFPA plans smoother paths than other classic methods [49]. Zhu et al. [50] checked the path planning capabilities of the meta-heuristics such as PSO, DE, FA, ABC, BA, CS, GWO, WOA, an implementation of MBO called GSMBO, Harmony Search (HS) and Spider Monkey Optimization (SMO) and it was concluded that SMO is better planner than all of the tested algorithms. Zhu et al. [51] tried to further improve the SMO as a path planner by integrating the Cooperative Co-evolution that is an approach dividing the whole problem into subproblems and solving them independently with the certain methods before the combination. Zhou et al. [52] specifically modeled the anti-aircraft guns, missiles and terrain composed of several mountains and executed improved BA as a three-dimensional UAV path planner. Zaslavskii chaos map was used by Wu et al. [53] in order to support their PSO algorithm referenced path planner. Xu et al. [54] alleviated the premature convergence problem of GSA with the Cauchy mutation strategy. Also, they developed an adaptive adjustment mechanism for gravitational constant attenuation factor and tried to balance the exploitation and exploration dominant operations for handing the difficulties of the path planning [54].

Jiang et al. [55] specialized almost all stages of the GWO for designing a path planner. They first described an efficient communication mechanism and utilized from the \(\epsilon \)-level comparison with the purpose of handing constraints [55]. Moreover, they tried to address collision avoidance by using the Partially Observable Decision Process and Monte Carlo tree search algorithm [55]. Jarray et al. [56] parallelized the GWO in a manner that the master node distributes jobs to the existing computing units or slave nodes and Cooperative Co-evolution was integrated into the workflow of the parallel GWO for solving large-scale and complex path planning problems. Chimp Optimization algorithm (ChOA) was strengthened with the jumping behavior of the Monkey algorithm by Du et al. [57] and improved ChOA (IChOA) was presented. Some tests carried out for three-dimensional environments allowed to state that IChOA is more robust path planner compared to the ChOA, ACO, PSO and GWO [57]. Wang et al. [58] powered the Mayfly algorithm (MA) by changing some critical stages with the exponent decreasing inertia weight strategy, enhanced crossover and adaptive Cauchy mutation operations and proved that the modified MA is capable of planning more safe and length efficient paths than MA, PSO, GWO and Butterfly Optimization algorithm (BOA). Niu et al. [59] referenced AEO algorithm and a strong path planner known as the Adaptive Neighborhood-based Search Enhanced AEO (NSEAEO) was proposed. In NSEAEO, the consumption phase of AEO constructs an adaptive neighborhood for consumers. Moreover, they retyped the composition stage of the same algorithm for maintaining the diversity of the subgroups of the population. Finally, a quadratic interpolation operator was embedded into the searching mechanism of the AEO [59]. A series of benchmarks over two and three-dimensional battlefield scenarios demonstrated the superiority of NSEAEO against AEO, GWO, two variants of PSO called GAPSO and CIPSO, a versatile implementation of TLBO known as ECTLBO, GA, HSGWO-MSOS, MFO, PFA, SSA, SCA and SBO [59]. The path planning potential of AEO was further investigated by Niu et al. [60] in a different study. The new AEO variant, modified AEO for short MAEO, was tested over five three-dimensional battlefield scenarios and comparisons between AEO, PSO, GA, GWO, WOA, HSGWO-MSOS, IChOA and an adaptive version of GWO were given [60].

A flight path for a UAV or UCAV system is obtained after connecting a set of waypoints determined by a meta-heuristic algorithm. However, some waypoints in the set can be superfluous and removing them can help the considered meta-heuristic for finding more convenient waypoints and a path implicitly. Jia et al. [61] reduced the number of waypoints being determined with a model known as the Double-Layer Coding (DLC) and applied their PSO based path planner for understanding the effect of the DLC. The Search and Rescue (SAR) optimization algorithm was selected by Zhang et al. [62] and then its convergence performance and some problems about the population diversity were tried to be fixed with a heuristic crossover strategy. Furthermore, Zhang et al. [62] added a real-time path adjuster and cubic B-spline interpolation to smooth the generated path. Chaotic Aquila Optimization Simulated Annealing (CAOSA) was path a path planner proposed by Ait-Saadi et al. [63] after taking the advantages about the SA and Singer chaotic map for supporting the Aquila Optimization (AO) algorithm. Yu et al. [64] significantly changed the routines of the beta and delta wolves of the GWO in a manner that they search around the alpha wolf and the routines of the omega wolves in a manner that they search around the top three solutions of the colony. On the other hand, Yu et al. [64] hybridized the special GWO with the DE algorithm and Hybrid GWO with DE (HGWODE) was served and tested successfully for planning paths in three-dimensional environments. Reverse GSO (RGSO) that is a recent variant of GSO was introduced by Chowdhury and Du [65] and they experimented RGSO by using three-dimensional environments with dynamic and static obstacles. Chen et al. [66] discovered that the spherical coordinate system is more appropriate than the Cartesian coordinate system for handling some constraints about the velocity and maneuver angles of a UAV and tested their BA referenced path planner by using four battlefield scenarios. The simplification effect of using a more appropriate coordinate system rather than the Cartesian coordinate system was taken into account by Huang et al. [67] and Adaptive Cylinder Vector PSO with DE (ACVDEPSO) was introduced. Hue et al. renewed the Honey Badger algorithm (HBA) for planning UAV paths in environments with circular or irregular shaped obstacles [67].

3 Background of the geometrical path planning problem

The flight path for a UAV or UCAV can be calculated or planned by guiding the details of the battlefield model. In one of the commonly used battlefield models that can be also named geometrical model, an enemy threat is represented with a circle for which the center coordinate and radius are known and some lines and points from lines are used [59]. Given that \(p_{s}=(x_{s},y_{s})\) is the start point and \(p_{t}=(x_{t},y_{t})\) is the target point and then a reference line between \(p_{s}\) and \(p_{t}\) is drawn. The first step that will be taken is determining D different segmentation points dividing the reference line equally into \(D+1\) subsegments. When the division of the reference line equally into \(D+1\) subsegments is completed, a set of lines or \(L=\{L_{1},L_{2},\ldots ,L_{D-1},L_{D}\}\) is tried to be generated. Each line in the set L is vertical to the reference line and intersects with only corresponding segmentation point. The set L has a critical mission for describing a flight path. If the lines of set L are used in a manner that point \(p_{1}\) on line \(L_{1}\), point \(p_{2}\) on line \(L_{2}\) and so on are chosen and combined with the \(p_{s}\) and \(p_{t}\) appropriately, a set of points or \(P=\{p_{s},p_{1},p_{2},\ldots ,p_{D-1},p_{D},p_{t}\}\) is obtained. When the line segments are drawn between the consecutive points such as \(p_{s}\) and \(p_{1}\), \(p_{1}\) and \(p_{2}\) or \(p_{2}\) and \(p_{3}\), a path for the UAV or UCAV system is described [59].

The generation of the set L and the set P requires intense calculations and a solid mathematical background. Each line and matched equation must satisfy the vertical intersection relationship with the reference line by passing through only the corresponding segmentation point. Also, the points of the set P are met the line equations. However, all of the calculations about the lines and points can be simplified by applying a coordinate system transformation that utilizes from the reference line of the original coordinate system as the horizontal axis of the new coordinate system [59]. When the coordinate system transformation is completed, the point \(p_{k}\) for the original coordinate system is represented with the point \({\dot{p}}_{k}\) found by executing Eq. (1) for the new coordinate system [59]. In Eq. (1), \(x_{k}\) and \(y_{k}\) are the x-axis and y-axis values of the point \(p_{k}\). Similarly, \({\dot{x}}_{k}\) and \({\dot{y}}_{k}\) represent the \({\dot{x}}\)-axis and \({\dot{y}}\)-axis values of the point \({\dot{p}}_{k}\). Finally, it should be noted that \(\theta \) is the angle between x-axis and reference line and found as the result of \(arctan((y_{t}-y_{s})/(x_{t}-x_{s}))\) operation.

$$\begin{aligned} \begin{bmatrix} {\dot{x}}_{k}\\ {\dot{y}}_{k} \end{bmatrix} = \begin{bmatrix} cos(\theta ) &{} sin(\theta ) \\ -sin(\theta ) &{} cos(\theta ) \end{bmatrix} \times \begin{bmatrix} x_{k} - x_{s}\\ y_{k} - y_{s} \end{bmatrix} \end{aligned}$$
(1)

The positive contribution of the applied coordinate system transformation can be seen first for finding the horizontal axis values of the segmentation points on the reference line. Because of the reference line is divided equally into \(D+1\) segments with D segmentation points, \({\dot{x}}\)-axis value of the transformed counterpart of the ith segmentation point becomes equal to \(i |p_{s}p_{t} |/(D+1)\) in which i is matched with the index of considered segmentation point. Moreover, it should be memorized that the lines in the set L vertically intersect with the reference line and intersection points are also the segmentation points. By considering the special relationship between the segmentation and intersection points, \({\dot{x}}\)-axis value of a point on \({\dot{L}}_{i}\) where \({\dot{L}}_{i}\) is the ith line in the set \({\dot{L}}\) and \({\dot{L}}\) is the counterpart of set L for the new coordinate system is found as \(i |p_{s}p_{t} |/(D+1)\) and only \({\dot{y}}\)-axis values of the points are determined for defining a path [59]. In Fig. (1), a hypothetical battlefield with five enemy threats and the effect of coordinate system transformation can be viewed.

Fig. 1
figure 1

Original coordinate system (a), its transformation (b), generated paths (c) and their counterparts for the original coordinate system (d)

The comparison between the path candidates and selection of the more eligible ones can be made after assigning a quality score or cost to each path in terms of enemy threats, fuel or battery consumption and turning maneuvers by accepting the altitude is fixed. For determining the quality of a discovered path, Eq. (2) given below can be guided [59]. In Eq. (2), the costs related to the fuel consumption, enemy threats and turning maneuvers are matched with the \(C_{f}\), \(C_{t}\) and \(C_{s}\) terms. Moreover, they are weighted with the \(\lambda _{f}\), \(\lambda _{t}\) and \(\lambda _{s}\) coefficients and the sum of these coefficients must be equal to 1 [59]. If a path has a lower cost in total compared to the cost of other candidate, it represent a more better solution for the path planning problem.

$$\begin{aligned} C = \lambda _{f} C_{f} + \lambda _{t} C_{t} + \lambda _{s} C_{s} = \lambda _{f} \int _{0}^{\ell }w_{f}d\ell + \lambda _{t} \int _{0}^{\ell }w_{t}d\ell + \lambda _{s}\sum _{j=1}^{D}{\varnothing _{j}} \end{aligned}$$
(2)

The cost of fuel or battery consumption is calculated by integrating the \(w_{f}\) term from 0 to the length of path also abbreviated as \(\ell \) and an approximation with the acceptable accuracy can be used for yielding the result of integration. If the \(w_{f}\) term is replaced with a constant such as 1, the result of integration is found equal to \(\ell \) and increases or decreases according to the length of path similar to a real flight [59]. The integral calculation to do with the \(C_{t}\) can also be carried out by using a more detailed approximation in which the line segments between each adjacent points of the set P are controlled [59]. In order to explain how the approximation model utilizes from the points and line segments, the adjacent \(p_{i}\) and \(p_{j}\) points and the line segment of length \(L_{ij}\) between them are taken into account. Also, the line segment of length \(L_{ij}\) is divided equally into 10 subsegments with the help of 9 subsegmentation points and the first, third, fifth, seventh and ninth ones are chosen and named as 0.1, 0.3, 0.5, 0.7 and 0.9 subsegmentation points. If the line segment between the \(p_{i}\) and \(p_{j}\) points is in the effect range of kth enemy threat fully or partially, the cost of this enemy threat or \(C_{t,(ij),k}\) is determined with Eq. (3) [59]. In Eq. (3), \(t_{k}\) is the grade or danger level of the kth enemy threat. While the Euclidean distance between the center of kth enemy threat and 0.1 segmentation point is \(d_{0.1,i,k}^{4}\), the Euclidean distance between the center of kth enemy threat and other selected subsegmentation points are \(d_{0.3,i,k}^{4}\), \(d_{0.5,i,k}^{4}\), \(d_{0.7,i,k}^{4}\) and \(d_{0.9,i,k}^{4}\), respectively. After calculating the cost of each enemy threat for all line segments of the path and summing them, the value of \(C_{t}\) is obtained.

$$\begin{aligned} C_{t,(ij),k} = \frac{L_{ij}t_{k}}{5}(\frac{1}{d_{0.1,i,k}^{4}}+\frac{1}{d_{0.3,i,k}^{4}}+\frac{1}{d_{0.5,i,k}^{4}}+\frac{1}{d_{0.7,i,k}^{4}}+\frac{1}{d_{0.9,i,k}^{4}}) \end{aligned}$$
(3)

In order to tracking the planned path thoroughly, a UAV or UCAV system should manage some turning maneuvers successfully. However, a UAV or UCAV system especially designed with the fixed wings has some limitations about the turning maneuvers and these limitations become important when overall path quality is measured. For understanding whether the turning maneuver can be acceptable or not, the angle between two vectors such as \(\overrightarrow{p_{j}p_{j+1}}\) and \(\overrightarrow{p_{j+1}p_{j+2}}\) generated by using the \(p_{j}\), \(p_{j+1}\) and \(p_{j+2}\) points in the set P is required and calculated with Eq. (4) [59]. While the \(p_{j}\), \(p_{j+1}\) and \(p_{j+2}\) correspond to the \(p_{s}\), \(p_{1}\) and \(p_{2}\) when the first three elements of the P are considered, they show \(p_{D-1}\), \(p_{D}\) and \(p_{t}\) when the last three elements of the P are considered. If the \(|\varnothing _{j} |\) representing the absolute value of the turning angle \(\varnothing _{j}\) is less than the \(\varnothing _{max}\) used on behalf of the maximum turning angle, it is accepted that the UAV or UCAV is capable of handling the needed maneuver. Otherwise, \(|\varnothing _{j} |\) is summed with the absolute values of the turning angles exceeding the boundary about the \(\varnothing _{max}\) for the \(C_{s}\) cost.

$$\begin{aligned} \varnothing _{j} = arctan \left( \frac{\Vert \overrightarrow{p_{j}p_{j+1}} \times \overrightarrow{p_{j+1}p_{j+2}} \Vert }{\overrightarrow{p_{j}p_{j+1}} \cdot \overrightarrow{p_{j+1}p_{j+2}}} \right) \end{aligned}$$
(4)

4 Details of the BaF algorithm

The geometrical description of the path planning problem comes with some difficulties about finding the members of the set L and a strong mathematical background is crucial for generating the set P, a path derived from the set P and cost in terms of enemy threats, length and turning maneuvers containing vector calculations. Even though there are exact difficulties about the acquirement of set L, counterpart of it for the transformed coordinate system or set \({\dot{L}}\) and other calculations, geometric model of the UAV or UCAV path planning can help to design new greedy algorithms and heuristics of making locally optimal choice or decision at each stage being used with the algorithms.

As stated earlier, \({\dot{L}}_{i}\) is the ith line from the set \({\dot{L}}\) and assume that this line is divided into \(D+1\) equal segments similar to the reference line drawn between the start and target points. Also, the points used for the segmentation of the line \({\dot{L}}_{i}\) are stored in the set \({\dot{P}}^{i}=\{{\dot{p}}^{i}_{1},{\dot{p}}^{i}_{2},\ldots ,{\dot{p}}^{i}_{D-1},{\dot{p}}^{i}_{D}\}\). If a point in the set \({\dot{P}}^{i}\) will be chosen for a UAV or UCAV path, a heuristic deciding that the point being selected from the set \({\dot{P}}^{i}\) will be the nearest one to the point selected previously from the set \({\dot{P}}^{i-1}\) and outside the effect range of each enemy threat is guided. When the first line in the set \({\dot{L}}\) or \({\dot{L}}_{1}\) is considered, it should be noted that the proposed heuristic tries to select a point from the set \({\dot{P}}^{1}\) that is nearest to the \({\dot{p}}_{s}\) and outside the effect ranges of all enemy threats.

One of the main motivations lying behind the selection heuristic is keeping the distance between two points chosen from the \({\dot{P}}^{i-1}\) and \({\dot{P}}^{i}\) at minimum while guaranteeing the flight safety of the UAV partially or fully. If the line segment between the taken points from the \({\dot{P}}^{i-1}\) and \({\dot{P}}^{i}\) intersects with a circle representing an enemy threat, a partial flight safety for the operated UAV or UCAV is satisfied. On the other hand, if the line segment between the taken points from the \({\dot{P}}^{i-1}\) and \({\dot{P}}^{i}\) does not intersect any circle, the mentioned line segment becomes flight safe entirely. The applied heuristic also affects the cost of turning maneuvers. When the selection of the points from three adjacent sets such as \({\dot{P}}^{i-1}\), \({\dot{P}}^{i}\) and \({\dot{P}}^{i+1}\) concludes with the \({\dot{p}}^{i-1}_{j}\), \({\dot{p}}^{i}_{j}\) and \({\dot{p}}^{i+1}_{j}\), a turning maneuver is not carried out by the UAV. In Fig. (2), the selection of points according to the proposed approach is illustrated.

Because of the fact that the nearest point in the set \({\dot{P}}^{i}\) to the point \({\dot{p}}^{i-1}_{j}\) is the point \({\dot{p}}^{i}_{j}\), the selection heuristic necessitates the control of point \({\dot{p}}^{i}_{j}\) in the set \({\dot{P}}^{i}\) first by accepting the previous choice of the point \({\dot{p}}^{i-1}_{j}\) in the set \({\dot{P}}^{i-1}\). If the point \({\dot{p}}^{i}_{j}\) is not in the effect range of any enemy threat, it is stored immediately and the line \({\dot{L}}_{i+1}\) and set \({\dot{P}}^{i+1}\) are taken into account. Otherwise, the remaining \(D-1\) points in the set \({\dot{P}}^{i}\) are controlled sequentially in order to determine the most appropriate one. When the general workflow of the selection procedure is investigated, it is easily seen that there is an exceptional case about the first line or \({\dot{L}}_{1}\) and point set \({\dot{P}}^{1}\) related to the \({\dot{L}}_{1}\). By considering that there is only point \({\dot{p}}_{s}\) before the line \({\dot{L}}_{1}\), each of D different members in the set \({\dot{P}}^{1}\) is controlled for determining the closest one to the \({\dot{p}}_{s}\) and outside the effect range of all enemy threats. The details of how a point from the line \({\dot{L}}_{1}\) and subsequent lines is chosen are presented in Algorithms (1) and (2), respectively.

Fig. 2
figure 2

Selecting the points from the lines \({\dot{L}}_{1}\) and \({\dot{L}}_{2}\) (a), \({\dot{L}}_{3}\) and \({\dot{L}}_{4}\) (b), \({\dot{L}}_{5}\) and \({\dot{L}}_{6}\) (c) according to the heuristic of greedy algorithm

Algorithm 1
figure a

Selecting a point from the first line

Algorithm 2
figure b

Selecting points from the second and subsequent lines

The running time of the newly introduced greedy path planner should be determined whether a point in the set \({\dot{P}}^{2}\) or subsequent ones is selected after checking \(D-1\) segmentation points or not. Given that each selection from the sets ranging from \({\dot{P}}^{2}\) to \({\dot{P}}^{D}\) requires the evaluation of \(D-1\) segmentation points. Furthermore, it is accepted that N enemy threats are controlled for understanding the considered point is in the the effect range or not and the computational cost of each control is represented with a constant and showed as O(1) by referencing the Big-O asymptotic notation. Also, it is important to declare that the computational cost of remaining operations for a point in the set \({\dot{P}}^{2}\) or other subsequent ones can be taken equal to O(1). By summing the total cost of N enemy threats or O(N) and the cost of remaining operations or O(1), the load of controlling a point can be simply set to O(N). Due to the existence of \(D-1\) points being checked, the multiplication of \(D-1\) term with the O(N) also resulting in \(O( (D-1) \times N)\) can be used for the computational complexity of the part of greedy algorithm related to the selection of a point from one of the sets including \({\dot{P}}^{2}\), \({\dot{P}}^{3}\) and so on. When the details of the Algorithm (2) are investigated, it is seen that before executing the loop in lines 22–43, an extra control for the point associated with the selected point from the set of the previous line is conducted and \(O(D \times N)\) corresponds to the cost of selecting a point from one of the sets except the first set or \({\dot{P}}^{1}\).

The point being selected from the set \({\dot{P}}^{1}\) is decided after evaluating all of D segmentation points in the same set. Also, it is given that N enemy threats are controlled for understanding the considered point is in the effect range or not and the computational complexity of each control is equalized to O(1). By summing the total cost related to the existence of N enemy threats or O(N) and the cost of other remaining operations showed as O(1), checking a point in the set \({\dot{P}}^{1}\) brings the load of O(N) and the selection of a point from the set \({\dot{P}}^{1}\) of size D brings the load of \(O(D \times N)\). Because of there are D lines and selection of a point in the point set of a line requires operations with the load of \(O(D \times N)\), the computational complexity of the greedy planner about calculating a path from the start to the target is found as \(O(D^{2} \times N)\) for the worst case scenario.

The complexity of selecting a point from the set \({\dot{P}}^{i}\) where i is greater than one can be decreased. If the heuristic decides that the point \({\dot{p}}^{i-1}_{j}\) in the set \({\dot{P}}^{i-1}\) is chosen and the control of point \({\dot{p}}^{i}_{j}\) in the set \({\dot{P}}^{i}\) ensures the threat safety, the selection of point from the set \({\dot{P}}^{i}\) is completed immediately without evaluating \(D-1\) elements belonging to the same set and computational complexity of this type short circuit originated from the execution of loop in lines 12-17 is bounded by O(N). If the points being selected from the sets such as \({\dot{P}}^{2}\), \({\dot{P}}^{3}\), and so on are detected quickly with the help of the previously identified ones, the cost of operations becomes equal to \(O( ( D - 1 ) \times N )\). Finally, if the cost of selection from the set \({\dot{P}}^{1}\) or \(O(D \times N)\) is summed with the costs of other selections, the part of the greedy algorithm responsible about calculating a path from the start to the target runs in \(O(D \times N)\) for the best case scenario.

The greedy approach whose details given above can also be used to calculate a path from the target point to the start point as illustrated in Fig. (3). When the greedy approach is employed for calculating a path from the start point to the target point, it can be guessed that the part of path near to the start point contains line segments having some advantages about the length and turning maneuvers. In a similar manner, when the greedy approach is employed for calculating a path from the target point to the start point, it can be thought that the part of the path near to the target point contains line segments having some advantages about the length and turning maneuvers. If two paths, one of which is calculated from the start point to the target point while the latter one is calculated from the target point to the start point by the greedy approach, bring together appropriately, more qualified and promising UAV or UCAV paths than the predecessor paths can be revealed. However, it is important to decide that how the predecessor paths are divided and then combined for revealing new candidates.

Fig. 3
figure 3

Selecting the points from the lines \({\dot{L}}_{6}\) and \({\dot{L}}_{5}\) (a), \({\dot{L}}_{4}\) and \({\dot{L}}_{3}\) (b), \({\dot{L}}_{2}\) and \({\dot{L}}_{1}\) (c) according to the heuristic of greedy algorithm

Assume that while \({\dot{P}}\) is the set containing the selected points by the greedy approach that begins execution from the \({\dot{p}}_{s}\) and \(\ddot{P}\) is the set containing the selected points by the greedy approach that begins execution from the \({\dot{p}}_{t}\). In order to decide that where the paths drawn by considering the \({\dot{P}}\) and \(\ddot{P}\) are divided, the most similar matched line segments between these two paths are chosen. For measuring the similarity of two matched line segments, Eq. (5) given below is utilized. In Eq. (5), \(s_{j}\) represents the similarity score between the jth line segments of the paths extracted from the sets \({\dot{P}}\) and \(\ddot{P}\). The j indexed elements of the sets \({\dot{P}}\) and \(\ddot{P}\) are \({\dot{p}}_{j}\) and \(\ddot{p}_{j}\) and the \(j+1\) indexed elements of the sets \({\dot{P}}\) and \(\ddot{P}\) are \({\dot{p}}_{j+1}\) and \(\ddot{p}_{j+1}\), respectively. As easily seen from Eq. (5), the similarity score increases when the absolute value of the differences decreases. Dividing the path by using the most similar line segment allows the continuity for the other line segment or segments coming before or after it. If the division is carried out by using only one point, understanding where the change trend between two paths of greedy algorithm becomes apparent can be challenging. On the other hand, if the number of contiguous line segments being guided for the division of the paths is increased, an implicit dominance or weight to one of two paths is given and more eligible line segments can be missed.

$$\begin{aligned} s_{j} = 1 / ( |{\dot{p}}_{j} - \ddot{p}_{j}|+ |{\dot{p}}_{j+1}-\ddot{p}_{j+1}|) \end{aligned}$$
(5)

The determination of the most similar line segment among the paths backed by the sets \({\dot{P}}\) and \(\ddot{P}\) allows starting operations to do with the candidate generations. Provided that the line segment between the \({\dot{p}}_{j}\) and \({\dot{p}}_{j+1}\) and the line segment between the \(\ddot{p}_{j}\) and \(\ddot{p}_{j+1}\) are the most similar line segment. When populating the first candidate or \({\dot{C}}^{1}\), the points of the set \({\dot{P}}\) indexed from 1 to \(j-1\) are taken directly and assigned to the corresponding points of the set \({\dot{C}}^{1}\). Furthermore, the jth and \((j+1)th\) elements of the \({\dot{C}}^{1}\) are fixed to the \({\dot{p}}_{j}\) and \({\dot{p}}_{j+1}\), if the path related to the set \({\dot{P}}\) is better than the path related to the set \(\ddot{P}\). Otherwise, they are adjusted to the \(\ddot{p}_{j}\) and \(\ddot{p}_{j+1}\). Finally, the remaining points of the candidate are configured temporarily to the points of the set \({\dot{P}}\) indexed from \(j+2\) to D and then computed again with the contribution of the points of the set \(\ddot{P}\) indexed from \(j+2\) to D as in Eq. (6). The computation of the new value by averaging the corresponding point values of the \({\dot{P}}\) and \(\ddot{P}\) locates some line segments in the middle of the inherited line segments and can deduce the difficulty of the turning maneuvers. If the novel value of the \({\dot{c}}^{1}_{i}\) improves the overall path quality, its original value determined as the \({\dot{p}}_{i}\) is updated.

$$\begin{aligned} {\dot{c}}^{1}_{i} = ( {\dot{p}}_{i} + \ddot{p}_{i} ) / 2 \end{aligned}$$
(6)

The second candidate or \({\dot{C}}^{2}\) gets the values of its elements whose indexes are equal to or greater than \(j+2\) from the corresponding elements of the set \({\dot{P}}\). The jth and \((j+1)th\) elements of the \({\dot{C}}^{2}\) are fixed to the \({\dot{p}}_{j}\) and \({\dot{p}}_{j+1}\), if the path related to the set \({\dot{P}}\) is better than the path related to the set \(\ddot{P}\). Otherwise, they are adjusted to the \(\ddot{p}_{j}\) and \(\ddot{p}_{j+1}\). The remaining elements of the second candidate are configured temporarily to the points of the \({\dot{P}}\) indexed from 1 to \(j-1\) and then computed again with the contribution of the matched elements of the set \(\ddot{P}\) as described in Eq. (6). If the novel value of \({\dot{c}}^{2}_{i}\) improves the overall path quality, its original value determined as the \({\dot{p}}_{i}\) is updated. By generating the second candidate, the parts of the first candidate that are protected are searched with the information supplied by the set \(\ddot{P}\) for finding more proper points.

The generation concept of the third and fourth candidates depends on the usage of the path and its segments extracted from the set \(\ddot{P}\). When populating the third candidate or \({\dot{C}}^{3}\), the points of the set \(\ddot{P}\) indexed from 1 to \(j-1\) are taken directly and assigned to the corresponding points of the set \({\dot{C}}^{3}\). The jth and \((j+1)th\) elements of the \({\dot{C}}^{3}\) are fixed to the \({\dot{p}}_{j}\) and \({\dot{p}}_{j+1}\), if the path related to the set \({\dot{P}}\) is better than the path related to the set \(\ddot{P}\). Otherwise, they are adjusted to the \(\ddot{p}_{j}\) and \(\ddot{p}_{j+1}\). Finally, the remaining points of the candidate are configured temporarily to the points of the set \(\ddot{P}\) indexed from \(j+2\) to D and then computed again with the contribution of the points of the set \({\dot{P}}\) indexed from \(j+2\) to D. When the new value calculated for the \({\dot{c}}^{3}_{i}\) by guiding Eq. (6) improves the quality of the path, a replacement between the old and new ones is carried out.

The fourth candidate or \({\dot{C}}^{4}\) gets the values of its elements whose indexes are equal to or greater than \(j+2\) from the corresponding elements of the set \(\ddot{P}\). The jth and \((j+1)th\) elements of the \({\dot{C}}^{4}\) are fixed to the \({\dot{p}}_{j}\) and \({\dot{p}}_{j+1}\), if the path related to the set \({\dot{P}}\) is better than the path related to the set \(\ddot{P}\). Otherwise, they are adjusted to the \(\ddot{p}_{j}\) and \(\ddot{p}_{j+1}\). Also, the values of the elements in the set \(\ddot{P}\) indexed from 1 to \(j-1\) are assigned to the appropriate elements of the fourth candidate initially and then computed again sequentially with the contribution of the matched elements of the set \({\dot{P}}\) as is done for second candidate. If the novel value of the \({\dot{c}}^{4}_{i}\) improves the overall path quality, its original value determined as the \(\ddot{p}_{i}\) is updated. Because of the complementary relationship between the third and fourth candidates, the parts of the third candidate that are protected are searched when finalizing the fourth candidate. The details of the operational steps for obtaining the fourth candidate are explained in Algorithm (3).

Algorithm 3
figure c

Determining the fourth candidate

The candidate generation schema guarantees that the qualities of its products are at least equal or better than the qualities of the inherited paths and the best one among them is the output of the introduced greedy algorithm. When configuring the candidates \({\dot{C}}^{1}\) and \({\dot{C}}^{2}\), the objective function in Eq. (2) is called \(D-2\) times to calculate the quality or appropriateness of the current path. In addition to this, when configuring the candidates \({\dot{C}}^{3}\) and \({\dot{C}}^{4}\), the mentioned objective function is invoked \(D-2\) times. If two extra calls of the objective function for assigning the quality scores to the paths of sets \({\dot{P}}\) and \(\ddot{P}\) and four extra calls of the objective function for assigning the initial quality scores to the candidate paths are also considered, the total number of calls is \(2D+2\). The computational complexity of a call to the objective function can be represented as \(O(D \times N)\) by utilizing from the properties of the asymptotic notation. If the term \(2D+2\) is multiplied with the complexity of a function call and then the multiplication result is summed with the cost of operations devoted to the identification of the most similar line segment, the burden of the candidate generation to the running time of the greedy algorithm is declared as \(O(D^2 \times N)\). Due to the polynomial equivalence or dominance of \(O(D^2 \times N)\) compared with the complexity of the worst or best case scenario about the calculation of a path from start to target or vice versa, the overall running time of the newly proposed greedy algorithm is bounded to \(O(D^2 \times N)\). By considering the general workflow of the algorithm where two greedy paths, the former is planned from the start to the target while the latter is planned from the target to the start, are guided, its name is simply called the Back-and-Forth and the BaF abbreviation is used in the remainder of study.

5 Experimental studies

In order to understand the pure path planning capabilities of the BaF algorithm and how it can be used to boost the performance of another technique, the experimental studies were divided into two subsections. While the first subsection is devoted to the investigations of the BaF by experimenting it on different battlefield scenarios and their test cases, the second subsection is related to the design of an ABC variant called the BaF–ABC in which the BaF algorithm supports the initialization of the food sources and detailed comparisons between the BaF, ABC, BaF–ABC and other thirteen path planners based on well-known meta-heuristics.

5.1 Performance investigation of the BaF algorithm

The qualities of the paths planned by the BaF algorithm can change according to the battlefield scenarios or even different test cases of the same battlefield scenario. Because of this main reason, three battlefield scenarios and twelve test cases belonging to them generated by varying the number of segmentation points or D were referenced [59]. The center positions of the enemy threats, their effect ranges and grades, start and target points of the tested battlefields were listed in Table 1. For each test case, the BaF algorithm was executed and the qualities of the discovered paths calculated over the sets \({\dot{P}}\), \(\ddot{P}\), \({\dot{C}}^{1}\), \({\dot{C}}^{2}\), \({\dot{C}}^{3}\) and \({\dot{C}}^{4}\) by using Eq. (2) were given in Table 2. However, it is important to state that the path being declared by the BaF as the final solution is the best one among the six sets or their corresponding paths.

Table 1 Information about the battlefields used in the experiments

The results summarized in Table 2 provide significant information about the working characteristics of the BaF algorithm. The heuristic used to select points for the sets \({\dot{P}}\) and \(\ddot{P}\) is capable of generating eligible line segments that are relatively close to the start point of UAV by considering the \({\dot{P}}\) and relatively close to the target point of UAV by considering the \(\ddot{P}\). The combination of these two paths as modeled in the BaF populates new candidates whose qualities are at least equal to or better than the qualities of the predecessor paths and various difficulties and special requirements about the battlefields are handled more subtly. For eight of twelve test cases, the BaF algorithm finds the set \({\dot{C}}^{1}\) as its best and reports the matched path. Also, the BaF algorithm identifies the \({\dot{C}}^{3}\) as its best and sends the matched path for three of twelve test cases. Finally, only for a test case that is the 10-dimensional test case of Scenario-3, the set \({\dot{C}}^{2}\) and the path related to the \({\dot{C}}^{2}\) are reported by the BaF algorithm. When the composition of the candidates generated by the BaF as final solutions is investigated, it is seen that the occurrence of the first candidate or \({\dot{C}}^{1}\) with 66.66 percent is more common than the occurrence of other candidates. Utilizing from the inherently eligible line segments of the set \({\dot{P}}\) that are relatively close to the start point directly and calculating the remaining line segments that are near to the target point with the help of inherently eligible line segments of the set \(\ddot{P}\) as done for the first candidate are generally found appropriate concatenation schema in the BaF algorithm. Even though the concatenation schema of the first candidate allows to design more better UAV or UCAV paths for the vast majority of the test cases, other concatenation approaches used by the BaF are still required and capable of managing special demands of the path planning problem rising unpredictably with the number of segmentation points, enemy threats, their properties and distributions on the battlefield more properly.

Table 2 Qualities of the paths found by the BaF algorithm

The paths discovered by the BaF should be compared with the paths discovered by other meta-heuristic based path planners in order to decide that whether the paths of BaF are promising or not. For this purpose, fourteen meta-heuristic based path planners including ABC, GA, GAPSO, MFO, SSA, PFA, SBO, SCA, ECTLBO, HSGWO-MSOS, CIPSO, GWO, AEO and NSEAEO were chosen. While the population sizes of the chosen algorithms except the ABC were set to 30 [59], the number of food sources or SN in ABC algorithm was set to 30 and the limit parameter of the same algorithm was calculated as the result of \(0.5 \times SN \times D\) operation. When a run was terminated after consuming 6000 function evaluations, the final solution sent by the tested meta-heuristic was recorded with the corresponding objective function value. The best, worst, mean best objective function values and standard deviations obtained over the records were organized and then presented in Table 3 for Scenario-1, Table 4 for Scenario-2 and Table 5 for Scenario-3 with the results of the BaF algorithm. In Tables 3, 4, and 5, the ranks of the algorithms were determined by considering the mean best objective function values of the ABC, GA, GAPSO, MFO, SSA, PFA, SBO, SCA, ECTLBO, HSGWO-MSOS, CIPSO, GWO, AEO and NSEAEO. Because of the BaF is a deterministic algorithm, the best, worst and mean best objective function values are all same and its standard deviation is also equal to zero.

Some clues about the competitive performance of the BaF algorithm can be found in the results of Tables 3, 4, and 5. While the BaF is labeled as the third best path planner for the Scenario-1 and Scenario-2, it gets ranked as the best path planner among other algorithms for the Scenario-3 by evaluating the overall ranks of the algorithm. When a test case based investigation is carried out, it is seen that the BaF algorithm loses its position in the top three only for the 20 and 25-dimensional cases of Scenario-1 and 10 and 15-dimensional cases of Scenario-2. However, it is still the fourth or fifth best path planner among others and dominates the majority of the tested algorithms by invoking compute-intensive function responsible for assigning the path quality at least 115 times less than all competitors. The heuristic introduced with the BaF algorithm plays a key role for calculating two efficient paths being served later as backbone when generating four additional candidate paths. Moreover, the division of the two predecessor paths on the basis of the most similar line segment for maintaining both continuity and an adequate balance between the predecessors and then producing candidates by executing a unique combination mechanism in which the qualified line segments before reaching or after passing the division segment are protected directly while the other ones are tried to be located in the middle of the predecessors help the BaF to perform better than most of its opponents with the proven stability being understood from the standard deviations.

Table 3 Comparison between the BaF and other path planners for Scenario-1
Table 4 Comparison between the BaF and other path planners for Scenario-2
Table 5 Comparison between the BaF and other path planners for Scenario-3

5.2 Performance investigation of the BaF–ABC algorithm

Driven by the promising and robust performance of the BaF algorithm, it is thought that the path planning capabilities of a meta-heuristic algorithm with the integration the BaF into the workflow appropriately can be improved. One of the integration ways can be using the BaF algorithm for initializing the population or colony of a meta-heuristic. When the BaF executes and then yields the final solution, one of the randomly determined population member is set to the final solution of the BaF and remaining members of the population are computed by adding a randomly produced number between \(-1\) and 1 to each parameter of the solution sent from the BaF. The initialization of a population or colony in a meta-heuristic with the guidance of the solution provided by the BaF gives a chance for searching the neighborhood of the referenced path. Moreover, the considered meta-heuristic starts its operations with a population containing eligible member or members.

The integration of the BaF algorithm into the workflow of a meta-heuristic as mentioned above was experienced over the ABC algorithm and this new variant was called the BaF–ABC. ABC algorithm inspired by the behaviours of employed, onlooker and scout bees is one of the most-studied meta-heuristics [68]. Because of the divided, easily implementable and configurable phases, ABC algorithm has been chosen and tested for solving different engineering problems since its first introduction in 2005 [68]. When the algorithm specific control parameters are considered, ABC differs from other popular meta-heuristics. It has only one specific control parameter called limit and the value being assigned to this control parameter should be calculated as the result of \(0.5 \times D \times SN\) operation [68]. In order to understand that how the qualities of the paths planned by the BaF–ABC change, the test cases of the Scenario-1, Scenario-2 and Scenario-3 were considered again and a set of comparison between BaF–ABC, BaF, ABC, GA, GAPSO, MFO, SSA, PFA, SBO, SCA, ECTLBO, HSGWO-MSOS, CIPSO, GWO, AEO and NSEAEO was carried out. While the SN of the ABC and BaF–ABC was determined as 30, the population size of the GA, GAPSO, MFO, SSA, PFA, SBO, SCA, ECTLBO, HSGWO-MSOS, CIPSO, GWO, AEO and NSEAEO was set to 30 [59]. The limit parameter of the ABC and BaF–ABC was taken equal to the result of \(0.5 \times SN \times D\) operation. All of the algorithms except the BaF were run 30 times by setting the maximum evaluation number to 6000 [59]. The objective function values of the solutions reported by the algorithms were recorded at the end of each run and the best, worst, mean best objective function values and standard deviations were presented in Table 6 for Scenario-1, Table 7 for Scenario-2 and Table 8 for Scenario-3.

The results given in Tables 6, 7, and 8 show the apparent superiority of the BaF–ABC against other tested algorithms. For nine of twelve test cases, the mean best objective function values of the BaF–ABC are better than the mean best objective function values of the competitors and the overall rank of the BaF–ABC is determined as 1. In addition to this, the BaF–ABC is ranked as the second or third best path planner for the three remaining cases and still proves its dominance compared to the vast majority of considered path planners. Utilizing from the path discovered by the BaF subtly for initializing the food sources of the ABC algorithm significantly narrows the whole search space into a feasible space having solutions with high qualities. If the meta-heuristic supported by the BaF is able to maintain a good balance between the exploration and exploitation-intensive operations, it obtains much more better UAV or UCAV paths compared to the paths calculated by standard implementation of the same algorithm. However, it is still important to declare that the initial set created by referencing the path of the BaF algorithm can have some difficulties for reflecting the required amount of solution diversities and the chosen meta-heuristic should be capable of discovering new solutions in the calibrated feasible space and almost all meta-heuristic algorithms are equipped with specialized search mechanisms allowing to stabilize the exploration and exploitation operations, escape from local optimums and converge to the global best solution. The best paths calculated by the BaF, ABC and BaF–ABC and positive contribution of the BaF on the performance of the standard ABC algorithm can be visually inspected in Figs. (4, 5, and 6).

Table 6 Comparison between the BaF–ABC and other path planners for Scenario-1
Table 7 Comparison between the BaF–ABC and other path planners for Scenario-2
Table 8 Comparison between the BaF–ABC and other path planners for Scenario-3
Fig. 4
figure 4

The best paths found by the BaF, ABC and BaF–ABC for 10 (a), 15 (b), 20 (c) and 25-dimensional (d) cases of the Scenario-1

Fig. 5
figure 5

The best paths found by the BaF, ABC and BaF–ABC for 10 (a), 15 (b), 20 (c) and 25-dimensional (d) cases of the Scenario-2

Fig. 6
figure 6

The best paths found by the BaF, ABC and BaF–ABC for 10 (a), 15 (b), 20 (c) and 25-dimensional (d) cases of the Scenario-3

The computational complexity of the BaF is presented as \(O(D^2 \times N)\) and its usage with the ABC algorithm brings some extra burden to the execution time of the same algorithm. In order to understand that how long the BaF algorithm executes and how its usage affects the execution duration of the ABC, 30 independent tests were carried out for the BaF, ABC and BaF–ABC algorithms. The SN and limit parameters of the ABC and BaF–ABC were configured as 30 and the result of \(0.5 \times SN \times D\) operation, respectively. Also, the maximum evaluation number of the ABC and BaF–ABC algorithms were set to 6000. Because of \(2D+2\) invocations to the function responsible for calculating the path quality are made by the BaF, the initial value of the evaluation counter is set to \(2D+2\) in BaF–ABC algorithm. Each of three path planners were coded in C programming language and experiments were conducted on a Fedora-34 computer equipped with an Intel i5-10500 processor. The time required for completion of a test or execution was recorded in terms of seconds and the best (shortest), worst (longest), average of the recorded values and standard deviations about them were showed in Table 9. The first and foremost conclusion that can be extracted from the results of Table 9 is about the relatively small execution times of the BaF and its negligible load on the ABC algorithm. When the mean execution times are taken into account, it is seen that the BaF algorithm is at least nine times faster than the ABC algorithm and plans better paths than the ABC for nine of twelve test cases as validated before. The relatively small execution time of the BaF is also strengthen the idea of integrating it into another meta-heuristics. While the execution time of the BaF–ABC algorithm is higher than the execution time of ABC at most 0.008 seconds, it performs better than the ABC algorithm for all twelve test cases used in the experiments.

Table 9 Average execution times of the BaF, ABC and BaF–ABC
Table 10 Statistical comparison between the BaF, ABC and BaF–ABC

The competitive performance of the BaF algorithm and its significant contribution to the path planning capabilities of the ABC have been already seen in the tables listing the objective function values. However, an appropriate statistical test should be chosen and used for validating the pure performance of the BaF or BaF–ABC algorithm. The Wilcoxon signed rank test is one of the most common non-parametric tests for statistically benchmarking the algorithms. If the significance level (\(\rho \)) determined by the test while evaluating the results of the algorithms is less than a constant for which 0.05 fractional number is usually assigned, it is decided that one of the algorithms is statistically better. Otherwise, the difference between the results of the competitors is not enough to select the statistically better one. The Wilcoxon signed rank test was used for the comparison between the BaF, ABC and BaF–ABC algorithms and the results of the test were summarized in Table 10 where Z corresponds to the test statistics and \(W+\) and \(W-\) are matched with the sum of ranks for which the first algorithm is worse than the second algorithm and the sum of ranks for which the first algorithm is better than second algorithm. The results given in Table 10 proves the superiority of the BaF–ABC against the BaF and ABC algorithms for all three battlefield scenarios. Even though the differences between the qualities of the paths belonging to the BaF–ABC and BaF algorithms are relatively small, the search operations carried out in the employed, onlooker and scout bee phases of the ABC improve the paths inherited from the BaF at each of 30 independent runs. The Wilcoxon signed rank test also gives a chance to the BaF for validating its performance when compared to a meta-heuristic. For 15, 20 and 25-dimensional cases of the Scenario-1 and Scenario-3, the difference between the qualities of the paths belonging to the BaF and ABC algorithms is enough to generate statistical significance in favor of the BaF algorithm. Moreover, for the 20 and 25-dimensional cases of the Scenario-2, the \(\rho \) values less than 0.05 approve the qualities of the paths found by the BaF against the paths found by the ABC algorithm. When the number of segmentation points is increased and the challenging aspects of the path planning problem arise, the advantageous sides of the BaF about the heuristic point selection for calculating two predecessor paths and their combination by choosing the efficient line segments are more apparent.

6 Conclusion

The proven usage concepts of the UAV systems in the commercial or dangerous operations completely changed the well-established future projections of the developed countries and solving problems about these modern systems for further improving their task efficiencies became much more critical. Path planning is one of the most challenging problems about the UAV systems and should be solved by considering the some minimization objectives related to the enemy threats, total route length because of the fuel or battery limitations and maneuverability. In this study, a new greedy algorithm named as the Back-and-Forth (BaF) was proposed for solving UAV path planning problem. The BaF algorithm starts its operations by calculating two main paths with the help of the designed heuristic selection approach and then executes a combination procedure bringing advantageous line segments of the main paths together in order to obtain a more better path candidate. The planning performance of the BaF algorithm was investigated by using three battlefield scenarios and their twelve test cases. The results of the experimental studies demonstrated that the BaF algorithm is a strong and fast path planner with the exact stability and among the top three path planners when compared to the fourteen meta-heuristic based techniques.

The promising performance of the BaF algorithm has also been a powerful source of inspiration about using it with another meta-heuristic. For this purpose, the BaF was employed when determining the initial food sources of the artificial bee colony (ABC) algorithm and a hybrid path planner called the BaF–ABC was presented. The battlefield scenarios and their test cases used for the BaF were further guided in order to analyze the path planning characteristics of the BaF–ABC. The qualities of the paths calculated by the BaF–ABC proved the significant contribution of the BaF to the ABC algorithm and the BaF–ABC outperformed the BaF, ABC and other thirteen path planners for nine of twelve cases. The integration of the BaF gave a chance to the ABC for starting bee phases with a set of solutions in the feasible search space and help the BaF–ABC when planning UAV paths whose qualities are statistically apparent. In future, different selection heuristics can be benefited to calculate each predecessor path and versatile division and combination approaches can be applied for designing candidates. Also, the BaF algorithm can be integrated into the workflow of planners solving two or three-dimensional path planning problem with dynamic enemy threats and complex maneuver constraints. Moreover, the independence between the calculations of the predecessor and candidate paths encourages the parallelization of the BaF algorithm to exploit the computational power of the multi-core or distributed memory based systems.