PREVIEW · the site is new and still changing
Nerdict
← TestsPhysics simulation

Galton board

Build an interactive Galton board: balls fall through a grid of pegs into bins and form a bell curve, with real physics and live statistics.

Same prompt for every model, one shot. A robot checks 15 things the model never sees. What it checks ↓ · The prompt ↓

Results

12 setups · the middle run of each
sort
Press “+ Compare” on two results to put them side by side.

Anthropic models run in Claude Code 2.1.296 · OpenAI models run in Codex CLI 0.162.0 · no harness of our own (yet) · why it matters

What the robot checks

The same 15 items for every model, written from the prompt. Scores are always out of 15, even when a page breaks halfway.

  1. Opens without a page error
  2. Test hooks present (getState, setGravity, pause, resume, reset)
  3. Visible canvas, at least 800×600
  4. Animation is alive (frames keep changing)
  5. Smooth: median frame time under 25 ms
  6. Starts by itself: balls fall and reach the bins
  7. At least 13 bins
  8. Counters add up (balls in bins ≤ balls dropped)
  9. Bell-shaped histogram (half the balls in the middle third)
  10. Pause freezes, resume continues
  11. Changing gravity changes the scene
  12. Reset empties the bins
  13. No uncaught exception during the session
  14. No console errors
  15. No network attempts

The prompt

Sent as is to every model. Test v1 · checks v1: any change makes a new version.

Build an interactive Galton board (bean machine) physics simulation as ONE self-contained HTML file.

Hard rules
Read the whole prompt
Build an interactive Galton board (bean machine) physics simulation as ONE self-contained HTML file.

Hard rules
- Everything lives in a single HTML file: inline CSS and JavaScript only. No external URLs of any kind: no CDNs, web fonts, remote images or network requests. The file will be opened offline, straight from disk.
- It must run in a current desktop Chrome at 1920×1080 with zero console errors.
- Render with a <canvas> and requestAnimationFrame.

The simulation
1. Balls are released from a hopper at the top, fall under gravity, bounce off a triangular grid of pegs (at least 12 rows) and settle into bins at the bottom (at least 13 bins), stacking up so the bins form a visible bell-shaped histogram.
2. Real physics: velocity, gravity, collisions with pegs and walls, and restitution (bounciness). No pre-computed paths and no teleporting balls into bins.
3. Live statistics: balls dropped, balls in bins, and a theoretical normal curve drawn over the histogram.
4. Controls: drop rate, gravity, bounciness, pause/resume and reset.
5. It stays smooth (around 60 fps) with hundreds of balls on screen.
6. Make it visually striking, like a polished science-museum exhibit.

Testing contract (an automated tester calls these, so they must exist exactly)
- The main canvas has the attribute data-scene.
- window.nerdict = {
    getState() → { dropped: number, inBins: number, bins: number[], gravity: number, paused: boolean },
    setGravity(value), pause(), resume(), reset()
  }
- The simulation starts running by itself as soon as the page loads.

Output format: reply with the complete file inside a single ```html code block and nothing else.

Credit. Format inspired by BridgeBench's Design Bench (a fixed visual scene, results side by side with cost). Prompt and checks by Nerdict.