The "Integer OCD" Phenomenon in Large Language Models: A Stress-Test Analysis
This article examines a recurring pattern observed when stress-testing large language models on complex, multi-step engineering tasks: strong performance on high-level architecture and logic, paired with frequent errors on simple numeric and directional details such as key mappings, coordinate signs, and loop boundaries. Drawing on three representative test scenarios—web-based action game development, a classic river-crossing logic puzzle, and single-file 3D game generation—the article analyzes why this gap between global reasoning and local symbolic precision occurs, and offers practical recommendations for developers relying on LLMs for code generation.
Introduction: Why Model Evaluation Needs “Stress Testing”
As large language models continue to improve at code generation and logical reasoning, standard benchmark scores alone no longer fully capture how these models perform in real engineering scenarios. More developers are turning to scenario-based stress testing: designing moderately complex tasks with multiple constraints to observe how models handle long reasoning chains, detail fidelity, and rule-following in practice. This article looks at three representative test scenarios to examine a pattern common across mainstream large language models—what we call “integer OCD,” where models struggle with seemingly simple numeric, directional, or coordinate-related parameters even while handling complex reasoning well.
1. Overview: Strong Capability, Weak Detail Execution
Testing across several mainstream large language models reveals a consistent pattern: overall reasoning ability and the completeness of generated code have reached a fairly high level, but basic details—direction key mappings, loop counting boundaries, the sign of a coordinate axis—are frequently wrong. This combination of “accurate at scale, unreliable in the details” reflects a real gap between global semantic understanding and precise local symbol execution in current LLMs.
The root cause is technical. LLMs generate text by learning and reproducing statistical patterns from training data. For tasks with high structural regularity—such as game mechanics design or UI layout—models can draw on mature implementation patterns learned from large volumes of code samples. But tasks requiring precise symbolic operations, like the sign of a direction vector or an array index boundary, tend to vary highly by context across different code samples. Models have a harder time forming stable, generalizable rules for these cases, so their error rate on such details is noticeably higher than their error rate on overall logical construction.
2. Test Scenario One: Web-Based Action Game Development
Test Design
This test asked models to independently build a browser-based action combat game using front-end web technologies, including blocking, basic attacks, double jump, dodge, a multi-element skill system, full scene design, and enemy AI logic. The task evaluates several dimensions:
- System architecture: whether the model can reasonably separate concerns like character state machines, input handling, and collision detection
- Gameplay design: whether the resulting controls and skill pacing follow basic game design principles
- AI behavior design: whether enemy AI shows real decision logic rather than a simple fixed script
Results and Comparison
Models showed clear differences in capability on this task:
- Some produced basic game mechanics with stiff controls and no skill combos or scene interaction
- Some implemented more advanced elements like 3D visual effects and floating platforms, but overall gameplay feel and feedback were still lacking
- The best-performing models implemented a full skill system plus character form-switching and combo mechanics, along with a free-following camera, approaching a near-finished interactive experience
This indicates that differences in model architecture and training strategy become most visible in complex, integrated tasks—not just in whether the task gets done, but in the quality of the result.
3. Test Scenario Two: Reasoning Stability on a Classic Logic Puzzle
Background
This test used a variant of the classic river-crossing puzzle: a family of seven (including a dog) must cross a river by boat, with constraints on boat capacity and which combinations of individuals can be left together (certain combinations would result in one “eating” another). Models had to solve this through pure text reasoning, without external tools such as code execution or search augmentation.
This is a classic constraint satisfaction problem, requiring the model to track multiple rules simultaneously while performing multi-step lookahead search. It places significant demands on working memory and logical consistency.
Method and Results
The test ran the same model on the same problem multiple independent times, measuring accuracy and response speed. Results showed:
- In pure reasoning mode without external tools, some models reached relatively high accuracy (correct on four out of five attempts) with notably fast response times
- Most models still had room to improve on stability for multi-constraint logic problems, often dropping a constraint midway through reasoning and ending up with a flawed solution
Technical Significance
The value of this type of pure text-reasoning test is that it isolates the model’s internal reasoning chain from any code-execution support, directly testing whether that reasoning chain is robust on its own. This has clear relevance for business scenarios requiring complex decision support without external tools—multi-turn condition checks in intelligent customer service, or cross-checking multiple rules in compliance review, for example.
4. Test Scenario Three: Single-File Generation of a Complex 3D Application
Task Difficulty
This test asked models to independently build, in a single file, a 3D application using a 3D rendering stack, complete with voxel-based terrain, creature entities, and a day-night cycle. This is one of the most demanding tests currently used for LLM code generation, involving:
- 3D scene rendering and performance optimization
- Procedural terrain generation algorithms
- Collision detection and physics interaction logic
- Complex state management (day-night cycles, weather, infinite map loading)
A Recurring Problem: Direction Mapping Errors
Multiple models independently exhibited the same issue: movement key mapping errors, where forward and backward keys were swapped relative to the character’s actual movement direction. Further testing also found missing jump functionality, while block placement and destruction logic generally worked correctly.
This reinforces the “integer OCD” pattern described earlier: details that depend on precise symbolic correspondence—coordinate sign conventions, key-to-action mapping tables—are exactly where models are most likely to make mistakes, even when the overall system architecture is otherwise well built.
Iterative Correction Ability
After identifying these issues, further testing evaluated whether models could iterate based on clear error feedback—fixing the direction key mapping, adding jump and flight functionality, improving texture detail and lighting, and adding time progression, a weather system, and infinite terrain generation (while maintaining performance). This stage focused on the model’s error correction ability and incremental feature addition, mirroring the real “iterate on requirements, fix the code” loop in actual engineering work.
5. Why Integers Are a Weak Spot
Based on these three tests, a few patterns emerge in how LLMs handle precise symbolic information:
- Local symbolic detail competes with global semantic coherence: when generating long code, the model’s attention tends to prioritize overall structural and functional coherence, making it easy to miss consistency checks on local symbolic details like axis direction or array indices.
- Uneven distribution in training data: in high-quality open-source code for game development and 3D rendering, key mapping conventions vary significantly across projects. This makes it hard for models to learn a single, consistent “correct mapping rule.”
- No runtime feedback loop: in a single generation pass, the model cannot run and debug the code to verify whether direction keys work correctly, the way a human developer would. It can only reason statically about the code logic, which amplifies the likelihood of detail-level errors.
6. Practical Recommendations for Developers
Based on these findings, developers using LLMs to assist with real development work should consider:
- Layered verification: prioritize verifying logic modules involving precise symbols—direction, coordinates, indices—rather than only checking whether the overall functionality “looks usable.”
- Use the iteration loop effectively: when a specific detail error is found, give a clear, specific description (e.g., “the direction key mapping is reversed” rather than a vague “something’s wrong”). This significantly improves the accuracy and efficiency of the model’s fix.
- Pair with tooling: for tasks requiring high-precision logical reasoning or numerical computation, use a code execution environment or computational tools to verify results, compensating for the inherent limits of pure text reasoning on precise symbolic tasks.
- Run scenario-based tests first: before adopting an LLM as a production tool, design stress tests tailored to your own business needs, rather than relying solely on generic benchmark scores.
Conclusion
The capability growth of large language models is uneven: macro-level architectural ability is improving quickly, while micro-level symbolic precision is improving more slowly. This suggests developers should build a more granular evaluation framework for real-world use, applying differentiated verification and tooling strategies depending on the task type—making full use of a model’s strength in building complex systems while using tooling to offset its limitations in precise symbolic handling, in order to maximize the efficiency of human-AI collaboration.
