What is Doomformer?
Doomformer compiles integer neural networks into DOOM maps, using moving voodoo dolls and map geometry to carry out the computations. It is a Python project for developers and researchers interested in neural networks, game-engine experiments, or unusual ways to inspect computation. The resulting maps can be run through ViZDoom or played in compatible DOOM source ports, depending on the project. It also includes demonstrations, such as drawing an MNIST digit and watching a network classify it inside a map.
Doomformer Features:
Network Compilation: The compiler supports integer multilayer perceptrons, spiking networks, and transformers, including softmax and RMSNorm but not LayerNorm.
PyTorch Import: The MLP interface can import a PyTorch network with MLP.from_torch before compiling it into a map.
Map Computation: Voodoo dolls cross weighted lines and gates to represent network values, sums, activations, and attention inside a DOOM level.
Result Checking: Python reads computed light levels and floor heights and can raise an error when a result differs from the NumPy integer reference.
Interactive Demos: The draw command lets users enter a 28×28 digit canvas and run the network, while downloadable WADs provide maps that can run without Python.
Network Hooks: World and action hooks can connect network outputs to in-game elements such as doors, lights, and thrusts.
Doomformer Benefits:
Visible Computation: Users can watch intermediate computation unfold in a level rather than treating a model as an opaque command-line result.
Checkable Results: Comparing game output with an integer reference helps identify when a map's arithmetic or timing is incorrect.
Hands-On Learning: The physical metaphor of dolls, gates, and changing sectors gives learners a concrete way to explore network operations.
Playable Sharing: Standalone WAD demos let people try selected examples in a DOOM source port without setting up the Python project.
Experiment Space: Changing connections in the museum map makes it possible to observe how a network alteration affects a prediction.
Use Cases:
Teaching Neural Networks: Use the museum map to demonstrate how weighted connections and activations can be represented through movement and gates.
MNIST Demonstrations: Run the draw demo to enter a handwritten digit and show how a compiled network selects a classification.
Compiler Experiments: Compile a small integer MLP and compare its DOOM-computed outputs with NumPy values during development.
Interactive Prototypes: Connect a network's outputs to doors, lights, or thrusts when testing ideas for neural control inside a game level.
Model Visualization: Build a map that lets a group inspect a network's operations in a playable environment rather than only reviewing equations or code.

