A Practical Guide to Systematically Evaluating LLM Coding and Reasoning Capabilities
This guide explains how to evaluate large language models beyond first impressions, covering how to build a testing protocol, verify gameplay mechanics in a 2D fighting game, validate constraint-based reasoning with a river-crossing puzzle, check core operations in a 3D voxel scene, and manage iterative bug-fixing—replacing single rankings with multi-dimensional, engineering-grade assessment.
1. Don’t Judge a Model by “First-Impression Wow Factor”
LLM-generated programs are often impressive at first glance: complete interfaces, substantial codebases, rich feature descriptions, and even interactive scenarios that appear runnable in one shot. But visual completeness is not engineering reliability. A game may have dazzling skill effects yet fail to jump correctly. A 3D scene may have continuous terrain but move in the wrong direction. A reasoning answer may have clear steps yet violate constraints midway.
Therefore, the focus of evaluation should not be “which model looks stronger,” but whether the model can turn requirements into correct implementations, sustain constraints over time, and perform effective repairs when given feedback.
From an engineering perspective, three capabilities must be distinguished:
- Generation capability: Can it construct reasonable code, interfaces, mechanics, and explanations?
- Constraint maintenance: Can it consistently honor key conditions across long outputs and complex tasks?
- Verification and repair: Can it identify error causes, fix the relevant logic, and avoid introducing new problems?
These capabilities do not necessarily develop in sync. A system with strong generation ability may still miss basic features. Rather than attributing this to some internal “attention deficit”—which external testing cannot usually establish—it is more accurate to say: in a specific task, requirement omissions, inconsistent state maintenance, or constraint enforcement failures occurred.
2. Build an Evaluation Protocol Before Generating Anything
1. Decompose natural-language requirements into acceptance criteria
“Make a fun game” has no clear acceptance boundary. A more reliable approach is to split requirements into features, rules, and quality.
Take a 2D fighting game as an example:
- Features: movement, basic attacks, blocking, double jump, dodging, and multiple elemental skills.
- Rules: attacks have hit ranges, skills have cooldowns, dead characters cannot keep attacking.
- Quality: stable input response, consistent animation and hit detection, no noticeable stutter during long runs.
Each requirement should map to a concrete test. For example, “supports double jump” should not just check whether a jump-count variable exists in the code—you must verify that the character can initiate a second jump in mid-air, that a third input is blocked, and that the count resets correctly upon landing.
2. Define the boundary between one-shot and iterative generation
A first-shot result and a result after multiple rounds of fixes represent different workflows and must not be mixed in statistics.
Record separately:
- Whether the first output can launch at all;
- How many acceptance criteria the first output satisfies;
- How many rounds of feedback the repairs required;
- Whether repairs introduced regressions;
- Whether the final result still required manual changes.
If a result went through extensive manual debugging and modification, its quality cannot be fully attributed to the model. Conversely, the ability to reliably fix problems based on accurate feedback is itself a capability worth evaluating independently.
3. Fix test conditions and keep complete records
Testing should hold the prompt, available tools, runtime environment, external dependencies, and time limits as fixed as possible. For stochastic generation processes, run repeated tests rather than cherry-picking the most successful attempt.
Records should include at least the original requirements, complete outputs, runtime errors, test steps, screenshots or recordings, and each round of fix feedback.
Small-sample results only describe performance in that specific test. A majority of successes across a few attempts does not prove a stable high success rate on similar tasks. A rigorous evaluation should broaden task coverage and report both sample sizes and failure types.
3. 2D Fighting Game: Check the Mechanics Loop, Not the Number of Effects
A 2D game is well suited for testing whether a model can coordinate input, animation, collision, combat rules, and enemy behavior. The task is moderate in size, but the modules have many interdependencies.
1. Manage character behavior with a state machine
A character should not be just a collection of independent booleans. If “attacking,” “blocking,” and “dodging” can all be true simultaneously, you get invincible attacks, overlapping actions, or states that cannot be exited.
Organize the main actions as a state machine:
Idle ↔ MoveIdle or Move → Jump → Airborne → LandIdle or Move → Attack → RecoveryIdle or Move → BlockActionable state → Dodge → RecoveryAny alive state → Hitstun → RecoveryHealth reaches zero → Dead
State transition conditions must also be defined: can a dodge interrupt an attack, does being hit cancel a skill, can the character move while blocking? Rules need not be complex, but they must be consistent.
Airborne and attacking states may coexist. In that case, manage the “movement state” and “combat state” separately rather than forcing every combination into one giant state machine.
2. Separate visual effects from actual hit detection
Fire appearing on screen does not mean the skill mechanic is complete. Each skill should define at minimum: trigger condition, area of effect, duration, damage or control effect, cooldown, and resource cost.
Attack hitboxes should not simply equal the character’s drawn sprite. Typically, distinguish:
- Body collision area;
- Hittable area;
- Attack hitbox area.
Also prevent a single attack from repeatedly damaging the same target across consecutive frames. Maintain a set of already-hit targets per attack, or use explicit damage-over-time intervals per the design.
3. Check whether enemy behavior is explainable
An enemy constantly moving toward the player only proves tracking logic exists; it does not mean it has proper combat behavior.
A basic but complete enemy decision loop can include approach, keep distance, attack, retreat, and hit recovery. Transitions should be based on observable information: distance, cooldowns, health, and player actions.
When testing, focus on: does the enemy deal damage beyond attack range, does it ignore its own recovery frames, and can it chain attacks without any gap? These issues usually affect gameplay far more than the number of skills.
4. Turn “game feel” into checkable factors
Game feel is subjective, but it can still be decomposed into input responsiveness, action feedback, speed changes, hitstop, camera follow, and similar factors.
For example, unnatural jumping may come from weak gravity, unstable landing detection, or input only being read on certain frames. A test report should describe the phenomenon and its conditions, not just say “feels bad.”
4. River-Crossing Puzzle: Verify Verbal Reasoning with State Search
River-crossing puzzles are well suited for evaluating multi-constraint reasoning: they don’t rely on flashy output, and the correctness of an answer can be checked step by step.
Suppose the participants include a father, a mother, two sons, two daughters, an elder, and a dog. Only the three adults can row, the boat has a capacity limit, and certain members cannot be left together without specific supervision.
1. Clarify ambiguities in the problem statement first
Does “the boat holds two per trip” count the dog as a load unit? Does “someone is absent” mean not on the same bank, or not in the same space? Must supervision rules also hold during transit?
These interpretations affect legal moves and the final answer. The evaluation must settle them in advance, or different solutions may be solving different problems.
One explicit test convention: each trip carries at most two entities and includes at least one rower; members on each bank must always satisfy safety conditions, and passengers in the boat are also checked per the agreement.
2. Represent positions as verifiable states
A state can be described by which bank each member is on, plus the boat’s position. Every move must be checked for:
- The boat’s position matches the departure bank of its passengers;
- Passenger count respects the capacity limit;
- At least one passenger can row;
- Combinations on the departure bank, arrival bank, and (where applicable) in the boat are all legal.
The search procedure can be summarized as:
Add the initial state to the queueLoop over states to check:If all members are on the target bank, return the pathEnumerate boarding combinations on the current bankCheck capacity, rowing eligibility, and safety constraintsGenerate the post-move stateContinue searching unvisited legal states
When each crossing has equal cost, breadth-first search finds the solution with the fewest crossings.
3. Distinguish generating a solution from proving one
Once the model provides a set of steps, an independent checker should validate them step by step. The checker executes only the rules and does not accept abbreviated explanations like “obviously safe” or “the rest just wait.”
Each step should ideally list the boat’s passengers, the left-bank members, and the right-bank members. This directly exposes errors such as characters teleporting across banks, inconsistent boat positions, or illegal groups left behind.
If you want to test unassisted reasoning, explicitly forbid the model from invoking search or execution environments during answering—but the evaluator can still use an independent program to verify the answer. The two are not in conflict: the former defines the capability under test; the latter ensures accurate scoring.
5. 3D Voxel Scene: Prioritize Core Operation Correctness
A 3D voxel sandbox task tests coordinate transforms, collision detection, terrain generation, interaction picking, and performance management simultaneously. However, “include all major features” is a poorly scoped requirement that pushes the model toward feature sprawl.
A more sensible build order is: first implement movement, camera look, jumping, and block interaction; then add continuous terrain, time-of-day cycles, and weather effects.
1. Wrong movement direction is usually a coordinate-convention issue
3D movement must reconcile world coordinates, camera orientation, and input direction. Inverted forward/back often stems from a sign error in the forward vector, or confusing the camera’s look direction with the character’s movement direction.
Basic tests should cover multiple orientations: facing the initial direction, rotated 90 degrees, and rotated 180 degrees—pressing forward should always move the character along the horizontal projection of its line of sight.
Movement should also account for frame delta time:
position change = movement direction × speed × delta time
Otherwise, the same program will exhibit different movement speeds at different frame rates.
2. Jumping requires complete grounding and collision logic
Being unable to jump may not be a missing key handler—it may be that the grounded flag is always false, or that vertical velocity is reset to zero every frame.
Check whether jump input is recognized, whether it only triggers under allowed conditions, whether gravity is continuously integrated, and whether velocity toward obstacles is correctly cleared on collision. Flight mode should be separated from ground movement so the two sets of rules don’t both modify position.
3. Block interaction needs spatial boundaries
Breaking blocks typically requires a spatial query along the line of sight. Placing blocks should use the hit face’s normal to determine the adjacent position, not directly overwrite the targeted block.
Additionally, restrict interaction distance and forbid placing blocks into the character’s own body space. Otherwise, a placement that looks fine in a demo may immediately cause the character to get stuck or produce collision errors.
4. “Infinite terrain” really depends on finite-range management
Continuously generated terrain does not mean keeping all terrain permanently in memory. The common approach is to divide the world into chunks, load only the region near the player, and unload distant data.
Performance optimization can proceed along these lines:
- Skip drawing internal faces fully occluded by neighboring blocks;
- Merge geometry and materials to reduce draw calls;
- Spread chunk generation across multiple update cycles;
- Keep generation rules consistent across adjacent chunk boundaries;
- Separate regenerable data from player modification records.
These strategies still require verification through actual runs. Tests should observe frame-time fluctuation, memory growth, and chunk-switch hitches during continuous movement—not just assume optimization works because a “chunk” variable exists in the code.
6. Repair Feedback: One Clear Problem at a Time
Handing the model a combined request to fix movement errors, broken jumps, textures, weather, lighting, and terrain expansion simultaneously dramatically widens the change scope and makes failure causes hard to trace.
Use staged feedback instead:
Stage 1 fixes fundamental correctness: only movement, jumping, collision, and interaction.
Stage 2 improves structure: state management, chunk loading, and data persistence boundaries.
Stage 3 adds visual and experiential features: lighting changes, weather, and finer materials.
Each feedback round should include reproduction steps, actual results, expected results, and which existing functionality must not break. For example: “After the character turns, the forward input moves opposite the horizontal line of sight; please fix the direction calculation while keeping lateral movement speed and collision behavior unchanged.”
After each fix, re-run the core tests. Solving one problem while breaking another is a classic regression and cannot count as a successful repair.
7. Use Multi-Dimensional Results Instead of a Single Ranking
The final report can evaluate requirements coverage, functional correctness, constraint reasoning, maintainability, runtime stability, and repair efficiency separately. For results that fail to launch, break basic interaction, or violate hard constraints, set critical-failure flags so a polished interface cannot mask serious defects.
Evaluation conclusions should also be scope-limited: a single test only demonstrates how a particular configuration performs on a particular class of tasks—it does not directly establish a universal capability ranking.
For developers, the most valuable conclusion is not “how much code a model can generate,” but whether it can complete tasks within clear boundaries, whether its output is easy to verify, and whether it converges reliably after errors. Turning requirements into acceptance criteria, checking results with independent rules, and controlling change scope through small iterative steps are what allow LLM generation capabilities to genuinely enter a manageable engineering workflow.
