# A Survey on Machine-Learning Techniques for UAV-Based Communications
## 4 Resource Management and Network Planning
### Multiple Access and Routing Protocols  
The UAV-enabled networks are a new communication paradigm that is characterized by high-speed mobility and frequent topology modification. In that sense, the traditional multiple access and routing protocols are not able to fully support the highly dynamic nature of the flying ad hoc UAV communication networks. A promising approach that could improve this aspect is to adopt ML in multiple-access and routing protocols, leading to autonomous network coordination and distributed user scheduling and data routing through dynamic path formation. Towards this direction, in Reference [83], a demodulation-free medium access control (MAC) identification scheme has been proposed that includes an ML classifier. In particular, SVM has been utilized to identify MAC protocols without demodulation. The proposed approach has been implemented with universal software radio peripherals (USRPs), while its performance has been evaluated using two typical MAC protocols, i.e., time division multiple access (TDMA) and carrier sensing multiple access with collision avoidance (CSMA/CA). In the presented experimental results, an access accuracy rate above 95% was observed while demodulation-free algorithm without ML provided an accuracy rate below 60% in a scenario with dynamic variation of the SNR. In Reference [84], the system model consists of several flying UAVs, which are equipped with a GPS and an identical switched beam antenna array. For improving the capacity of the network, an RL-based routing protocol is proposed, in which all UAVs are able to exchange status information in order to discover the routing path that the shortest delivery delay. The proposed solution enables self-optimization and autonomous operation, establishing connectivity through the optimal routing path. In this way, the average network delay can be reduced, as routing path formation is independent of the often unpractical a priori knowledge requirements, thus offering self-learning through RL. The simulation results showed that the proposed protocol provides improved performance, as compared to the existing ones and can guarantee successful data delivery with low latency. In Reference [85], an adaptive MAC protocol has been proposed in a scenario with multiple UAVs, where in each slot, the UAVs determine which MAC protocol, between TDMA and CSMA/CA, are more appropriate. A distributed Q-learning-based MAC scheme is utilized in order to preselect the MAC protocol according to the UAV's current state. The MAC switching decision is based on a practical byzantine fault tolerance procedure. Using this approach, each UAV is able to evaluate its performance and to determine the more appropriate MAC protocol that should be employed. In the performance comparisons, the proposed solution is evaluated against three alternative schemes. The first scheme was a distributed adaptive MAC protocol, allowing the UAVs to select the MAC protocol based on a specific performance metric. The second scheme was a MAC protocol relying on performance thresholds, and if they are violated, switching to another MAC protocol occurs. The third scheme consisted of a MAC protocol without consensus where transmitting UAVs adopts a different MAC protocol until their packet is successfully received by the receiving UAVs that might rely on another MAC protocol. Extensive simulation results have proved that the performance of the proposed scheme with respect to the average throughput, delay, and packet retransmission ratio is improved as compared to other conventional MAC protocols. In Reference [86], assuming a decentralized edge UAV swarm, a multi-armed bandit (MAB)-based approach has been proposed for optimally selecting the energy-efficient and processing data offload paths between a source and a target UAV. A large-scale UAV swarm emulator was implemented in Python that was based on real-life hardware metrics collected by UAVs in flight.