## 1 Introduction  
China has developed high-speed railways (HSRs) with 38,000 km in total length, accounting for over two-thirds of the world's total [1]. One railway was built with a speed of 350 km/h to enable athletes, reporters, audiences, and service staff to shuttle efficiently between Beijing and Zhangjiakou for the Beijing 2022 Winter Olympics. In the meantime, HSRs are under construction all over the world. In recent years, wireless communications applying the long-term evolution for railway (LTE-R) have been under consideration [2, 3, 4, 5]. However, its maximum bandwidth is just 20 MHz, which can only maintain tens of Mbit/s data rate and cannot meet the requirements of Gb/s-level applications [6]. As mobile networks of the fifth generation (5G) are being deployed rapidly, higher data rates, lower communication delays, and more device connections are expected to be achieved by 5G for railway (5G-R). However, a speed above 200 km/h of a high-speed train (HST) requires more frequent handovers and a shorter time to pass through the overlapping coverage area of two neighboring cells [7]. Moreover, it may lead to serious deterioration of wireless communication indicators, such as the delay of handover and the success rate of the handover, and this is similar to LTE-R [8, 9]. Wireless network optimization can effectively eliminate the interference of communications along the rail, avoid the existence of no-signal areas, and improve a user's perception [10, 11]. Due to the high speed of user equipment (UE) on a train, wireless communications of 5G-R face great challenges [12, 13]. Therefore, the development of fast handover algorithms for HSRs is essential in support of speeds of 200 km/h and for use of 5G-R. In order to reduce the delay of the handover of wireless communications, several different approaches have been explored. A simple but effective algorithm of distributed load balancing is presented to reduce the service interruption ratio due to frequent handovers in high-speed scenarios [14]. Adjusting power in the time domain relieves the \"uncertainty\" of the received strength of the signal and requires less energy transmission in the procedure of handovers [15; 16]. The latest research on C/U-plane staggered handover suggests a methodology to achieve soft and fast handovers [17]. With the large bandwidth of free-space optical communication, the loss rate of data can be decreased and the handover performance of the communication for HST is improved by changing hardware structures [18]. The optimal distance from the rail of a train to a ground base station and the distance between base stations are found to provide seamless connectivity and handover while minimizing the number of stations along the rail [19]. The optimization strategy of the handover based on the upper bound algorithm [20; 21], which finds the station with the largest reward by sampling from the reward set of stations, can effectively improve the performance of the handover. However, when UE enters a different scenario, the algorithm of upper bound needs to be drawn from a random initial point again. It is also required to learn from a random initial point for a newly connected UE. Because the performance of the initial random point is poor, it may cause the communication quality to be lower than what the system requires for a long time. This is unacceptable in practical applications. Due to the penetration loss of HST [22; 23], complex coverage scenarios, frequent handovers, and doppler shifts in HSRs [24; 25], the architecture of a network has a great impact on the performances of wireless communications. However, existing handover algorithms are difficult to deal with in highly dynamic, complex scenarios, and special channel environments [26; 27; 28]. This has become a limitation of mobile communication technology for HSRs. While previous studies made connections between the handover and system performances, they improve only one of performances while worsening another.