###### Abstract  
Unmanned air vehicles (UAVs) used as aerial base stations (ABSs) can provide communication services in areas where cellular network is not functional due to a calamity. ABSs provide high coverage and high data rates to the user because of the advantage of a high altitude. ABSs can be static or mobile; they can adjust their position according to real-time location of ground user and maintain a good line-of-sight link with ground users. In this paper, a reinforcement learning framework is proposed to maximize the number of served users by optimizing the ABS 3D location and power. We also design a reward function that prioritize the emergency users to establish a connection with the ABS using Q-learning. Simulation results reveal that the proposed scheme clearly outperforms the baseline schemes. aerial base station; reinforcement learning; \(k\)-means clustering; line of sight; non line  
Moreover, Figure 1 shows that ABS can acts as a relay and can enhance services in any geographical areas. They can be connected with ground BSs for media and wireless connectivity. They can also be connected through satellite for basic connectivity with the core network. ABSs can provide basic services like calls and can also provide advanced features of video calling, data streaming, heavy file downloading and live gaming at good data rates. Sum-rate maximization will be key to provide advanced features to the users, as these features require high data rates and seamless connectivity. Besides the discussed advantages, ABS's 3D deployment poses certain challenges to improve coverage, maximize user association, improve energy efficiency, and enhance sum rates. Recently, many schemes have been proposed to improve the coverage, maximizing user association, and maximizing users' sum rates. For instance, in [7] the authors modeled the user association and ABS placement problem as a mixed-integer nonconvex optimization problem with the goal of maximizing users' total achievable data rates. They divided the problem into two subproblems and proposed an iterative solution to solve the nonconvex problem. A comparison with the state of the art demonstrated that the developed algorithm was convergent and capable of producing good results. Similarly, in [8], the authors presented a placement algorithm for multiple ABSs with in-band wireless backhaul that jointly optimized resource allocation and user association. To simplify the optimization problem, an equivalent spectrum efficiency was defined given the optimal resource allocation. Simulation results were provided to validate the effectiveness of the proposed method. The solutions discussed above used traditional methods, such as game theory and convex optimization, that require additional accurate network information from the environment. Figure 1: Deployment of multiple UAVs in wireless communications. To solve these challenges, machine/deep-learning-based solutions have recently made remarkable progress over traditional ABS deployment schemes. In machine/deep-learning-based solutions, three major types of schemes exist such as supervised, unsupervised, and reinforcement learning (RL) schemes. Reinforcement learning scheme has proved to be more efficient in the implementation of resource allocation, ABS placement, and user -association as it can interact directly with the environment without requiring prior training. As a result, it has the potential to provide the best possible action to maximize the decided reward. In the literature, there exist several schemes that addressed the ABS placement and user association problem using RL schemes. For example, in [9], a smart user association algorithm named reinforcement learning handoff (RLH) was developed to reduce redundant handoffs in UAV networks, and two methods of UAV mobility control were designed to work in combination with the proposed RLH algorithm to achieve maximum system throughput. The RLH algorithm proved to reduce the number of handoffs by 75%.