Visualizes the online decision model using a streaming-day scenario (ski rental): input arrives day by day, the online algorithm must commit (rent vs BUY) without future knowledge, while OPT is a clairvoyant offline benchmark that knows the stopping day T. The animation alternates adversarial stopping times to show worst-case behavior and displays the competitive inequality and the resulting cost/OPT ratio against a highlighted competitive bound c.
Implements a deterministic ski-rental instance with buy cost B and online threshold k=B. Each animation cycle reveals the input stream up to an adversarially chosen stop day T, then compares ONLINE cost vs OPT with animated bars and a ratio dial. Uses grid snapping for a blocky aesthetic, green-on-black palette, and time-based easing for smooth transitions.