This is the 2D companion to the 3D cognitive-radio waterfall, computed independently rather than a flattened render of the 3D scene. It keeps the same core Q-learning / ε-greedy dynamic-spectrum-access mechanism, but adds two things the 3D version doesn't model — configurable bursty (Markov) primary-user traffic instead of only fixed-probability draws, and ε-decay so exploration can shrink automatically as the agent learns — and it visualises the process across three linked panels instead of one 3D scene: a scrubbable spectrum-history strip, a live Q-value bar chart, and a rolling throughput/collision strip chart.
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)
bursty traffic (2-state Markov chain per channel, stationary rate = load):
a = P(busy → busy) = persistence slider
b = P(idle → busy) = load·(1−a) / (1−load) (solved from the balance equation
load = load·a + (1−load)·b)
ε-decay (optional): ε_eff = max(ε_min, ε · e^(−slots/τ)), τ = 200 slots, ε_min = 2%
Action selection is ε-greedy on the effective exploration rate: with probability ε_eff the agent tries a uniformly random channel; otherwise it exploits the channel with the highest current Q-value (ties broken toward the lower index). A bursty traffic model with high persistence makes a channel's busy/idle state correlated slot-to-slot — occupied channels tend to stay occupied for a run of slots rather than flickering independently — which is a much closer match to how real licensed users actually occupy a band.
- Channels — how many independent frequency channels the agent must choose among; more channels mean more exploring before Q-values are trustworthy.
- Primary-user traffic load — the long-run fraction of slots each channel is busy; higher load leaves fewer safe channels to find.
- Traffic model / persistence — switch between independent per-slot draws and a bursty Markov chain whose persistence controls how "sticky" a busy or idle run is.
- Exploration rate ε & decay — how often the agent probes randomly instead of using its learned values; decay lets it explore hard early and settle into exploitation later.
- Learning rate α — how strongly each new outcome moves a channel's Q-value; low α averages over many slots, high α reacts fast but noisily.
- Drag the waterfall up or down to scrub through recent history without interrupting the simulation; ⏺ Jump to live snaps back to the newest slot.
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, and adapting as traffic patterns become more or less bursty, rather than being statically assigned one channel.