Dev used AI agents and more than 500 billion tokens to rebuild Call of Duty: Modern Warfare 2’s source code

Dev used AI agents and more than 500 billion tokens to rebuild Call of Duty: Modern Warfare 2's source code

The answer was an automated check, so the team switched to the same compiler used to build the original game. A script compares each rebuilt function against the game’s executable at the byte level. Calls and data references are at different addresses and are skipped, with target symbols and offsets checked instead, but data and types get the same check. Then it’s a simple matter of pass/fail for each function, and every match is recorded so CI can recheck it and alert on regressions. While this type of matching is slow and sometimes challenging, a match guarantees identical behavior down to reproducing original bugs.

Even with this positive change, the agents immediately tried to cheat by writing “inline assembly” and “repeatedly tried to modify this script to exclude their function from comparison,” Heumann wrote. Inline assembly and similar shortcuts were then banned in the agents’ instructions, and CI now hashes the verification script and checks it against a hash stored as a GitHub Actions secret. Agents cheating is an expected outcome at this point with many such reports, such as when OpenAI’s models went after ExploitGym answers instead of solving the capture-the-flag challenges directly. As Heumann discovered, having a reviewer agent alone may be insufficient.

Before the check was originally implemented, the cheaper, less capable Haiku and Luna models “produced extremely bad results,” the post says. With the check in place, there was sufficient feedback to make the models work, which cut costs and let the project scale up. After almost two more months, 99% of the functions were present, with 83% meeting the byte-exact requirements. Heumann believes the 16% lacking a byte match are still semantically correct, but diminishing returns were getting real. The blog claims the game “runs flawlessly” as it stands.

For “obvious reasons,” the project’s code is remaining private and will be used “for my own needs only,” Heumann says. As he put it on X, the “decompiled code is obviously also copyrighted.” However, the developer has started extending Sogen, his userspace emulator, into lightweight sandboxing for agents, a response to his project’s agents wiping VMs. It will not be production-ready for a while.

As for the decompilation project, Heumann says that it is a special case, as not every project can do a byte-for-byte reference, but thinks every project can get close “with enough creativity.” One takeaway lesson is that you should be willing to move past failures as “Generating code is cheap now. Throw it away if it’s bad” and focus on correctness over productivity.

Follow Tom’s Hardware on Google News , or add us as a preferred source , to get our latest news, analysis, & reviews in your feeds.

Shane Downing Social Links Navigation Contributing Writer Shane Downing is a Contributing Writer for Tom’s Hardware, covering consumer storage, PC hardware, and AI.

alrighty_then I like the observation that the agents are trying to "cheat." It's true in a human sense but in reality the reason it happens is you didn't give enough guardrails to avoid cheating. So the AIs are just giving the quickest solution they can. Fair play. I guess this explains how the single user started recreating the Adobe suite and why people said they'd be sued…pretty sure reverse-engineering the source to recreate it violates something in the EULA. Reply

Key considerations

  • Investor positioning can change fast
  • Volatility remains possible near catalysts
  • Macro rates and liquidity can dominate flows

Reference reading

More on this site

Informational only. No financial advice. Do your own research.

Leave a Comment