LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Hacks & Buildsdoomneural-networksmnistopen-sourcevoodoo-dolls

Doomformer Compiles a Neural Network Into a DOOM Map Where Voodoo Dolls Do the Math, and Every Value Matches NumPy Exactly

An open-source tool turns an integer neural network into a playable DOOM level, where crowds of voodoo dolls carry the numbers, and it reads 10,000 of 10,000 MNIST test digits with the same values NumPy computes, at tolerance zero.

Chris as a pegboard figure pressing a peg-doll into a gridded pegboard map lined with little peg-demons, a glowing path passing from hole to hole between them.
Illustration: LockerGnome

Voodoo dolls are a 1993 DOOM accident. A mapper could place a second, duplicate player start, and the engine would spawn a ghost copy of you somewhere in the level, wired to your body, so that stepping on a line in one room would move walls in another. For thirty years that quirk has powered elaborate map tricks. Doomformer, released this month by a developer who goes by mottopanikeiku, points it at a neural network.

The mapping is literal, and the repository lays it out as a table. A value of five is a crowd of five voodoo dolls. A weight is a line painted on the floor; each doll that crosses it adds that weight to a running total. A sum is a sector’s light level or its floor height. A ReLU activation is a staircase of gates the dolls have to climb. Attention is dolls squeezing under ceilings that an earlier value lowered. A lesioned neuron is a door held shut.

The headline build is an MNIST digit reader. It packs 1,355 voodoo dolls into a single map, and when the marine inks a digit on a floor canvas and presses a READ switch, the dolls run the network and the winning digit lights up on a seven-segment display inside the level. Across all 10,000 MNIST test images, the project reports the map scoring 97.16 percent, which trails its own floating-point model by less than half a point.

https://mottopanikeiku.github.io/doomformer/

Scoring well is not the claim that matters. The claim is exactness. Every run reads back the values the map exposes, 248 of them for the MNIST map, and compares each against a NumPy integer reference that never touches DOOM. The README states the result plainly: all 10,000 of 10,000 test digits match “the NumPy integer reference (tolerance 0).” The project also fuzzed 20,000 random networks at the edges of their number ranges and found, in its own words, “0 mismatches,” with a fresh seed fuzzed on every push to its test suite.

The project then spends a section trying to break its own proof. Tampering with one weight line makes the check fail on exactly the inputs that cross it. Pulling the weights back out of the finished map, without running DOOM at all, returns the original network. A poison value guards every readout so a page that never actually ran cannot smuggle an old answer through. The authors note that fuzzing and testing turned up four bugs in the compiler, and that all four are fixed, which is the sort of admission that makes the zeros more believable, not less.

You do not need Python to see it move. The repository ships museum.wad, a 136-doll version you load in GZDoom alongside the free Freedoom data files. You step on floor pads to light a digit, press READ, and the dolls compute the answer. Press a MUTATE switch and the level rewires one connection mid-run, so a 7 now reads as a 1, and you can watch the single doll that stops at its gate. That self-test map runs identically, the project says, in GZDoom, LZDoom, UZDoom, and ZDoom 2.8.1.

The slow part is the point of the joke. A small network runs about 23,000 times slower in DOOM than in NumPy, because most of the time the dolls are riding idle conveyor belts between layers. The marine who runs his own policy network as the level takes 22 seconds of game time to make one decision, and against awake demons he dies in five and a half seconds without a kill.

The open question is how far up the map scales. The project is candid that other DOOM engines only ran its small maps, that its models are integer-only with no LayerNorm, and that nothing here claims DOOM is Turing complete. What it does claim, and backs with a readout for every value, is that a horde of 1993 ghost-dolls can run a modern classifier and get the same numbers a GPU would. The next thing worth watching is whether anyone compiles something bigger than a digit reader into a level you can walk.

More Hacks & Builds

Every Hacks & Builds story →