Doom Compiled into an LLM: Torchwright Doom Launches

TL;DR
- Developer physicsrob released Torchwright Doom, compiling the 1993 Doom game engine into a PyTorch-based language model architecture.
- The project translates WebAssembly bytecode into neural network operations, proving transformers can execute arbitrary compiled code natively.
- Available now on GitHub as an experimental proof-of-concept exploring the computational universality of modern LLM architectures.
A developer has successfully compiled the iconic 1993 first-person shooter Doom into a language model architecture, demonstrating that transformer-based neural networks can execute arbitrary compiled programs. The experimental project, Torchwright Doom, officially released on January 17, 2025, translates the entire Doom game engine into PyTorch operations that run natively within an LLM framework.
Technical Architecture and Implementation
Torchwright Doom achieves this unconventional compilation by bridging WebAssembly bytecode with transformer neural network operations. The project takes Doom's original C codebase, compiles it to WebAssembly, then translates each WebAssembly instruction into equivalent PyTorch tensor operations that can execute within a language model's computational graph.
This approach treats the LLM architecture as a universal computing substrate rather than a text-generation tool. Each game frame involves thousands of matrix operations that simulate CPU instructions, memory access, and graphics rendering through neural network layers. While computationally inefficient compared to native execution, the implementation proves that modern transformer architectures possess Turing-complete computational capabilities.
Computational Universality Proof
The project serves as a practical demonstration of theoretical claims about LLM computational universality. Computer scientists have long established that neural networks with sufficient parameters can approximate any computable function, but Torchwright Doom provides concrete evidence by running a complex real-time application.
Key technical achievements include:
- Complete WebAssembly instruction set mapping to PyTorch operations
- Memory management system using tensor-based virtual RAM
- Frame-by-frame rendering pipeline through matrix transformations
- Input handling through tokenized command sequences
The implementation runs significantly slower than native Doom execution, with frame rates measured in seconds rather than milliseconds, but successfully demonstrates logical correctness across all game mechanics.
Release Date and Availability
Torchwright Doom was officially launched on January 17, 2025, through an open-source GitHub repository. The project appears under developer physicsrob's account and includes full source code, compilation instructions, and technical documentation explaining the WebAssembly-to-PyTorch translation layer.
The release gained immediate attention on Hacker News, where it was featured in the "Show HN" category for community-created projects. Developers can clone the repository and experiment with the architecture using standard PyTorch environments, though running the compiled game requires substantial GPU memory for tensor operations.
Implications for LLM Research
Beyond its novelty factor, Torchwright Doom raises important questions about the fundamental nature of large language models. If transformers can execute compiled game engines, researchers must reconsider assumptions about what these architectures actually compute during text generation tasks.
The project also highlights potential security considerations. If arbitrary code can be compiled into LLM operations, adversarial actors could theoretically embed malicious logic within model weights or prompt sequences. This opens new research directions in neural network security and interpretability.
What This Means
Torchwright Doom transforms a theoretical computer science concept into a playable demonstration, proving that language models function as general-purpose computing platforms. While impractical for actual gaming, the project advances understanding of neural network capabilities and establishes new benchmarks for unconventional AI applications. Developers and researchers now have concrete evidence that LLM architectures can execute any deterministic algorithm, fundamentally expanding the scope of what these systems might accomplish beyond natural language processing.
on Emergent today






