# A Survey on Machine-Learning Techniques for UAV-Based Communications
## 5 Position Related Aspects
### Placement and Trajectory Design
A three-step solution was proposed, which comprised (i) the use of a genetic algorithm based k-means algorithm [114] to determine the initial cell partition of the users; (ii) the development of a Q-learning based deployment algorithm, which considers each UAV as an agent, trying offline to self-train and find its optimal 3-D placement assuming static ground users (at the first time slot); and (iii) the development of a Q-learning based movement algorithm for scenarios where the users are moving. The results demonstrated that these algorithms rapidly converge to a desired solution after a significantly small number of iterations. Furthermore, Q-learning based-deployment offers improved performance and reduced complexity when compared to k-means and Iterative-GAKmean alternatives. In Reference [115], an unsupervised online self-tuning learning algorithm for joint mobility prediction and object profiling of the individual UAVs was proposed. Apart from predicting the flying objects' future locations without requiring prior knowledge of the mobility profiles or trajectories of the UAVs, the proposed method also enables the classification of the UAVs into particular groups based on their motion properties, e.g., rotatory and fixed-wing UAVs, via an hierarchical generative model. From the results, a success rate of 90% in profiling mobile objects was yielded for a reasonable noise level and a relative small training data set (over time) compared to conventional data-driven methods. Overall, this method can be practically applied to FANETs with dynamic network topologies and autonomous UAVs and to predict future topologies. A UAV-based IoT data harvesting scenario in an urban area was also presented in Reference [116], where a resource-constrained aerial base station was employed to serve multiple static ground nodes, e.g., IoT sensors. Contrary to most works in the field, the propagation parameters are considered to be unknown. Based on this uplink scenario, a joint flight trajectory and node scheduling design problem was formulated to minimize the estimation error of the channel model parameters and to maximize the data traffic between the UAV and each node. The trajectory learning phase included the collection of measured data from the ground users that resulted in adequate knowledge of the propagation parameters from the UAV side. Then, an iterative path planning algorithm was proposed along with dynamic programming [117] techniques and the exploitation of a 3-D city map compression method in order to efficiently handle the aforementioned non-convex problem. The results demonstrated the benefits of the proposed learning method, whereas it was proved that the algorithm can converge to at least a locally optimal solution. Moreover, even though the ML-based solution leverages the rich map data, a map compression method is employed, making the trajectory design problem less complex compared to standard optimization tools. Then, in Reference [118], a UAV BS flying at an altitude well above the building height was adopted for the provision of video streaming services to several UEs clustered in a circular area. In an effort to optimize the flight planning and, thus, to enhance the QoE of UEs with regard to the video segment delay during streaming applications, a Q-learning approach was formulated. This approach was denoted as Q-SQUARE and modeled the UAV BS's path as a sequence of states, which were related to the UAV BS's position, the elapsed flight time, and the residual energy. Also, Q-SQUARE considered multiple recharging stations, where the UAV BSs were recharged after a flight period. The numerical results demonstrated that Q-SQUARE can substantially improve the system performance in terms of the QoE by optimizing the flight path of multiple UAV BSs serving the area of interest. The joint optimization of the placement and power allocation of multiple UAVs with respect to the ground users in an unknown region was also accomplished in Reference [119].