github.com via Hacker News

Doomformer compiles integer neural nets into playable DOOM maps

Open Source ai-business

TL;DR

  • An MNIST classifier compiled into a DOOM map scores 97.16% on 10,000 handwritten digits, with 9,716 correct.
  • Values are crowds of voodoo dolls, weights are floor lines, sums are sector light levels, ReLU is a staircase, attention is a ceiling.
  • The approach runs roughly 23,000× slower than NumPy and is restricted to integer arithmetic, with no LayerNorm support.

An MNIST classifier running inside a playable DOOM map correctly identifies 9,716 of 10,000 handwritten digits. The engine doing the arithmetic is DOOM itself.

Doomformer, posted to GitHub by a developer going by mottopanikeiku, compiles integer neural networks into DOOM maps where game mechanics perform the computation. Values are represented by crowds of voodoo dolls. Weights are encoded as lines on the floor, with each doll crossing adding the weight value. Sums are stored in sector light levels or floor plane heights. ReLU is implemented as staircase gates dolls must climb. Attention works by dolls squeezing under ceiling gates lowered by other values.

The verification bar is strict. The README states that "every value is read back and checked against NumPy with tolerance 0." All 248 exposed values in the MNIST model matched the NumPy reference exactly, and 20,000 random networks were fuzzed at range limits with zero mismatches.

The 97.16% figure is the full MNIST evaluation. A 1,000-digit sample scored 966 correct; the first 100 digits scored 99/100.

Two playable demos ship with the code. DrawPad lets the player sketch a digit on a 28×28 floor canvas; pressing READ activates 1,355 voodoo dolls that run inference and light a 7-segment display. Museum is a 136-doll level where pressing MUTATE rewires connections in real time, flipping a predicted 7 reading to a 1 by toggling a single weight.

The approach is deliberately slow, roughly 23,000× slower than NumPy, which the README attributes to idle conveyor belt mechanics. Models are restricted to integer arithmetic, and LayerNorm is not supported.

It arrives alongside a small run of adjacent oddities our open-source tracker caught this week, including TinyWorldformer running a world model on a Pi Pico 2 W.