Skip to content

Animate two carts of different mass bouncing elastically on an air track in one self-contained HTML file

Exact prompt

# Animate two carts of different mass bouncing elastically on an air track in one self-contained HTML file Make a small animated scene: a air track with two carts. 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): `{carts: [{name, x, v}, ...]} (x = left edge of the cart along the track, 0..track_px - cart_width_px; v in px/s, positive = right)`. Extra fields are fine. It must describe what is actually drawn. - At time 0 (`performance.now()` 0) cart A and cart B are at their spec.json `x` with velocity `v`. There is no friction. Cart-cart collisions are perfectly elastic with the given masses, and both ends of the track bounce a cart back at the same speed. `sceneState()` must return the state at the moment it is called. - 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. `motion_between_collisions`: `carts` names exactly A and B; between samples where neither velocity changes each cart moves v × Δt within 1.5 px; carts stay on the track and never overlap (by more than 0.5 px). 5. `elastic_collisions`: when only one cart's velocity changes between samples it reverses at an end stop (within 1%); when both change, the new velocities match a perfectly elastic collision of `mass_kg` A and B within 2% of |vA| + |vB|; at least one cart-cart collision is seen in 3 s. 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 air track with two carts 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 (motion between collisions; elastic collisions) 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: Passes the case's automated scorer (hidden tests / answer key, run after the agent finished).

Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.0089, 10m). Best AI model for Creative / Animated Scene (one HTML File) →

Latest output per model

Run this on another model

All runs (3)

67% pass rate across 3 eligible runs: 2 pass, 1 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
AClaude Opus 5.5default · thinking on$0.2041s0Fully autonomouspassTrust 80%2026-10-23
AClaude Haiku 5.5default · thinking on$0.008910m0Fully autonomouspassTrust 80%2026-10-23
AClaude Sonnet 5.5default · thinking on$0.0619s0Fully autonomouspartialTrust 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.

UseCaseRank badge for Animate two carts of different mass bouncing elastically on an air track in one self-contained HTML file

Get new runs and ranking changes weekly

Which models got better or cheaper on real tasks like this one.