Can RL rediscover a simple streaming rule?
Adaptive bitrate (ABR) streaming balances video quality against stalls. In this controlled simulator, reinforcement learning (RL) learns to choose between two bitrates.
The test: Does the policy learn to favor a higher bitrate as the playback buffer fills?
Adjust the stall penalty and learning rate, then press Train. Click the heatmap to change the starting policy.
Return landscape
Each point is a policy with weight w and bias b. Brighter means higher expected return. The orange line is the optimization path; the dot marks the selected step.
Bitrate policy
The probability of choosing each bitrate at the selected step. A full buffer holds 60 seconds of video.
Drag to pause and inspect earlier steps. Each run ends at 10,000 steps; Train again starts fresh.
Initial policy: Preparing the experiment.
The controlled ABR experiment
Two failure modes: unstable optimization paths and distorted return landscapes.
Change the optimization path
Change the learning rate or starting point to compare optimization paths on the same landscape.
Change the return landscape
Change the stall penalty to see how the return landscape shifts.
Setup and reward
Each episode has 8 four-second chunks, two bitrates (2.85 and 4.3 Mbps), and a 60-second buffer. Playback stalls when buffered video runs out.
Return is the expected total reward per episode, averaged across 7 constant-bandwidth network traces: 3, 3.5, 4, 4.5, 5, 5.5, and 6 Mbps.
Reward per chunk = bitrate / 4.3 − stall penalty × stall seconds / 4
How RL learns
With parameters , buffer state ( in seconds), and sigmoid :
REINFORCE uses episodes of chunks to estimate the policy gradient:
is the bitrate choice; is the chunk reward. Updates use Adam with a small entropy bonus.
Failure modes
F1: Unstable optimization paths. A high-return ridge exists, but optimization misses it.
F2: Distorted return landscapes. Reward or trace changes shift the high-return region toward undesirable policies.