We address an anti-jamming strategy of channel access for secondary user in a cogntive radio network when some idle channels of the primary user are being jammed in each time slot. Given the secondary does not know what idle bands are under attack, using our method it tries to choose the best possible channel in each time slot to avoid the jammer. We show this problem can be formulated as a multi-armed bandit process and compare the results of different approaches for channel selection including
-first, and random. Simulatons verify that our method results in selecting channels with an average of almost 50% improved signal to noise ratio (SNR) over randomly selected channels.