## 3 Materials and Methods
### Working Mechanism of the Method
The proposed method's aim is to reduce the cost of each path and try to find the optimal path with minimum cost for multi-UAVs. In this study, three UAVs were used that had dissimilar start (source) and final (destination) stations. The results obtained from this method are explained in the analysis and results section. The pseudocode and flowchart of the proposed path planning can be found in Algorithm 2 and Figure 6.  
```
1. Initialize the grey wolf population \(X_{i}\) (i = 1, 2,....., n)
2. Initialize A, C and a //Equations(6)-(8)
3. Initialize positions matrix and search space
4. Calculate fitness of each agent //Equation (3)
5. **While (t < Max number of iterations)**
6. **For** each search agent
7. **Update the position of current search agent //Algorithm 1. **
8. **End For**
9. **Update a, A and C**
10. **Calculate the fitness of all search agents**
11. **Update position //Equation (11) or Equation (14)**
12. **Update the search space matrix**
13. **t = t+1**
14. **End While**

Figure 5: The working mechanism of the method. (**a**) The position matrix of each path; (**b**) the search space that represents distance between tuples. ### Other Possible Features: Applicability in Farmlands

Based on the functionality of farmland, farmers can analyze the data to increase productivity before the agricultural year begins. Most farmers fertilize their farmland based on the experimental information. Modern agriculture tries to use the source efficiently and encourages farmers to use new technologies in cultivation to increase productivity along with their income. While data that have been collected are stored in a light server to serve the clients, peer-to-peer communication can be held between monitoring devices with the robots via the Global System for Mobile communications (GSM). In precision agriculture, farmers are able to increase productivity by using the previous data analysis. As the connections are bidirectional, exchanging urgent commands such as changing tasks, terminating current tasks, and more can be performed. A tiny unit of computers of robots provides a mid-layer infrastructure to receive commands and to respond to requests. Thanks to the proposed algorithms, the farmer is able to lunch a UAV with predetermined states to monitor and control their land. Farmers can track the whole of their agricultural land and their crops remotely, and they can also meet their needs such as irrigation and harvesting using the related autonomous UAV and agricultural robot robots on an optimal path and minimum costs. In addition, the proposed methods can be used to find optimal routes for multiple UAVs at the same time in parallel or concurrently. In this case, each UAV perceives the other UAV as an obstacle andso, the relevant UAV can continue its mission without colliding with our obstacle management mechanism. In addition, thanks to this mechanism, it will be possible for the proposed methods to work successfully in dynamic or uncertain environments. ## 4 Results and Discussion

This section presents the performance of the proposed methods, which is analyzed and compared with the GWO-based 3D path planning method [20]. The authors used the Gray Wolf optimizer (GWO) algorithm to find an optimal path with minimal cost

Figure 6: Proposed path planning method flowchart. in 3D environments. According to the results of the study, in path planning, the GWO-based method is better than Dijkstra, A*, D*, and several famous metaheuristic-based methods. They proved that the GWO-based method presents a more balanced and better performance in similar problems. In addition, GWO-based algorithms are sought after in many research and application areas due to their balanced behavior amongst various metaheuristic algorithms [19; 20]. Therefore, we selected this method for the comparison of results and performance. The implantation and analysis presentation was performed in Java and MATLAB. The algorithms proposed in this study were performed on a Core i7-5500 U 2.4 processor with 8 GB of RAM.