Research Article

Optimal Channel Selection Based on Online Decision and Offline Learning in Multichannel Wireless Sensor Networks

Algorithm 2

Channel selection based on -learning.
// Initialization
(1) Each sensor initializes its action space
(2) Each sensor initializes its -value
//Learning
(3) Sensor takes random action
(4) Sensor observes reward and state
(5)while () do
(6) for   to
(7) for   to
(8)if   is good
(9)
(10) else
(11)
(12)end if
(13) Sensor updates its -value according to (17)
(13)
(14)
(15) end for
(16) end for
(17)end while
(18) Choose from using policy derived from