Tetris, played by a local model
Four Qwen models play a complete Tetris game through POST /v1/systemone. Code knows the rules: it lists every legal move, simulates the outcome and presses the keys. The model makes every choice, with one output token per two pieces.
Play in the browser → Full test report · Source and recordings
| Result | Measured |
|---|---|
| Games that reached 10 line clears | 58 / 60 |
| Qwen3.8-27B per decision, compact prompt | 0.73 s median |
| Lines per game, Qwen3.8-27B | 38.2 · random picks 14.3 · reference 37.8 |
| Best score after 100 pieces | 15,262 · quality, compact, seed 202 |
Watch each model play
Seed 101, from the first piece to the tenth line clear. Waiting time is the measured round trip of each call.
Results after 100 pieces
| Profile | Lines · vision | Lines · compact | Call · vision | Call · compact | Agreement |
|---|---|---|---|---|---|
| fast · Qwen3.5-0.8B | 26.6 | 17.4 | 0.15 s | 0.03 s | 42% |
| balanced · Qwen3.5-4B | 35.8 | 33.0 | 0.65 s | 0.12 s | 73% |
| quality · Qwen3.6-35B-A3B | 38.2 | 38.2 | 0.91 s | 0.14 s | 84% |
| max · Qwen3.8-27B | 38.4 | 38.2 | 4.08 s | 0.73 s | 85% |
Five seeds per cell, 100 pieces per game. Agreement compares the vision-prompt decisions with a reference evaluator that never moves a piece. All 60 games →
Without a model
On the same pruned plans, a random pick tops out in 90 of 100 games and clears 14.3 lines. Always taking the first plan clears 16.0. The code narrows the choice; the model makes it.
How one decision works
- Enumerate. Code lists every placement of the falling piece and of the next one: usually 300–600 two-piece plans.
- Prune without weights. A plan is dropped only when another matches or beats it on every measured fact. About three remain.
- Ask once. One Choice question lists the plans with their facts: rows cleared, new holes, height. The vision prompt adds a lettered image of each outcome.
- Read one token. The answer is a full distribution over the plans; code presses the keys of the chosen one.
The compact prompt sends the rules as the state, which never changes, and only the pieces and short plan facts as the question. The API keeps the state cached, so each call reads about 75–100 new tokens. That is what brings a dense 27B model under a second.
Run it yourself
uv run openjev serve # balanced profile on :8000
uv run python examples/tetris/serve.py # browser game on http://127.0.0.1:8765
uv run python examples/tetris/play.py bench --seeds 101,202,303,404,505 --modes vision,compactMeasured on an Apple M3 Max with llama.cpp on Metal. Five seeds per configuration is a small sample; timings depend on the machine and its load.