AI Agents Rebuilt Call of Duty: Modern Warfare 2, Byte by Byte
AI 智能体逐字节重建《使命召唤:现代战争 2》
A developer spent three months and over 500 billion tokens directing AI agents to rebuild the C++ source of Call of Duty: Modern Warfare 2. Nearly every function is back, 83 percent of them byte-identical to the 2009 original, but the code stays private.
Rebuilding a commercially released video game from its compiled binaries is usually the work of a small army of hobbyists and years of patient reverse engineering. A developer named Maurice Heumann has demonstrated a faster route: hand the job to a fleet of AI agents, keep them on a very short leash, and let an automated checker decide what counts as done. In a project report published on October 9, he said the effort consumed more than 500 billion tokens over three months and produced C++ source code for the 2009 shooter Call of Duty: Modern Warfare 2, with 99 percent of the game's functions represented and 83 percent of them matching the original byte for byte.
Heumann led the project with help from collaborators known as RektInator, Future, st0rm and other community members. The early toolchain was pragmatic rather than exotic: agents ran inside the Claude Code and Codex command-line interfaces, backed by Claude Max and Codex Pro subscriptions, and drew on a rotating cast of models that included Sonnet 5, Opus 5.5, Luna, Sol and Terra. Work was tracked in GitHub Issues and coordinated over Discord, so the agents worked from a shared queue of tasks with a visible paper trail instead of one enormous prompt.
The first month was a sprint. Four agents were set loose, three to decompile and commit code and one to review what came back. Within that stretch roughly 80 percent of the game's functions had been reconstructed, and the result was not a static artifact: the game booted, displayed its main menu and loaded maps. The triumph was short-lived, however. The reconstructed code read cleanly, but it was semantically wrong in ways a compiler would not complain about, with mismatched function signatures, incorrect types, structures laid out in the wrong order and logic that quietly diverged from the original.
That failure pushed the team toward a stricter definition of success: byte-for-byte matching decompilation. The approach recompiles the reconstructed code with the same compiler used for the original game, then compares each rebuilt function's machine code against the corresponding function in the shipped executable and its debugging symbols. A match earns a PASS; anything else goes back to the agents for another attempt. The standard is unforgiving because it measures behaviour rather than style. When the bytes line up, the function almost certainly preserves the original's semantics under that compiler, which makes the rebuilt source functionally interchangeable with the code that shipped in 2009, at least at the level of individual routines.
To close the obvious loopholes, the team banned inline assembly, naked functions, object-file patching and the embedding of raw bytes in source. As a further safeguard, continuous integration hashed the verification scripts themselves and compared the result against a secret stored in GitHub Actions, so a tampered checker could not wave bad code through. The payoff was counterintuitive: with a trustworthy referee in place, cheap models could be entrusted with high-precision work, and the human or agent review stage became redundant.
By the closing weeks the workforce had settled at 14 Luna agents and two Opus 5.5 agents, each submitting work through its own branch and pull request. In the end, 99 percent of the game's functions were folded into the reconstructed source, and 83 percent reached byte-for-byte parity. The stragglers resist matching for mundane reasons, chiefly non-deterministic behaviour and linkers that arrange code differently from one build to the next. Heumann has said he will not publish the code; the result will remain a private experiment. Even so, it is a striking preview of a workflow that may soon be routine: not AI writing software from scratch, but AI methodically recovering software that already exists.
中文翻译(全文)
从编译好的二进制文件里重建一款商业游戏,通常需要一群爱好者耗费数年耐心做逆向工程。开发者莫里斯·霍伊曼给出了一条快得多的路径:把活儿交给一群 AI 智能体,用极严的规则约束它们,再让自动化校验决定什么算完成。在 10 月 9 日发布的项目报告中,他表示这项工程历时三个月、消耗超过 5000 亿词元,为 2009 年的射击游戏《使命召唤:现代战争 2》产出了 C++ 源代码,覆盖 99% 的游戏函数,其中 83% 与原版逐字节一致。
该项目由霍伊曼主导,RektInator、Future、st0rm 等社区成员参与协助。早期的工具链务实而不花哨:智能体运行在 Claude Code 与 Codex 命令行界面里,由 Claude Max 与 Codex Pro 订阅支撑,调用的模型则轮换于 Sonnet 5、Opus 5.5、Luna、Sol 与 Terra 之间。任务在 GitHub Issues 上追踪,信息在 Discord 上交换,因此智能体依据的是共享的任务队列和可查的记录,而不是一条包办一切的巨型指令。
第一个月像是一场冲刺。团队放出四个智能体,三个负责反编译并提交代码,一个负责审查回来的东西。这期间约 80% 的游戏函数被重建,成果也不是一堆静态文件:游戏能启动、显示主菜单并加载地图。但胜利很短暂。重建出的代码读起来通顺,语义上却是错的,而编译器不会为此报错——函数签名不匹配、类型不对、结构体字段排错顺序,还有些逻辑悄悄偏离了原版。
这次失败促使团队给出更严格的成功定义:逐字节匹配反编译。做法是用与原版游戏相同的编译器重新编译重建代码,再把每个重建函数的机器码与正式发行版可执行文件及其调试符号中对应的函数逐一比对。匹配即标记 PASS,其余打回给智能体重做。这个标准之所以苛刻,是因为它衡量的是行为而非风格。字节对得上,说明该函数在那套编译器下几乎必然保留了原版的语义,也就使重建源码与 2009 年发行的那份代码达到功能等价,至少就单个例程而言。
为防止智能体钻校验的空子,团队禁止内联汇编、裸函数、目标文件补丁以及在源码中嵌入原始字节。作为进一步的防线,持续集成会对校验脚本本身做哈希,并与存放在 GitHub Actions 中的密钥比对,被篡改的校验器无法放行坏代码。回报出人意料:只要裁判可信,便宜的模型也能被托付高精度的活儿,人工或智能体审查环节因此变得多余。
到了最后几周,主力阵容稳定在 14 个 Luna 智能体和 2 个 Opus 5.5 智能体,每个都通过独立分支和 Pull Request 提交成果。最终 99% 的游戏函数被并入重建源码,83% 达到逐字节一致。落单的那些之所以难匹配,原因很平常,主要是非确定性行为,以及不同构建之间排布代码方式不一的链接器。霍伊曼表示不会公开这些代码,成果将仅作私人用途。即便如此,它仍清晰地预示了一种可能很快普及的工作流:不是让 AI 从零写软件,而是让 AI 有条不紊地把已经存在的软件复原出来。
重点词汇
- reverse engineering/rɪˈvɜːs ˌendʒɪˈnɪərɪŋ/n.— the practice of taking apart a finished product to work out how it was designed and built逆向工程Rebuilding a game from its binaries is usually the work of years of patient reverse engineering.
- pragmatic/præɡˈmætɪk/adj.— dealing with problems in a practical way rather than following theory or style务实的The early toolchain was pragmatic rather than exotic.
- diverged/daɪˈvɜːdʒd/v.— departed or differed from an original course, standard or version偏离;分叉The code read cleanly, but some logic quietly diverged from the original.
- unforgiving/ˌʌnfəˈɡɪvɪŋ/adj.— allowing no mistakes or excuses; harshly strict不容有失的The byte-for-byte standard is unforgiving because it measures behaviour rather than style.
- loopholes/ˈluːphəʊlz/n.— gaps or flaws in a set of rules that let someone avoid meeting them漏洞The team had to close the obvious loopholes before the agents could exploit them.
- safeguard/ˈseɪfɡɑːd/n.— a measure taken to protect something from harm, abuse or error防护措施As a further safeguard, continuous integration hashed the verification scripts themselves.
- counterintuitive/ˌkaʊntərɪnˈtjuːɪtɪv/adj.— contrary to what ordinary intuition or expectation would suggest反直觉的The payoff was counterintuitive: cheap models could be trusted with precision work once the referee was reliable.
- redundant/rɪˈdʌndənt/adj.— no longer needed because its function is already served elsewhere多余的;冗余的With the checker in place, the review stage became redundant.
- parity/ˈpærəti/n.— the state of being equal to something else in amount, value or quality对等;一致性Eighty-three percent of the functions reached byte-for-byte parity.
- mundane/mʌnˈdeɪn/adj.— ordinary and unremarkable; lacking anything unusual or exciting平淡无奇的The remaining functions resist matching for mundane reasons, such as non-deterministic behaviour.
阅读测验
共 5 道题目
What share of the game's functions matched the original byte for byte?
What was wrong with the code produced in the project's first month?
The team let agents use inline assembly as long as the resulting code still compiled.
Which measures did the team use to stop agents from slipping past the checker? Select all that apply.
The final phase of work relied mainly on 14 ____ agents and two Opus 5.5 agents.

评论
0 条讨论
登录后发表评论
立即登录暂无评论
成为第一个分享想法的人吧!