Show HN: I Turned DOOM into a Transformer
Source Entity
Hacker News

The 'Doomformer' project demonstrates a unique technical achievement by compiling integer neural networks into ZDoom maps. By utilizing game mechanics like voodoo dolls and sector heights for arithmetic, it executes neural computations within the DOOM engine.
The Convergence of Retro Gaming and Modern AI
The emergence of 'Doomformer' represents a fascinating intersection between vintage game engine architecture and contemporary machine learning. By repurposing the ZDoom engine to perform the heavy lifting of integer neural network arithmetic, the project pushes the boundaries of how we define a 'computing environment.' Instead of utilizing traditional hardware acceleration, the developer has turned the game’s internal logic—specifically voodoo dolls and sector properties—into a functional, albeit unconventional, computational processor.
Mechanics of the Doomformer Architecture
At its core, Doomformer operates by mapping neural network parameters onto the physical properties of a DOOM map. The project leverages voodoo dolls, which are entity copies originally intended for multiplayer spawn handling, to perform the actual arithmetic operations. Simultaneously, the game's sector light levels and plane heights are utilized as storage registers for numerical sums. This transformation of a game environment into an interpreted state machine is a testament to the flexibility of the ZDoom engine's scripting and spatial logic.
Technical Limitations and Performance Hurdles
While the project is a remarkable proof of concept, it highlights the extreme disparity between game engines and dedicated AI hardware. The developer reports that the system is approximately 23,000 times slower than standard NumPy operations for a small Multi-Layer Perceptron (MLP). When factoring in the total overhead of the engine and the time required for a handwritten digit classification task—ranging from 8 to 163 seconds—it becomes clear that this is an academic exercise in unconventional computing rather than a viable alternative for machine learning inference.
The Importance of Precision and State Verification
One of the most critical aspects of the Doomformer pipeline is its rigorous error checking. Python scripts are utilized to read every exposed value from the running game, comparing the results against a NumPy integer reference with a tolerance of zero. This ensures that the engine's inherent floating-point and integer handling does not drift. Even a single-digit discrepancy results in a complete failure of the run, emphasizing the difficulty of maintaining deterministic output in a gaming environment not designed for high-precision mathematics.
Broader Implications for Computational Theory
This project echoes the spirit of previous 'Turing-complete' experiments where complex software is forced to run on hardware or engines for which it was never intended. By demonstrating that a game engine can simulate a Transformer architecture, the developer invites us to rethink the modularity of neural networks. While not practical for real-world deployment, Doomformer serves as a vital educational tool for understanding how neural network weights and biases can be abstracted and mapped onto virtually any system capable of basic arithmetic.
Future Trends in Unconventional Computing
Looking ahead, projects like Doomformer underscore a growing niche in the tech community: the exploration of 'esoteric hardware' interfaces. As machine learning models become more modular, we may see further experiments that attempt to run inference on non-traditional platforms, including legacy software and embedded hardware. While the current execution speed is prohibitive, the ability to 'compile' neural networks into arbitrary environments remains a frontier for both software engineering and computer science research.