Each slot, every channel is independently busy with a licensed primary user (PU) with probability equal to the traffic-load slider. A secondary user (SU) — the AI agent — must pick one channel per slot to transmit on without knowing PU occupancy in advance, only from its own past experience (this is classic cognitive-radio dynamic spectrum access).
The agent keeps one Q-value per channel and updates it after every attempt with the tabular Q-learning rule:
Q(ch) ← Q(ch) + α · [ r − Q(ch) ]
r = +1 if the channel was idle (successful transmission)
r = −1 if a primary user was already there (collision)
Action selection is ε-greedy: with probability ε the agent explores a uniformly random channel; otherwise it exploits the channel with the highest current Q-value. A high ε learns the busy pattern faster but wastes slots on collisions; a low ε converges to a good channel quickly if the traffic pattern is stable, but adapts slowly if it isn't.
- Primary-user traffic load — per-slot busy probability for every channel; higher load leaves fewer safe channels for the AI to find.
- Exploration rate ε — chance of a random probe instead of using the learned Q-values.
- Learning rate α — how strongly each new outcome moves a channel's Q-value; low α averages over many slots, high α reacts fast but noisily.
- Throughput / collision rate — the fraction of recent slots that ended in a successful transmission vs. a collision with a primary user.
Real-world relevance: this is the core mechanism behind AI-driven spectrum sharing in modern and 6G-era wireless networks — unlicensed or opportunistic radios sensing and learning which bands are free rather than being statically assigned one, improving overall spectral efficiency.