Abstract-This paper studies the medium access design for secondary users (SUs) from a game-theoretic learning perspective. In consideration of the random return of primary users, a distributed SU access approach is presented based on an adaptive CSMA scheme, in which each SU accesses multiple idle frequency slots of a licensed frequency band with adaptive activity factors. The problem of finding optimal activity factors of SUs is formulated as a potential game, and the existence, feasibility and optimality of Nash Equilibrium (NE) are analyzed. Furthermore, to achieve NEs of the formulated game, learning-based algorithms are developed in which each SU independently adjusts its activity factors. Convergence properties of best-response dynamics and log-linear dynamics are studied. Subsequently, by learning other SUs' behavior from locally available information, the convergence with probability 1 to an arbitrarily small neighborhood of the globally optimal solution is investigated by both analysis and simulation.