Animate a junction where cars obey a traffic light's timed sequence in one self-contained HTML file
Exact prompt
# Animate a junction where cars obey a traffic light's timed sequence in one self-contained HTML file Make a small animated scene: a road junction with a traffic light. Write one file, `out/scene.html`, that works opened straight from disk with no network access. `spec.json` gives the page title, the stage size and the scene parameters. **Looks are not scored**: the page is opened in a headless browser (800x600 window, UTC time zone, network blocked) and checked by objective tests only. ## Scene contract - Draw the scene on one `<canvas>` or `<svg>` stage of `width` x `height` CSS pixels (spec.json), visible on load, with `<title>` containing spec.json `title`. - Animate continuously from load (`requestAnimationFrame` or timers); no click is needed unless stated below. - Expose `window.sceneState()`, returning the scene's current state in stage pixel coordinates (origin top-left of the stage): `{light: <the light showing now, one of the spec.json phase names>, cars: [{x}, ...]}`. Extra fields are fine. It must describe what is actually drawn. - Cars drive left to right along one lane; `x` is the front of the car in stage pixels and may wrap back to the left edge after a car leaves the stage. The light runs through `phases` in the order given, starting at the first phase on load, each for its `s` seconds, then repeats. Cars may only cross `stop_line_x` on green; on any other phase they stop at the line or queue behind the car ahead. Keep the traffic dense enough that a car is waiting at the line during the non-green phases. - The page must log no errors and throw no exceptions. Keep the file at most 200,000 bytes; no external scripts, fonts, images or URLs (inline everything). ## Checks (partial credit = share passed) 1. `self_contained`: `out/scene.html` exists, is at most 200,000 bytes, references no http(s) or protocol-relative URL, and requests nothing from the network when opened. 2. `has_canvas_or_svg`: a visible `<canvas>` or `<svg>` of at least 300x200 CSS pixels is on the page. 3. `frames_change`: over 3 s, some later screenshot differs from the first in at least 0.1% of pixels, and at least 3 of 30 screenshots differ. 4. `light_sequence`: over 3 s `sceneState().light` only takes spec.json phase names, changes only to the next phase in spec.json order (wrapping round), changes at least 3 times, and every phase seen from its start to its end lasts its `s` seconds within 0.25 s. 5. `cars_obey_lights`: `cars` has exactly spec.json `cars` entries; between two samples a car's x only goes from below `stop_line_x` to at or above it when the light is green in one of the two samples; some car moves while the light stays green, and some car waits (moves under 0.5 px) within 60 px before the stop line while the light stays on a phase other than green. 6. `no_console_errors`: no uncaught exception, `console.error` or browser error is logged during the run. ## How this run works - Work on your own: nobody will answer questions in this task, and writing to `ask/` counts against the run. - Write only under `out/`. Create `out/` if it is missing. Inputs are synthetic; don't fetch anything from the network. - Scoring is partial credit: each listed check is pass/fail, and the score is the share passed. Numbers are compared to within 0.005 unless the task says otherwise.
Make a road junction with a traffic light animation as one self-contained HTML file. A headless browser checks objective facts only: the file is offline and small, a canvas or SVG stage is drawn, frames change, the scene follows a timed specification (light sequence; cars obey lights) and nothing errors. A poster PNG and a short MP4 are captured for the gallery. Looks are not scored. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).
Success criteria: self_contained has_canvas_or_svg frames_change light_sequence cars_obey_lights no_console_errors
Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.02, 2m). Best AI model for Creative / Animated Scene (one HTML File) →
Latest output per model
All runs (6)
100% pass rate across 6 eligible runs: 6 pass, 0 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ
| Model | Cost | Time | Step-insⓘ | Autonomy | Outcome | Trustⓘ | Date | Compare |
|---|---|---|---|---|---|---|---|---|
| GGemini 3.8 Flashmedium · thinking on | $0.50 | 4m | 0 | Fully autonomous | pass | Trust 80% | 2026-10-23 | |
| GGemini 4 Argonmedium · thinking on | $0.22 | 3m | 0 | Fully autonomous | pass | Trust 80% | 2026-10-23 | |
| OGPT-6.1 Soldefault · thinking on | $0.03 | 52s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-23 | |
| AClaude Opus 5.5default · thinking on | $0.22 | 54s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-23 | |
| AClaude Haiku 5.5default · thinking on | $0.02 | 2m | 0 | Fully autonomous | pass | Trust 80% | 2026-10-23 | |
| AClaude Sonnet 5.5default · thinking on | $0.07 | 25s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-23 |
Embed this result
A live badge for this use case. It links back here and updates as new runs are published.
Get new runs and ranking changes weekly
Which models got better or cheaper on real tasks like this one.