# Q-Learning Empowered Highly Dynamic and Latency-Aware Routing Algorithm for Flying Ad-Hoc Networks
## 5 Simulation Results
### Simulation Result and Analysis  
Figure 10 employs a box plot to compare the packet delivery ratios of OLSR, AODV, DSDV, B.A.T. Mobile, PARRoT, and QEHLR in the default simulation scenario, as presented in Table 6. The box plot displays the distribution of data using five horizontal lines, namely the upper edge, upper quartile, median, lower quartile, and lower edge, while the mean and outliers are marked in the figure. A higher packet delivery ratio indicates superior protocol performance in terms of integrity and correctness. According to Figure 10, the improved protocol QEHLR proposed in this paper has the highest packet transmission rate, which is approximately 12% higher than AODV, 22% higher than OLSR, 20% higher than DSDV, 8% higher than PARRoT, and 25% higher than B.A.T. Mobile. AODV has the second highest packet transmission rate after PARRoT and this protocol. This is because AODV has a route recovery mechanism based on RBER and a reactive protocol structure, which enables it to quickly notify packet loss and rebuild routes. However, AODV's routing mechanism based on hop count alone may result in unstable link transmission of data packets. As this protocol focuses on improving link stability and selects routes based on delay and mobility while retaining only stable routes, it is more suitable for high dynamic and unstable link scenarios. Figure 11 presents a comparison of packet transmission rates as the number of nodes increases. It can be observed that some protocol curves exhibit oscillations, which is due to the use of a three-dimensional model in this paper. The three-dimensional scenario in NS-3 is more unstable than the two-dimensional scenario, making it difficult to achieve smooth increases or decreases in the two-dimensional scenario. When the number of nodes is small (10-20 nodes), most protocols show an improvement in packet transmission rates. This is because as the number of nodes increases, the control information exchanged between nodes gradually increases, resulting in an increase in the number of paths between source \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Setting** \\ \hline Transmission gain & 1 db \\ Reception gain & 1 db \\ Energy level & 1 \\ Channel loss model & Friis \\ Mobility model & Random way point \\ Simulation area & 500 m \(\times\) 500 m \(\times\) 500 m \\ Number of nodes & 25 \\ Speed of nodes & 13.9 m/s \\ Traffic & UDP \\ Rate control & Ideal WIFI manager \\ \hline \hline \end{tabular}
\end{table} 
Table 6: _Cont._  
Figure 10: Performance of packet delivery ratio among different protocols. and destination nodes. It can be seen that this protocol has the highest packet success rate among the following protocols when the number of nodes changes. The second highest is PARRoT, followed by AODV and OLSR, and then B.A.T. Mobile and DSDV. The packet success rate of this protocol tends to be stable when the number of nodes is between 25 and 35, while AODV and PARRoT both show a downward trend. This is because the increase in the number of nodes can improve routing opportunities, but the higher periodic routing traffic increases the probability of data packet collision and loss. It can be seen that the established routing methods cannot adapt to the dynamic network topology, as some routing messages have a high degree of dependence, which prevents the protocol from utilizing more possible path routing for data packets. Figure 12 presents the average end-to-end delay of several protocols, with AODV exhibiting the highest delay due to frequent link breakage, router rediscovery, and reconstruction. Notably, QEHLR demonstrates the ability to maintain a low delay while ensuring a high packet delivery rate. This is attributed to the inclusion of end-to-end delay in the discount factor, which prioritizes links with low delay for transmission given their stability. As a result, QEHLR outperforms PARRoT in terms of both delay and jitter delay. Figure 13 presents a comparison of jitter delay, which is an index used to measure delay stability.