← All challenges
CHALLENGE 05GameNEW

The claw machine.

A crane game you can actually play: the claw only takes what is under it, the grip can slip, and ten credits go fast.

Hold ◀ ▶ to line up the claw, then drop. Ten credits. Arrow keys and Space work too.

Each work is the model’s own file, run in an isolated sandbox: no network, and no access to anything on this site.

Qwen 3.8 · 27B

LOCAL
Harness
DeepSeek Harness · Splash · 2026-11
Effort
One pass, then one fix round after testing itself with headless-browser scripts it wrote · 1 h 52 min · thinking low · 1 nudge at 1 h 50 min, when it was re-checking its own test scripts: “the game is fine, stop checking the test scripts, wrap up and write run.json”
File
One HTML file, 37.1 KB
Note
Run on this Mac (48 GB) in DeepSeek Harness, with the Splash engine for Qwen3.8-27B (4-bit, DFlash 2 speculative decoding). The file is exactly what the model wrote.

26/26checks passed · rank 1 (tied)

Everything a script can verify from the brief passed.

Ranking

What works, and what people like.

Loading votes…

  1. =1 LOCAL 26/26 —
  2. =1 CLOUD 26/26 —

No login. One vote per browser; change it any time. Play first, then vote.

Rank is checks passed; ties go by votes; ★ is the crowd favourite.

All 26 checks, work by work3 runs each · 2026-11-10

Each check comes from a sentence in the brief and is settled by a script driving the page in a headless browser, not by reading the source. It measures whether required behaviour works, not whether the result is beautiful or fun. Download this checker

CheckQwen 3.8 · 27BClaude Fable 5.2
Hooks: the six required elements existpassedpassed
Hooks: clawGame.getState() has the specified shapepassedpassed
Starts with 10 credits and 0 wins, shown as bare numberspassedpassed
At least 12 prizes of at least 4 kindspassedpassed
Two fresh games start with different pilespassedpassed
Holding a direction button moves the claw for as long as it is heldpassedpassed
The other button moves it backpassedpassed
The claw reaches both limits and stays inside the cabinetpassedpassed
ArrowRight and ArrowLeft move the clawpassedpassed
A drop is an animated sequence of phases, not a jumppassedpassed
A drop costs exactly one creditpassedpassed
A drop over the chute comes back emptypassedpassed
Space drops the clawpassedpassed
Controls are locked during a droppassedpassed
At 0 credits the game is over: drop disabled, New game offeredpassedpassed
New game resets credits, wins and the pilepassedpassed
A drop centred over a prize can grab itpassedpassed
A grabbed prize was under the clawpassedpassed
A prize released into the chute is won and leaves the pilepassedpassed
The win counter matches the statepassedpassed
The grip can slip: a held prize fell back into the pilepassedpassed
No sideways page scroll at 1440×900 or 390×844passedpassed
Phone size: the three control buttons are at least 44×44pxpassedpassed
Touch: holding an on-screen button moves the clawpassedpassed
No network requestspassedpassed
No console errorspassedpassed
Passed26/2626/26
Read this before trusting the ranking

A new challenge. The brief names the hooks a script needs, so every model is checked the same way. Both works got the same brief and the same extra notes (write once, test yourself, fix at most 3 rounds); Claude Fable 5.2 ran in Claude Code, Qwen 3.8 in DeepSeek Harness on this Mac. The checker cannot tell whether a centred grab holds more often than an edge grab; that takes hundreds of drops.

Each model has one work here. A rank describes that work, not the model in general.

THE BRIEF

The brief every model got.

PROMPT.TXT

The complete brief. Every model gets exactly this text.

Initial task · verbatim
Create a single-file, playable browser claw machine (an arcade crane game).

Output ONE file named index.html — all CSS inline in <style>, all JS inline in <script>. No external dependencies, no build step, no images, fonts or audio from the internet. Draw everything with Canvas 2D, CSS or inline SVG.

## The machine (all of this must actually work, not just be drawn)
1. A cabinet seen from the front: a glass box, a pile of at least 12 prizes on the floor, a prize chute on one side, and a claw hanging on a cable from a rail at the top.
2. Prizes are little characters or objects drawn in code — at least 4 different kinds, in different sizes. Their starting positions are randomized with `Math.random()` on every new game, so no two games start with the same pile. No prize starts above the chute.
3. Controls: the claw moves left or right for as long as a control is held — on-screen left and right buttons that work with mouse AND touch, plus the ArrowLeft and ArrowRight keys. A DROP control: an on-screen button, plus the Space key. The claw cannot leave the cabinet.
4. A drop is a real sequence animated with `requestAnimationFrame`: the claw descends, closes, lifts, carries to the chute, opens, and returns. The controls are locked until it is over. No instant jumps.
5. Grabbing is decided by geometry, not by a dice roll alone: the claw can only pick up a prize that is actually under it when it closes. A drop over empty floor, or over the chute, must always come back empty.
6. The grip is imperfect, like the real thing. A held prize hangs and swings as the claw moves, and it can slip and fall back into the pile. How well the claw was centred over the prize must change the chance of keeping it: a centred grab holds more often than a grab at the prize's edge. A prize that falls lands back in the pile and can be grabbed again.
7. A prize released over the chute is won: it leaves the pile, appears on a "collected" shelf, and the win counter goes up.
8. Credits: a game starts with 10 credits and each drop costs 1. At 0 credits the drop control is disabled and a game-over panel shows how many prizes were won, with a "New game" button that resets the credits, the counter and the shelf, and re-randomizes the pile.

## Feel (attempt these; a working machine comes first)
- The pile behaves like a pile: prizes rest on the floor or on each other, and when one lands or is pulled out, its neighbours settle or get nudged instead of floating in place.
- The cable gets longer and shorter; the prongs visibly open and close; a held prize hangs from the claw rather than being glued to a point.
- Small touches that make it feel like an arcade: a flourish on a win, a wobble on a near miss, a marquee or lights. Sound is not required.

## Hooks for automated checking — required, with these exact names
The page must expose its real state so a script can check it without guessing at your layout.
- Elements: `id="btn-left"`, `id="btn-right"`, `id="btn-drop"`, `id="btn-new"` (the New game button; it may stay hidden until the game is over, but it must exist), `id="credits"` and `id="wins"` (their text content is the number and nothing else).
- `window.clawGame.getState()` returns a plain object at any time:
  `{ phase, clawX, chuteX, credits, wins, prizes, held }`
  - `phase`: one of `"idle"`, `"dropping"`, `"closing"`, `"lifting"`, `"carrying"`, `"releasing"`, `"returning"`, `"gameover"`.
  - `clawX`: the claw's horizontal position, from 0 (its left limit) to 1 (its right limit).
  - `chuteX`: the `clawX` value at which the claw releases over the chute.
  - `prizes`: an array of `{ id, kind, x, y, inPile }`. `x` is on the same 0–1 scale as `clawX`, so a claw at `clawX === x` is centred over that prize. `y` runs from 0 (top of the cabinet) to 1 (the floor). `inPile` becomes false once the prize is won.
  - `held`: the `id` of the prize the claw is holding, or `null`.
- This must be the state the game really runs on. A separate object that does not match what is on screen is a fail.

## Layout and access
- Works at 1440×900 and at 390×844 with no horizontal page scrolling. At the phone size the on-screen buttons are at least 44×44px.
- Every control can be reached and used from the keyboard, with a visible focus ring.
- Respect `prefers-reduced-motion`: decorative lights and flourishes stop; the game still plays.

## Style
Yours to choose — but give it a point of view. A claw machine is a charming object; make one that people want to play twice. Keep the counters clean and readable.

Write only index.html. No commentary, just create the file.