Evaluating Large Language Models on Complex Interactive Prototypes

    Complex interactive web applications reveal whether a coding model can build more than a convincing static interface. This article presents a reusable evaluation framework for desktop-style window managers and real-time strategy prototypes, covering visual fidelity, state consistency, temporal and spatial reasoning, controllability, prompt design, maintainable implementation, regression testing, and performance analysis.

    Complex interactive web pages are useful for evaluating a coding model’s overall capabilities. The model must not only generate styles and components, but also understand how state changes over time, how multiple objects affect one another, and how user actions map to interface feedback. Compared with static pages, these tasks are more likely to expose implementations that appear to work but fail under repeated interaction.

    This article does not promote any particular model. Instead, it abstracts two common exercises into reusable evaluation methods: a desktop-style window manager and a real-time strategy prototype with automatic units, research, resource management, and camera controls.

    What the Evaluation Should Measure

    A generation should not be judged by its initial screenshot alone. Acceptance is best divided into four independent questions.

    1. Visual fidelity

    Can windows be dragged? Are the title bars, close buttons, and minimize controls recognizable? Do transparency, layering, and shadows create a consistent material language? When switching views, does the interface preserve spatial relationships instead of simply applying a fade transition?

    Visual quality does not mean that an animation library was invoked. The real test is whether users can infer the current focus and hierarchy from the interface.

    2. State consistency

    Every window, unit, city, and research project should have a clear source of truth. Coordinates after dragging, speed multipliers, unlocked technologies, and resource totals must remain consistent across refreshes and consecutive operations.

    If the displayed interface diverges from the internal state, no later automated behavior can be trusted.

    3. Temporal and spatial reasoning

    A real-time strategy prototype is not a turn-based game with the turn button hidden. Both sides should advance along the same timeline. Production, movement, combat, and research should occur at fixed intervals. The player should change the observation granularity by pausing or changing the speed multiplier rather than manually advancing the system one turn at a time.

    Automatic unit behavior also requires an explainable pathfinding or nearest-target strategy. Random teleportation is not sufficient.

    4. Controllability

    A speed slider, keyboard-based camera movement, a hexagonal grid, and icon-based objects are all low-ambiguity acceptance points. They can be turned into a checklist with three possible outcomes:

    • Implemented
    • Partially implemented
    • Behavior contradicts the requirement

    Why These Tasks Are Effective

    A desktop-style interface evaluates the interaction layer. The model must handle positioning, drag events, stacking order, and transition animations at the same time. If it only produces static cards, it has not understood the “window” as an operable object.

    A real-time strategy prototype evaluates rule abstraction. Requirements often combine three types of information:

    • Domain conventions, such as real-time progression and fair treatment of both sides
    • New systems that do not necessarily exist in the original reference but are required by the user, such as an assistant that automatically conducts research when resources are available
    • Implementation constraints, such as hexagonal cells, a speed range from 1x to 10x, arrow-key camera movement, and generic symbols for cities and units

    The model must distinguish between describing familiar gameplay and implementing a new rule system. Recreating a known game interface without adding the requested systems should not count as a pass.

    Pathfinding and automatic combat move the task beyond text generation and into algorithm design. Even on a small map, the implementation must define grid neighbors, distance, occupancy, and target selection. Passing once only shows that the result looked reasonable under one random seed. Regression testing with a fixed map is still necessary.

    To prevent the evaluation from expanding indefinitely, a desktop task can be limited to:

    • Several draggable windows
    • A clear front-to-back stacking order
    • One spatially oriented view transition
    • Basic clickable controls

    A complete operating system and a real file system are not required.

    A strategy task can be limited to:

    • A small hexagonal map
    • Two factions
    • Cities and units
    • Resource values
    • A short research chain
    • Toggleable automatic research
    • Speed multipliers
    • Keyboard-based camera movement
    • Automatic enemy detection

    Victory conditions should be stated explicitly, such as the capture of the main city or the exhaustion of resources. The smaller the scope, the easier it is to identify the cause of failure.

    Writing Prompts for Regression Testing

    Write requirements as numbered clauses and give each clause an observable result. For example, write:

    “The speed control must run continuously from 1 to 10, and changing it must alter unit travel time proportionally.”

    This is more testable than saying that the interaction should “feel better.”

    For automatic research, specify the trigger conditions:

    • The assistant is enabled
    • Resources are sufficient
    • An unfinished project exists

    When all conditions are met, each tick should deduct resources and advance research progress. When resources are insufficient, the system should wait rather than produce a negative resource value.

    Keep visual and logical requirements separate. Glass effects, icons, and button styling should not hide an incorrect pathfinding implementation. Conversely, an attractive interface cannot substitute for correct rules.

    During iteration, change only one category of failure at a time. First repair the state model, then improve presentation. Otherwise, prompts may become increasingly long while their requirements begin to conflict.

    If the generated result becomes slower or less reliable, check whether the prompt is asking for large-scale animation, complex artwork, and a complete game loop simultaneously. When the context becomes overloaded, the model may sacrifice requirements that appeared earlier.

    A practical workflow is to split the work into three stages:

    1. Produce the data model and rule specification
    2. Produce an unstyled but playable loop
    3. Add the presentation layer

    Keep each working version so that it can be compared with the next version instead of being overwritten.

    A Maintainable Implementation Structure

    Whether an interactive prototype is written by a person or drafted by a model, it should define state before rendering. A fixed-interval loop can advance the world, while rendering reads from that state.

    A minimal structure might look like this:

    1. <div id="view" tabindex="0"></div>
    2. <input id="speed" type="range" min="1" max="10" value="1">
    1. const state = {
    2. speed: 1,
    3. cam: { q: 0, r: 0 },
    4. units: [{ id: "a1", side: "A", q: 1, r: 2, hp: 10 }],
    5. cities: [{ id: "c1", side: "B", q: 4, r: 3 }],
    6. research: { on: true, points: 0, cost: 30, unlocked: false },
    7. resources: 20
    8. };
    9. function neighbors(q, r) {
    10. return [[1,0],[-1,0],[0,1],[0,-1],[1,-1],[-1,1]]
    11. .map(([dq, dr]) => ({ q: q + dq, r: r + dr }));
    12. }
    13. function nearestEnemy(unit) {
    14. const foes = state.units.filter(u => u.side !== unit.side);
    15. return foes.sort((x, y) => dist(unit, x) - dist(unit, y))[0] || null;
    16. }
    17. function tick() {
    18. if (state.research.on && !state.research.unlocked && state.resources > 0) {
    19. state.resources -= 1;
    20. state.research.points += 1;
    21. if (state.research.points >= state.research.cost) state.research.unlocked = true;
    22. }
    23. for (const unit of state.units) stepToward(unit, nearestEnemy(unit));
    24. render(state);
    25. }
    26. document.getElementById("speed").oninput = (e) => {
    27. state.speed = Number(e.target.value);
    28. restartLoop(1000 / state.speed);
    29. };

    This example only defines the boundaries of the implementation. The hexagonal grid uses axial coordinates for neighbors. Automatic research first checks whether the feature is enabled, whether research is complete, and whether resources are available. The speed control changes the loop interval or movement performed per tick; it should not rewrite the underlying rules.

    The distance function, collision handling, and occupancy rules must be completed according to the map size. The implementation must not assume that the first item returned by a sort is always a valid target. Camera movement should update the camera offset rather than permanently shifting every unit coordinate. Otherwise, saving and pathfinding can both become inconsistent.

    The desktop task should use a similar model. Store windows in an array with fields for identifiers, coordinates, stacking levels, and dimensions. A drag operation should update only the item captured by the pointer. Clicking a title bar should raise that window’s stacking level.

    When switching views, generate the alternate layout from the same window array. Returning from the alternate view should restore the original coordinates. In this design, a “3D” or spatial transition is simply another projection of the same state, which prevents two independent data sets from drifting apart.

    Common Failures and How to Interpret Them

    If the model generates a page quickly but omits controls, it probably prioritized layout and copy instead of treating interaction requirements as acceptance criteria.

    If the visual style is close to the target but buttons or transparency behave inconsistently, the model may have partially absorbed the style description while leaving the component structure unstable.

    If a logic task passes once but fails on a different map, target selection may be hard-coded to the initial coordinates. Another possibility is that pathfinding has been reduced to moving in a fixed direction.

    A slower interface does not necessarily indicate more complex rules. Performance may degrade because the page creates too many nodes per frame, repeatedly binds events, or calculates paths inside an unbounded loop. Evaluation should record the map size, unit count, and refresh interval. Performance comparisons should use the same load rather than relying on a single subjective impression of smoothness.

    Anonymous impressions or assumptions based on version order should not replace records. Run the same prompt with the same checklist and initial data multiple times. Record visual quality, rule correctness, and performance separately.

    If a later version has a more polished interface but automatic research produces negative resources, the correct conclusion is that presentation improved while the rules regressed. It should not be labeled simply as “better” or “worse” overall.

    Recommendations for Team Adoption

    When adding these tasks to an internal evaluation set, include the initial state, an operation script, and explicit pass conditions.

    The operation script can remain short:

    1. Enable automatic research
    2. Set the speed to its maximum
    3. Use the arrow keys to move the main city into view
    4. Wait for several seconds
    5. Check the resource total and unit positions

    Human review is still required for focus, layering, accidental interactions, and whether spatial transitions are understandable. Scripts are not good at judging these visual and interaction qualities.

    Before generated code enters a repository, add boundary tests for at least the following cases:

    • Resources equal zero
    • No enemy exists
    • Speed is at both endpoints
    • A window is dragged outside the viewport
    • Two units compete for the same cell

    A model can draft the implementation and tests, but the assertions should be derived from the original requirements. Otherwise, the model may silently redefine the standard and then declare its own output successful.

    For cloud-based collaboration, treat the generated output as ordinary static assets and logs. Store page assets in object storage, use container infrastructure for builds and previews, and observe failures through logs and monitoring alerts. These are general engineering practices. They do not replace manual verification of rule correctness and should not be presented as proprietary capabilities of a particular model or platform.

    Conclusion

    The value of complex interactive prototypes lies in turning vague impressions of “usability” into a verifiable capability profile. The evaluation should reveal whether a model can maintain a single source of truth, express real-time progression, fairness, and automated decisions as stable ticks, and improve visual presentation without breaking previously validated rules.

    Numbered prompt requirements, a strict separation between state and rendering, fixed maps, and structured checklists allow teams to compare real differences between versions. This is more reliable than judging an implementation from a single screenshot.