
Teamwork builds
Most models here build games by fan-out: many agents each write a whole game alone, and the best are shown. Gemma is built a different way — a team collaborates on ONE game for a fixed wall-clock budget, improving it round after round.
Two design choices
1 · Context-calibrated team size. Run the build once with a single agent and measure the context it actually used; pad it 10%; divide the model's context window by that. That is how many full agent contributions fit in the window together — i.e. how many teammates the integrator can hold at once.
footprint = prompt_tokens + completion_tokens # one full game build padded = ceil(footprint * 1.10) # +10% buffer team_size = floor(context_window / padded) # agents that fit together
2 · Timed production loop. Each game gets a fixed wall-clock budget (Gemma: 20 minutes). The team does as many improvement rounds as fit. This normalizes across models and rewards inference speed — a faster model gets more rounds in the same clock, so speed shows up as a better final product.
The loop
Seed: the lead builds an initial complete game.
Each round: ① the lead critiques the blackboard and assigns the team distinct focus areas →
② workers each return a complete improved build, in parallel → ③ a merger integrates the best of them
into one game → ④ playability assertions validate it; a round is adopted only if it does not
regress. Repeat until the clock runs out — the final blackboard is the team's product.
The score is a floor (playability assertions passed), so round-over-round gains are qualitative — the merger accumulates audio, particles, polish, persistence — evidenced by the final game, not a rising number.
Gemma reference run
Calibration (window 262,144 · pad 1.10): Road Hopper footprint 5,232 → 45 · Maze 6,165 → 38. Team set to 32 (capped at the throughput Pareto knee — both context-feasible and GPU-efficient). DFlash spec-decode gives 227 tok/s single-stream, so the team fits several rounds in 20 minutes.
| Game | Team | Improvement rounds | Seed → Final | Build time |
|---|---|---|---|---|
| Road Hopper | 32 | 4 | 9 → 20 KB | 25 min |
| Robot-Filled Maze Shooter | 32 | 3 | 14 → 25 KB | 21 min |
Run it
The harness (calibrate_context.py + teamwork_build.py) talks plain
OpenAI /v1/chat/completions, so it works against any served model:
python3 calibrate_context.py --base http://HOST/v1 --model MODEL --window 262144 python3 teamwork_build.py --game road-hopper --team 32 --minutes 20 --out road-hopper.html
