Evaluating Interactive Mini-Game Generation and Multi-Round Repair Capabilities in LLMs
A practical evaluation framework for interactive mini-game generation: why a single playtest is misleading, which technical layers a playable game actually involves, seven scoring dimensions with acceptance cases, a reproducible test loop with pseudocode, and a repair strategy that fixes the broken link before touching visuals. Includes the metrics (first-round pass rate, post-repair pass rate, regression rate, average convergence rounds) needed before claiming one model family is stronger.
Evaluating Interactive Mini-Game Generation and Multi-Round Repair Capabilities
1. Why a Single “Mini-Game Generation” Playtest Is Not Enough
Interactive mini-games are a high-frequency scenario in LLM code generation evaluation because they touch nearly every layer of front-end engineering at once: rendering, entity state, input events, the game loop, rule adjudication, and UI layout. Compared with a single-file algorithm problem, a mini-game is much closer to real business work — multi-module coordination, state consistency, and interaction usability — which is why it is often used to observe a model’s overall engineering ability.
That same breadth makes a single playtest easy to misread. In sports mini-game generation tasks, common failures include inaccurate court markings and hoop drawing, characters that cannot move, action buttons that cannot be clicked, and games that never start. After several repair rounds, regression problems appear — fixing one thing breaks another — and player entities sometimes get deleted outright. A different kind of output may already support basic movement and an auto-demo mode, yet still have clear problems with court layout, movement speed, and overall watchability.
These observations point to one conclusion: a single generation result only reveals the failure modes under one task specification; it cannot be used to infer a model’s overall strength. Answering “is this class of model stronger?” requires breaking the question into measurable dimensions and comparing under identical task specifications, identical repair budgets, and identical acceptance criteria.
2. Breaking Down the Scenario: The Technical Layers of an Interactive Mini-Game
A playable sports mini-game involves at least the following layers:
- Scene and layout rendering — court dimensions, boundaries, markings, and the position and proportions of static elements such as hoops or goals.
- Entity and state management — initialization and updates for characters, the ball, the score, timers, and the current game phase.
- Input event binding — actions such as shooting, passing, and stealing must be reachable by click or keypress and must map correctly to the intended game action.
- Game loop and rule adjudication — frame updates, collision detection, scoring logic, and end conditions.
- UI and feedback — button states, prompts, commentary, and auto-demo mode.
- Maintainability — whether the code structure makes problems easy to locate, changes minimal, and regression checks cheap.
The failures seen in a hands-on session map cleanly onto three categories: “buttons don’t respond” is an input-binding problem, “the character won’t move” is a state initialization/update problem, and “the character disappears after a bug fix” is an entity lifecycle problem. None of these are merely “bad drawing” — they mean the interaction chain and the state chain never close the loop.
3. Evaluation Dimensions: From “Looks Right” to “Playable, Fixable, Maintainable”
Score at least the following dimensions, each with its own acceptance cases:
- Functional completeness — can the game start, can the character move, do actions take effect, can scoring be determined.
- Interaction usability — are buttons clickable, are events bound, does input produce feedback, are there deadlock states.
- Visual correctness — do court proportions, marking positions, and hoop/net rendering match the specification.
- State consistency — do character, ball, score, and phase stay in sync; do entities disappear after a repair.
- Multi-round repair stability — do issues converge within a fixed number of rounds, and are regression defects introduced.
- Code maintainability — are module boundaries clear, or is there hard-to-trace global state coupling.
- Observability — are there logs, assertions, and error messages that make root-cause analysis possible.
Multi-round repair stability matters most. Many outputs are not entirely unusable in round one; they degrade progressively during repair because no regression constraints are in place. Record the number of passing cases after each round, the number of regressions, and the round at which the task converged — not just a final screenshot.
4. A Reproducible Evaluation Loop with Pseudocode
Fix the task specification up front: canvas size, number of characters, action set, scoring rules, auto-demo requirement, and the number of repair rounds allowed. Acceptance cases should cover both the happy path and boundary paths. Example pseudocode:
taskSpec = {scene: "sports mini-game",requiredActions: ["move", "shoot", "pass", "steal"],requiredModes: ["manual", "autoDemo"],maxRepairRounds: 5}testCases = [{ id: "start", assert: gameStarted },{ id: "move", assert: playerPositionChanged },{ id: "shoot", assert: shootActionTriggered },{ id: "button", assert: allActionButtonsClickable },{ id: "score", assert: scoreUpdatesWhenGoal },{ id: "entities", assert: playerExistsAfterRepair },{ id: "layout", assert: courtLinesAndHoopInBounds }]for round in 0..maxRepairRounds:run(testCases)record(passCount, failIds, regressionIds)if allPass(testCases): breakrepairPrompt = buildRepairPrompt(failIds, logs, lastPatch)patch = model.generateRepair(repairPrompt)apply(patch)
An evaluation record should contain at least: first-round pass rate, post-repair pass rate, regression rate, average convergence rounds, and a classification of failure modes. Only when these metrics hold steady across multiple task families can “stronger” be discussed at all.
5. Multi-Round Repair Strategy: Locate the Chain First, Then Make the Smallest Change
Failed multi-round repair is usually not a matter of the model being unable to edit code; it is a matter of repairing in the wrong order. Recommended strategy:
- Make it startable and interactive first — fix initialization, event binding, and button clicks before visual details.
- Establish a minimal regression set — after every round, verify that the character exists, movement works, actions work, and the score can update.
- Locate by chain, not by symptom — for unclickable buttons, inspect event binding and z-order occlusion; for a character that won’t move, inspect state updates and input mapping; for a disappearing entity, inspect lifecycle handling and the render list.
- Keep changes minimal and revertible — change one chain per round, keep a patch record, and avoid broad rewrites that trigger regressions.
- Add assertions and logs — assert at critical state transitions and log input event triggers to improve observability.
In a cloud environment, a general-purpose container platform together with log services and monitoring/alerting can record and replay the evaluation process, but the core of the evaluation remains the standardization of task specifications, acceptance cases, and the repair protocol.
6. Answering “Is It Stronger?”: Ground the Conclusion in Metrics
“Stronger” should be defined as: under the same task family, the same repair budget, and the same acceptance criteria, does a class of model achieve a higher first-round pass rate, a lower regression rate, fewer convergence rounds, and better maintainability. Layout errors, broken interactions, and repair regressions observed in a single basketball mini-game session are only failure-mode samples; they do not prove overall capability.
A more rigorous conclusion comes from a reproducible evaluation set spanning multiple tasks and multiple rounds, with failure modes classified and counted. Developers should avoid substituting “how the screenshot looks” for acceptance cases, and avoid substituting “it worked after one fix” for evidence of stability. Only by closing the loop across generation, verification, repair, and regression can the interactive mini-game generation and multi-round repair capability of a model be evaluated credibly.
