Adaptive Channel Selection and Sensing based on Reinforcement Learning