doomformer runs neural networks inside DOOM maps using voodoo dolls for computation
A researcher compiled integer neural networks into DOOM WAD files where voodoo dolls perform arithmetic operations, with light levels and plane heights storing activation values.
Summary
The doomformer project by alp (@mottopanikeiku) implements neural network inference entirely within the DOOM engine by compiling integer models into map files. Voodoo dolls—DOOM entities normally used for scripting tricks—execute the arithmetic operations, while light levels and sector plane heights serve as memory for storing numerical values. The largest demonstration map deploys 1,355 voodoo dolls to run an MNIST digit classifier: a player draws a number on the floor, presses READ, and the winning output class triggers its corresponding doll to cross a finish line and illuminate a display.
A separate museum.wad operates without any Python backend, using 136 dolls across seven floor pads for a smaller network that can be interactively mutated mid-execution. The project also includes a 1,345-doll marine AI map that senses nearby demons and selects actions, though it proves non-viable for actual gameplay since each decision requires 22 seconds of game time while demons kill the marine in 5.5 seconds. The float model achieves 97.58 percent accuracy on MNIST, with outputs verified against NumPy reference implementations.
How neural computation maps to DOOM engine mechanics
- Voodoo doll arithmetic engine: The project repurposes DOOM voodoo dolls—player clones that trigger linedef actions when pushed by conveyors—to perform the mathematical operations of neural network layers, with conveyor belts and sector triggers orchestrating the computation flow.
- Light levels and plane heights as memory: Neural activation values are stored in the DOOM engine's native data structures, specifically sector light levels and floor/ceiling plane heights, which provide the necessary dynamic range for integer network states.
- Integer quantization with float reference: The model uses integer weights and activations for in-engine execution, while a floating-point version of the same architecture achieves 97.58 percent accuracy on MNIST, enabling direct comparison against standard NumPy inference.
- Interactive mutation in museum.wad: The standalone museum.wad demonstrates runtime network modification by rewiring a single connection when the player presses MUTATE, visibly altering classification behavior (e.g., causing a 7 to read as a 1) without external code.
- Python bridge for I/O and verification: A Python layer reads back all exposed map values and compares them against NumPy computations to validate correctness, while also handling input encoding for the MNIST digit floor-drawing interface.
Why it matters
doomformer sits at an unusual intersection of retrocomputing preservation, esoteric programming, and machine learning deployment that resonates with open-source communities exploring unconventional compute substrates. While not practical for production inference, the project demonstrates how constrained environments can be coerced into executing modern ML workloads, offering educational value for understanding both neural network internals and game engine architecture. The fully open-source implementation on GitHub provides a reproducible artifact for researchers and hobbyists studying in-silico computation, quantization, and the creative repurposing of legacy software platforms.
Original reference: blog.adafruit.com →