## 1 Introduction
Therefore, in [18], a UAV was deployed to improve the flexibility and capability of coverage for FSO communication. The work [19] indicates that the RIS can be assembled in a UAV platform and capture the advantages from both to maximize the system throughput. However, the UAV was set to hovering in a fixed position, which lacks the consideration of dynamic trajectory. To further highlight and clarify the novelty of this work, the main difference between the proposed work and existing works is given in Table 1.  
In order to mitigate atmospheric loss and pointing error loss, UAV trajectory optimization is considered for UAV-assisted FSO communication. The paper [20] shows that machine learning can be utilized in communication scenarios. In [21], a traditional UAV trajectory optimization method based on geometry analysis was proposed to find the shortest path and best cellular network coverage in a connectivity-constrained system. Furthermore, in [22], a 2D UAV trajectory was designated by the conventional non-convex optimization under different optimal conditions such as speed limitation, hovering duration requirement, and coverage requirement. As the learning method identifies the trends and patterns of data much more easily, the efficiency and accuracy can be improved continuously by gaining experience [23]. Therefore, when the optimal problem is non-convex or NP-hard, an AI or learning-powered method is a potential option for UAV trajectory optimization [24]. For example, in [25], trajectory design and power allocation based on typical machine learning optimization were formulated for maximizing the instantaneous sum rate of multi-UAVs. Moreover, conventional machine learning was limited when processing the raw data such as UAV flight status [26]. The deep reinforcement learning (DRL) method constructed by multiple processing layers to learn representations of data is, therefore, more efficient for trajectory optimization in wireless communication scenarios. The DRL algorithm is proposed to solve the instability problem and to improve the data inefficiency. In [27], by proposing the policy-based learning method, where an estimator of the policy gradient is been added. Also, a stochastic gradient ascend is exploited in order to achieve the maximum rewards. These features showed us more clear options for our optimization method. In the work [28], the DRL learning method was proposed as an online altitude control and scheduling policy for UAVs to obtain instantaneous channel state information (CSI) in real time along with any adjustment to its deployment altitude. What is more, in [29], a multi-UAV network was constructed, where the problem is non-convex with sophisticated states, and the individual UAV may not know the reward functions of other UAVs, the DRL was utilized as an improved clip and count-based algorithm for the multi-agent deep reinforcement learning scenario, which enables each UAV to select its policy in a distributed manner. Not only the altitude control and multi-agent optimization, in [30], the DRL method was proposed to optimize the new generation terahertz communication throughput, including UAVs to ground stations association, transmit power, and trajectory optimization problems. In [31], the DRL shows its high applicability for the complicated scenario where a multi-UAV trajectory planning task is required. Both the geographical fairness of user equipment and overall energy consumption are needed to optimize. Motivated by these works, the RIS-equipped UAV for FSO communication under the influence of atmospheric and pointing error loss will be investigated in this paper. To overcome the physical impacts and improve performance, the optimization proposed for pointing error loss uses a novel leading angle assisted particle swarm optimization (PSO) method, which is competent in efficiently finding the optimal continuous phase shifts. Furthermore, we consider a PPO optimization for determining the UAV trajectory in FSO communication.