## 3 UAV Computing
Furthermore, the relevance of selecting an energy-efficient UAV computing design while intending to extend the UAV's service duration is highlighted because computation-related energy consumption is more significant than communication-related energy consumption. Finally, adding an extra edge server to a UAV raises the production cost of the UAV. As a result, there is still much interest in discovering new cost-effective and energy-efficient UAV computing solutions. Figure 3a illustrates the importance of using UAVs as MEC servers on the board and flying to help everything, including users, sensors, robots, etc. The computing task is performed in a UAV with the help of intelligent techniques. Furthermore, the UAV serves as a central relay, as shown in Figure 3b. It is shown that the UAV is aiding the mobile users in offloading their computational responsibilities to a particular MEC server. Despite the significant advantages provided by the design of UAV-enabled MECs in achieving low-latency and high-reliability services for IoT devices in smart environments, UAV computing faces several challenges. These challenges include intra-UAV communication, UAV security, air data security, data storage, and management. Because of the system's mobility characteristics, which impede communication, coordination between UAVs and ground-based users requires significant improvement. The limited onboard battery capacity of UAVs is another critical restriction. As a result, developing practical resource and energy management systems are critical. Therefore, the multiple sources of variability in UAVs have prompted researchers to construct an incentive mechanism using a multidimensional contract theoretic approach [87]. The authors of [88] introduced the use of a matching problem to study the joint optimization of route planning and task assignment for UAVs from the energy efficiency perspective. Contract matching has been studied for resource allocation in vehicular fog computing in [89; 90]. Due to memory capacity and energy consumption limitations, several parameters should be addressed before implementing any Artificial Intelligence (AI) approach to benefit from its resilience [91]. Even with limited computational capabilities, edge com  
Figure 3: UAV operation: (**a**) as a MEC and (**b**) as a relay to a terrestrial MEC. puting offers resources in a decentralized fashion, allowing for a speedier response to user requests than traditional cloud computing. Task scheduling, resource allocation, and offloading are just a few issues that significantly impact overall performance. Nonetheless, nonconvexity and complexity define the majority of the offered methods since they enable continuous learning in real-time inference and dynamic environments with minimal computing complexity. Over the last few decades, applying AI to networking problems has grown in popularity. Because of its capacity to interact with complicated surroundings and make judgments, ML has been widely applied in the networking area. A follow-me cloud controller collects information about the overall system status in most UAV-enabled MEC setups (i.e., MEC servers, UAVs, and users). This control unit is in charge of employing AI to manage offloading activities. A cloudlet placed on a UAV for a UAV computing collaboration is shown in Figure 4. The UAV receives offloaded tasks from smart environments and returns the results after completing the task. Furthermore, if complicated processing needs exceed the capability of the onboard cloudlet, the UAV might send the acquired data to the nearest cloud center for other computing. The system might incorporate many UAVs that support deployed everything in smart environments, such as smartphones, sensors, people, cars, robots, etc. For example, resource allocation in DRL does not require labeled training data. As a result, it may improve the making of offloading decisions depending on the channel environment's various states. As a consequence, the energy bandwidth and calculations are reduced.