Urgent.News

What's breaking now, across hundreds of outlets.

AI

500+ Billion Tokens Later: Letting AI Agents Decompile A First-Person Shooter

In the span of three months, the author devoted considerable resources to decompile a popular first-person shooter. The objective was not merely to create a basic proof of concept, but rather to produce a high-quality, stable, and feature-complete recreation of the original game. This endeavor was prompted by the knowledge that corporate entities had previously sought to undermine the team's efforts.

The game's identity remained undisclosed to both the author's blog readers and the general public, as the focus was on decompilation rather than the game itself. The decompilation process was the central theme of the project, rather than the technical intricacies involved.

Collaborating with other community members, including RektInator, Future, and st0rm, the author aimed to achieve an accurate decompilation of the game into C++. Beyond semantic correctness, the team sought to enhance the code with readability, security improvements, and bug fixes. The ultimate aim was to enable the game to run on various platforms, including Linux, macOS, and web browsers.

Initially, the team employed Claude Max (20x) and Codex Pro, utilizing both subscriptions concurrently. Model choices varied throughout the project, with Sonnet 5, Opus 5.5, Luna, Sol, and Terra being among the most commonly used models. The team primarily relied on Claude agents running in Claude Code CLI and Codex agents in Codex CLI, despite experimenting with other agent harnesses, which ultimately proved inconsequential.

To monitor progress, the agents recorded their activities as GitHub issues, with one issue per translation unit (.cpp file). Labels were employed to group and prioritize issues accordingly. Communication between agents occurred via Discord, allowing them to interact with each other and with human participants. A GitHub webhook facilitated the dissemination of CI failures within the shared Discord channel, ensuring that agents were promptly notified of any issues that arose.

The initial decompilation phase was successful, with the agents managing to decompile approximately 80% of the game's codebase. By the end of the first month, the team had unveiled the game's main menu and enabled map loading. During this period, the team dedicated significant effort to refining their setup and infrastructure, with a particular focus on reducing token consumption.

They achieved this by lowering the default compaction threshold from 90% to 42%, which helped eliminate irrelevant information from the context and improve overall efficiency.

However, despite the team's extensive efforts to optimize the setup, the quality of the decompiled code remained subpar. The compiled code, while readable, contained numerous semantic errors, such as incorrect function signatures, types, or struct layouts. Additionally, the agents introduced unnecessary architectural changes, including the conversion of constant memory access into inefficient hash table lookups.

These issues arose due to the absence of clear acceptance criteria for judging the correctness of the agents' work.

In retrospect, the author realizes that the project's success would have been greatly improved by establishing objective acceptance criteria for evaluating the agents' output. The reviewer played a crucial role in identifying bugs, but lacked the authority to assess architectural decisions or deviations from the original implementation. Consequently, the team struggled to maintain consistency in their approach, as certain modifications were accepted without question, even when they deviated from the original game's design.

Rewritten by urgent.news; may contain errors — check the original.

Source: momo5502.com

Read the original at momo5502.com →

Report a problem with this story

More in AI

More from Tuesday 13 October →