Programmer Runs Doom With 544 Regex Rules, One Frame Takes Minutes
The project demonstrates that DOOM can run through pure string rewriting, relying on the Turing completeness of regular expressions, which is a notable technical curiosity in the long history of unusual DOOM ports.
Reporting from 1 source: Automaton.
A programmer named Artem Lytkin has created 'doom-regex', a project that runs the classic FPS DOOM using only regular expressions. The entire machine state is encoded in a 96.6 MB string, and 544 replacement rules process it step by step. Each frame takes about three minutes, making real-time play impractical.
The project, announced on Reddit on July 26, encodes the entire virtual machine state, including CPU registers, memory, and frame buffer, into a single 96.6 MB string. A set of 544 regular expression replacement rules, applied in fixed order, simulate each CPU instruction. For example, a MOVI instruction is matched by a rule that reads the destination register and immediate value from the string, then rewrites the register and advances the phase counter.
There is no interpreter or arithmetic outside the rules; the driver simply applies replacements. The approach works because string rewriting with regular expressions is Turing complete. A playable demo for Windows and the source code are available on GitHub, though the rendering speed of roughly three minutes per frame limits it to a technical demonstration rather than a playable experience.
Synthesized by Yomimono from the 1 cited source below, including Japanese-language reporting where cited, then editorially reviewed before publishing.