Runtime Safety Monitor: Anomaly Detection & Fallback Switch
Interactive runtime-verification monitor for a learning robot: watch an EWMA divergence score between a corrupted policy and a verified-safe reference trajectory, tune the detection threshold and debounce window, and see when the monitor trips a hard switch to a safe fallback controller.
A wheeled robot patrols between two docks past a restricted zone using a potential-field policy whose hazard-avoidance gain degrades as you raise the perception-drift slider — modelling a sensor or perception fault rather than a hard-coded bug. An independent runtime monitor never inspects the policy itself; it only tracks how far the robot's actual trajectory diverges from a verified-safe reference ("ghost") running in parallel, folding that divergence into an EWMA anomaly score. Cross the tunable trip threshold for a debounce window of consecutive frames and the monitor hands control to the reference policy's own commands until the score settles back down — the same detect-and-switch pattern used by runtime-verification shields and supervisory watchdogs guarding learned robot controllers in the field.
Watch a degraded robot policy drift toward a restricted zone while an independent runtime monitor tracks its divergence from a verified-safe reference trajectory with an EWMA score, tripping a hard fallback switch once the tunable threshold and debounce window are exceeded.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install