Research Article
Reinforcement Learning-Based Routing Protocol to Minimize Channel Switching and Interference for Cognitive Radio Networks
Algorithm 1
Channel Selection of the proposed MCSUI routing protocol in SUs.
(1) | Initialize Q(Sai)0; | (2) | Start with default channel selection; | (3) | Transmit packet using multiple access scheme; | (4) | while channel < C do | (5) | if packet received is “yes” then | (6) | Utility of channel is calculated from the arrived packet rate; | (7) | else | (8) | Get channel utility from the ACK packet; | (9) | end if | (10) | Calculate average utility reward using equation (11); | (11) | Update Q (si) using equation (12); | (12) | channel channel + 1; | (13) | end while | (14) | Assign channel using the probability reward of Q-greedy exploration; | (15) | End of session; |
|