Evaluating LLM Coding Capabilities: From Visual Demos to Reliable Applications

    Evaluating code generated by large language models requires more than checking visual polish or a successful first run. Using sliding puzzles, 3D bowling, and maze reinforcement learning, this article explains how to assess rule correctness, state consistency, runtime stability, and algorithm effectiveness. It also outlines reproducible acceptance criteria and a development workflow that helps turn generated demos into usable, maintainable applications.

    1. Why First Impressions Are Not Enough

    In interactive application development, large language models (LLMs) can quickly generate layouts, animations, scenes, and control logic. That speed can create a misleading impression: if the page opens, the buttons respond, and the graphics look polished, the task must be complete.

    In practice, moving from a generated demo to a reliable application requires meeting at least four levels of requirements:

    1. Presentation: Text, graphics, lighting, and animation render correctly.
    2. Interaction: Inputs trigger the expected behavior, and pausing, resetting, or repeating actions does not cause errors.
    3. Rules: The program follows the task constraints rather than merely reproducing a similar appearance.
    4. Verification: Tests can reproduce key behaviors, failures can be diagnosed, and results have clear acceptance criteria.

    The trial observations behind this discussion illustrate a common pattern. Some tasks performed well in visual presentation and basic layout, but problems became more frequent when physics rules, coordinate synchronization across layers, and reinforcement learning interactions were involved. The difficulty of complex tasks is therefore not simply the amount of code. It is whether multiple subsystems share consistent state and constraints.

    These informal trials are useful for identifying failure types, but they do not establish that one model is generally better or worse than another. Task wording, the number of generation attempts, the runtime environment, and the extent of manual changes can all affect the outcome.

    2. Turn Subjective Feedback into Executable Acceptance Criteria

    “Looks good” and “does not run smoothly” describe an experience, but they provide little guidance for fixing a program. A more effective approach is to translate subjective feedback into observable, reproducible checks.

    Evaluation dimension Key question Typical checks
    Visual readability Can users distinguish objects and states? Check contrast, occlusion, viewing angles, and information hierarchy
    Rule correctness Do actions follow the task definition? Test valid actions, invalid actions, and boundary states
    State consistency Does the display match the internal data? Compare logical coordinates, display coordinates, and diagnostic information
    Runtime stability Do repeated operations cause failures? Repeatedly start, pause, reset, and run the application
    Algorithm effectiveness Does the output achieve the objective? Check paths, rewards, success rates, and evaluation results
    Maintainability Can errors be located and fixed locally? Review module boundaries, logs, and test coverage

    These dimensions should not simply be averaged. An interactive application is not usable if a critical interaction fails, regardless of its visual quality. Likewise, an algorithm demonstration is not successfully validated merely because its training curve changes substantially; it must produce an effective policy.

    3. Sliding Puzzles: Validate Layout, Rules, and Style Separately

    Sliding puzzles are useful baseline evaluation tasks because they combine two-dimensional layout, discrete state, and interaction constraints within a relatively manageable system.

    Drive the Board from Logical State

    A correct implementation should define the board data first and render graphics from that data. It should not treat the on-screen positions of pieces as the game state.

    For puzzles with pieces that occupy multiple cells, each piece needs at least a unique identifier, a logical position, and its occupied width and height. Every move must satisfy all of the following conditions:

    • The piece remains within the board after moving.
    • No other piece occupies the destination area.
    • The move follows the permitted direction and distance.
    • All occupancy relationships remain valid after the state update.

    Mouse dragging is then only an input method. A shared rule function determines whether a move is legal. Adding keyboard controls or an automatic solver later should not require reimplementing those rules.

    A Neat Layout Does Not Prove Complete Interaction

    Correct initial piece positions demonstrate only that initialization and basic layout work. Further checks should include:

    • Do pieces snap to valid grid positions when dragging ends?
    • Do invalid moves return pieces to their original positions?
    • Can rapid, repeated actions create overlaps?
    • Does reset restore the complete initial state?
    • Does the win condition use an explicit target definition?

    Synchronization between drag animation and logical state is particularly important. Visual objects may move through continuous positions, but their final state must remain on the discrete board. Intermediate animation values must not contaminate rule checks.

    Visual Style Is a Testable Requirement

    If a task specifies an ink-wash, wood-grain, or other visual style, translate that description into concrete acceptance criteria: background texture, edge treatment, color palette, typography, and motion timing.

    A model’s generated explanation that it “applied the requested style” is not evidence that the result meets the requirement. Assess the running application using screenshots and an explicit checklist.

    Styling must also preserve readability. Dense textures, faint boundaries, or excessive decoration can make pieces and empty spaces difficult to distinguish. Establish clear outlines and state indicators before adding decorative effects.

    4. 3D Bowling: A Complete Scene Does Not Prove Correct Physics or Gameplay

    A three-dimensional sports scene is more complex than a two-dimensional puzzle because visuals, geometry, collisions, and gameplay jointly determine the outcome.

    Keep Geometric Proportions Consistent

    A bowling scene includes at least a lane, a ball, a pin arrangement, a camera, and collision volumes. These components need consistent world units and size relationships.

    Excessive pin spacing, an implausibly sized ball, or collision volumes that do not match the visible geometry can produce something that looks like bowling but does not behave like it.

    However, a single throw that fails to knock down every pin is not sufficient evidence of an implementation error. A plausible chain of collisions also depends on impact location, speed, spin, friction, and collision response. A more reliable assessment is to:

    • Verify that the pin arrangement has reasonable geometric relationships.
    • Check that visible objects and collision bodies broadly match.
    • Repeat tests with fixed initial conditions.
    • Observe whether contact occurs and impulses propagate.
    • Check for penetration, floating objects, or pins falling without contact.

    Poor Visibility Is a Usability Problem

    A dark background can establish atmosphere. But if users cannot distinguish lane boundaries, pin outlines, or ball movement, the visual design obstructs the task.

    Improving readability does not necessarily require more elaborate effects. Start by adjusting:

    • Brightness contrast between foreground objects and the background.
    • Camera position and viewing angle.
    • Lighting around pin silhouettes.
    • Floor reflections and shadow intensity.
    • Placement of speed, direction, and result indicators.

    The criterion is not whether the scene has sophisticated lighting. It is whether users can accurately understand its current state.

    Simplified Physics Is Acceptable if Its Limits Are Clear

    A demo does not always need to simulate the full physical process. Simplified collisions and predefined animations can be appropriate, provided the implementation clearly distinguishes rule-calculated behavior from visual approximations.

    If fixed falling animations replace collision responses, the program may demonstrate an interaction flow, but it should not be presented as a physics simulation. Explaining those limits matters more than hiding them behind complex graphics.

    5. Maze Reinforcement Learning: A Test of Cross-Module Consistency

    A maze training application combines a map, environment transitions, a learning algorithm, animation, and a control interface. Each module may appear functional in isolation while incorrect connections make the overall application unusable.

    Validate the Environment Before Adding Learning

    The maze environment should expose explicit states and transition rules. In a simple grid maze, a state can be represented by a row and column, while actions correspond to permitted movement directions.

    Each action should return:

    • The next state.
    • The immediate reward.
    • Whether the next state is terminal.
    • Any necessary diagnostic information.

    Define wall collisions, out-of-bounds moves, and goal-reaching behavior in advance. If the environment is wrong, the learning algorithm may consistently optimize the wrong problem. Successful execution of training does not establish correctness.

    An Oversized Agent Often Indicates a Scaling Problem

    An agent that occupies too much of the display does not necessarily indicate a drawing-function error. The problem may be an inconsistent relationship between logical cells and screen pixels.

    Define cell size, map origin, and coordinate conversion consistently. For row r and column c, the screen position of the cell center can be expressed as:

    1. x = origin_x + (c + 0.5) × cell_size
    2. y = origin_y + (r + 0.5) × cell_size

    Derive the agent’s size from cell_size rather than assigning an unrelated value. This allows the map and agent to scale together when the window size changes.

    Terrain and Agent Layers Need the Same Coordinate Contract

    Misalignment between the agent and maze is a common failure in layered rendering. Possible causes include:

    • Reversed row and column order.
    • Different origins for different layers.
    • Scaling applied to only one layer.
    • Confusion between cell corners and cell centers.
    • A mismatch between layer dimensions and displayed window dimensions.

    Avoid fixing the symptom with an arbitrary visual offset. Instead, make terrain, agents, paths, goals, and value annotations share the same coordinate conversion function. Validate it against a few known grid positions.

    Trace Playback Failures Through the Execution Chain

    Playback can fail at the button event, mode transition, animation scheduling, or policy execution stage.

    Investigate in this order:

    1. Does the button event actually fire?
    2. Have the map and training state been initialized?
    3. Does the current mode permit execution?
    4. Does each action produce a valid next state?
    5. Does rendering read the latest state?
    6. Are there exceptions, infinite loops, or incorrect termination conditions?

    Also distinguish training, evaluation, and playback. Training updates value estimates, evaluation measures policy quality, and playback displays policy behavior. They can reuse the environment, but should not unconditionally share all control logic.

    6. How to Verify That Value Learning Works

    Displaying action values in grid cells can make the learning process easier to inspect. The presence of changing numbers, however, is not evidence of success.

    A common action-value update is:

    1. Q(s, a) ← Q(s, a) + α[r + γ max_a′ Q(s′, a′) − Q(s, a)]

    Here, α is the learning rate and γ is the discount factor. For a true terminal state, future value is generally excluded from the update. If an episode ends only because it reaches a step limit, handling depends on the task definition. All episode endings should not automatically be treated as equivalent.

    It is also important to distinguish three outcomes:

    • Value stabilization: Changes in the value table become smaller.
    • Policy stabilization: Selected actions stop changing frequently.
    • Improved task performance: The agent reliably reaches the goal.

    These outcomes are not equivalent. Values can stabilize under an incorrect reward definition, and a stable policy can consistently select invalid actions.

    A stronger verification method is to reduce or disable random exploration during a separate evaluation phase. Record goal completion, path length, invalid action count, and cumulative reward. For a fixed, unweighted grid maze, basic path search can also provide reachability and shortest-path references for assessing whether the learned result is reasonable.

    7. Repeated Fixes Should Not Become Aimless Rewrites

    Regenerating an entire program may eventually produce a working version, but it makes it difficult to determine how the problem was resolved. Fixing the agent’s size in one revision and breaking map rendering in the next is a typical sign of missing regression checks.

    Useful repair feedback should include:

    • Expected behavior.
    • Actual behavior.
    • Reproducible steps.
    • Visible errors or logs.
    • Previously passing functionality that must remain unchanged.
    • Acceptance criteria for the fix.

    Instead of saying “the agent is in the wrong position,” specify that “the logical state is in one cell, but the display places the agent in an adjacent cell; terrain and agent rendering must use the same coordinate conversion.”

    This narrows the scope of the change and reduces the likelihood that the model reconstructs the entire program.

    Rerun existing tests after every fix. Otherwise, a local improvement may come at the expense of functionality elsewhere.

    For LLM-assisted interactive applications, implement and validate the system from the inside out.

    Step 1: Define the Minimum Task

    Specify states, actions, termination conditions, and mandatory rules. Set decorative requirements aside initially.

    Step 2: Validate Pure Logic

    Test move legality, collision relationships, or environment transitions before rendering issues can obscure rule errors.

    Step 3: Add a Basic Interface

    Use simple graphics to display state. Confirm that input, state updates, and rendering form a complete loop.

    Step 4: Add Algorithms and Animation

    Validate training, policy evaluation, and playback controls separately. Avoid introducing too many variables at once.

    Step 5: Add Visual Styling

    Once functionality is stable, adjust lighting, particles, textures, and motion effects. Recheck readability and runtime overhead.

    Step 6: Run Regression Acceptance Tests

    Cover first launch, repeated actions, reset, boundary states, and recovery from errors. Retain the task description, generated versions, and modification history.

    9. Conclusion: Focus on Verifiable Completion

    Evaluating LLM coding capabilities should go beyond impressive graphics or a successful first attempt. More useful questions are whether the rules are correct, state is consistent, failures can be diagnosed, and results can be repeatedly verified.

    Sliding puzzles test discrete state and interaction constraints. Three-dimensional bowling tests geometry and collision relationships. Maze reinforcement learning further tests coordination between the environment, algorithm, and visualization. Together, they show that visual generation is only one part of software engineering capability.

    For developers and enterprise users, a more reliable approach is to use LLMs to accelerate implementation and generate candidate solutions, while controlling quality through explicit state contracts, automated tests, runtime diagnostics, and acceptance procedures. Those checks are what allow generated code to progress from a watchable demo to a usable, maintainable application.