Decompiling FPS Games with AI: A Tech Editor's Briefing 🎮
Explore the groundbreaking project of decompiling a first-person shooter using AI agents and the lessons learned in optimizing infrastructure and AI orchestration.
Project Overview
Over the past three months, a team of developers, including RektInator, Future, st0rm, and others, embarked on a project to decompile a popular first-person shooter game using AI agents.
The goal was not just a proof-of-concept but a complete, accurate, and stable recreation of the game, aiming for a feature-complete version in C++.
AI Orchestration and Infrastructure
The project emphasized AI orchestration and infrastructure optimization for optimal results. The team utilized Claude Max and Codex Pro models, managing GitHub issues with Discord communication.
The agents used ida-mcp by Hex-Rays for decompilation, with a focus on semantic correctness, readability, security, bug fixes, and portability improvements.
Decompilation Progress and Challenges
The agents managed to decompile about 80% of the game, with visible progress like the main menu and map loading. However, the quality of the decompilation was initially found to be semantically incorrect.
This was due to agents using incorrect function signatures, types, or struct layouts, and introducing unnecessary architectural changes.
Verification and Refinement
To address the issue of semantic errors, the team developed a byte matching decompilation script that compared reconstructed functions against the original game's binary.
This led to the refinement of instructions to disallow certain constructs like inline assembly and object patching, improving the accuracy of the decompilation.
Scaling and Communication
The project scaled up with the use of cheaper models like Haiku and Luna, which were previously unsuitable. This reduced costs and allowed for a massive increase in project scale.
However, as the project progressed, Discord communication became less scalable, leading to restrictions on messages and a shift towards minimal human-agent interaction.
“Precise instructions are necessary. Agents have the desire to cheat if the assignment leaves room for interpretation.”
— Senior Tech Editor