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.
Results
12 setups · the middle run of eachsort
Press “+ Compare” on two results to put them side by side.Claude Haiku 5.5low14/15
cost $0.027time 3m48s
GPT-6.1 Solmedium14/15
cost $0.13time 3m48s
GPT-6.1 Solhigh14/15
cost $0.15time 4m39s
Claude Sonnet 5.5high14/15
cost $0.73time 8m58s
Claude Opus 5.5medium14/15
cost $1.06time 8m19s
Claude Opus 5.5high14/15
cost $2.08time 15m25s
Claude Haiku 5.5max0/15
cost $0.26time 37m38s
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.
- Opens without a page error
- Test hooks present (getState, setGravity, pause, resume, reset)
- Visible canvas, at least 800×600
- Animation is alive (frames keep changing)
- Smooth: median frame time under 25 ms
- Starts by itself: balls fall and reach the bins
- At least 13 bins
- Counters add up (balls in bins ≤ balls dropped)
- Bell-shaped histogram (half the balls in the middle third)
- Pause freezes, resume continues
- Changing gravity changes the scene
- Reset empties the bins
- No uncaught exception during the session
- No console errors
- 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.