Research Article

WiFi Offloading Algorithm Based on Q-Learning and MADM in Heterogeneous Networks

Algorithm 1

WiFi offloading algorithm based on Q-learning and MADM in heterogeneous networks.
Input: state set , action set , paired comparison matrix , candidate network attribute matrix , and iteration limit
Output: trained Q-table, best action selection strategy , and user satisfaction
(1)Calculate attribute weights based on
(2)For ,
(3) = 0
(4)End For
(5)Randomly choose as the initialization state
(6)While iteration < 
(7) For each state
(8)  If  < 
(9)   Randomly choose an action
(10)  Else
(11)   Select the action corresponding to the maximum Q value in this state.
(12)  End If
(13)  Perform
(14)  Calculate according to equation (23)
(15)  Observe the next state
(16)  Update the Q-table according to equation (24)
(17) End For
(18)End While
(19)Record the action corresponding to the maximum Q value in each state into
(20)Calculate user satisfaction