## 3 Fuzzy Logic Q-Learning Routing Scheme with Asymmetric Link Aware
### Neighbors Evaluation Criteria
#### 3.3.2 Available Throughput Estimation  
Recruiting a subset of neighbors as a potential candidate without taking into consideration their available throughput would highly impact routing performance and might result in high packet delays and loss. Therefore, we define the Available Throughput Estimation (ATE) as a mean to predict the maximum amount of data that could be transmitted successfully by each candidate node \(C_{i}\) during a specified time period [25]:  
\[ATE(C_{i})=\frac{NBits_{suc}}{DTT} \tag{3}\]  
where NBits indicates the number of bits that are successfully transmitted and DTT (Data Transmission Time) is the total amount of time a forwarder node requires to transmit packet. DTT includes total time of both successful and failed transmission attempts that a forwarder node conducts:  
\[DTT_{total}=\sum_{k=1}^{N_{success}}DTT_{success(k)}+\sum_{k=1}^{N_{failed}} DTT_{fild(k)} \tag{4}\]  
The number of attempts a forwarder takes to transmit a packet k successfully is \(N_{Tx}(k)\), and we define the time duration that it takes a packet to be successfully transmitted as:  
\[DTT_{success(k)}=\sum_{x=1}^{N_{Tx}(k)}(\overline{CW_{i}}+T_{\varphi})\ +( \overline{CW_{N_{Tx}(k)}})+T_{s} \tag{5}\]  
where \(N_{Tx}(k)\) is the number of transmissions attempts it takes a packet to be transmitted successfully, \(\overline{CW_{i}}\) is the estimate of contention window size for the \(x\)th transmission attempt, \(\overline{CW_{N_{Tx}(k)}}\) is the estimate contention window size for the last successful attempt of transmitting that packet, and \(T_{\varphi}\) and \(T_{s}\) are defined as follows:  
\[T_{\varphi}=T_{AIFS_{AC}}+T_{Header+Data}+T_{SIFS}+T_{ACK}+2\delta \tag{6}\]  
\[T_{s}=T_{AIFS_{AC}}+T_{Header+Data}+T_{SIFS}+T_{ACKTout}+\delta \tag{7}\]\(T_{SIFS}\) indicates the short inter-frame space, \(T_{AIFS_{AC}}\) is the arbitration inter-frame space and tuned based on Access Categories (AC), and time slot \(T_{Slot}\) duration is defined as follows:  
\[T_{AIFS_{AC}}=AIFS[AC]\times T_{Slot}+T_{SIFS} \tag{8}\]  
\(T_{Header+Data}\) is the transmission time of the payload of a packet, \(T_{ACK}\) is the transmission time of the ACK frame, \(\delta\) is the propagation delay, and \(T_{ACKTout}\) is the ACK timeout duration:  
\[T_{ACK_{Tout}}=T_{Slot}+T_{SIFS} \tag{9}\]  
Similarly, the time spent in re-transmitting a packet (\((NT_{xmax})\)) before it gets dropped, which is considered a failed transmission attempt, is defined as:  
\[DTT_{failed(k)}=\sum_{x=1}^{N_{Tx}(k)}(\overline{CW_{i}}+T_{\varphi}) \tag{10}\]  
Assuming that the selected contention window size is uniformly distributed in the range [0, \(CW_{i}\)], where \(CW_{i}\) is the current window size for the \(i\)th transmission attempt, the average contention time for any transmission attempt can be defined using the following equation:  
\[\overline{CW_{i}}=\frac{min(CW_{max},2^{i}\times(CW_{min}+1)-1)\times T_{ Slot}}{2} \tag{11}\]  
where \(CW_{max}\) and \(CW_{m}in\) are the maximum and minimum contention window sizes IEEE 802.11p access defined. The dynamic topology in MANETs due to rapid nodes mobility and the wireless signal impairments, such as fading, interference, and obstacles, causes instabilities in node's data transmission rates. To cope with wireless communication impairments in dynamic environment, we use the Exponentially Moving Average (EMA) to calculate the available bandwidth estimation accuracy as follows:  
\[ATE_{c_{i}}\leftarrow(a-\alpha)\times ATE_{t-1}+\alpha\times ATE_{t} \tag{12}\]  
where \(\alpha\) is a simulation parameter applied to estimate the relative movement of a neighboring node to balance the accuracy and responsiveness of a mobile node link status, due to the rapid changes in network topology and fluctuation of the wireless communication conditions. Based on our simulation experiments, we found that the best value for \(\alpha\) is 0.7.