The doomformer project compiles neural networks into DOOM maps where voodoo dolls physically enact integer arithmetic, achieving bitwise equivalence with NumPy references. Each value maps to a crowd of dolls (e.g., value 5 = 5 dolls); weights are floor lines that dolls cross to add their magnitude; sums manifest as sector light levels or floor heights; ReLU activations become staircases of gates dolls must climb; and attention is implemented via dolls squeezing under ceilings lowered by other values. The MNIST classifier uses 1,355 voodoo dolls in a single UDMF map, exposing 248 checked values per inference. Across 10,000 test digits, DOOM matches the integer reference exactly (100% exact) and achieves 97.16% accuracy versus the float model's 97.58%. Inference takes 273 game tics (~8 s at 35 tics/s). A transformer demo writes level names (e.g., "DEMON CANYON") using 3,548 dolls, while a marine controlled by 1,345 dolls makes 50 exact decisions in a playable map (22 s game time per decision). The toolkit includes a compiler (df.compile), ACS runtime, exact verification harness (df.facts), and Ray scaling: 10,000 digits via tile maps on 6 workers complete in 23 min. Fuzzing 20,000 random nets at range limits yielded 0 mismatches; mutation testing caught 297/1,004 injected faults. Integer-only attention, no LayerNorm, and bounded memory are enforced. Requires ViZDoom 1.3.2, Freedoom, Python 3.11+, Linux/macOS; MIT-licensed.

Read original