doomformer
Compile integer neural networks into DOOM maps and check them in ViZDoom
TLDR
SYNOPSIS
doomformer [--version] command [options]
DESCRIPTION
doomformer compiles integer neural networks (MLPs, spiking nets, transformers) into ZDoom maps and runs them in ViZDoom. Voodoo dolls (extra player-1 starts) do the arithmetic; sector light levels and plane heights hold the values. Python reads every exposed value back from the running game and compares it with a NumPy integer reference at tolerance 0.Install from Git with `pip install git+https://github.com/mottopanikeiku/doomformer` (Python 3.11+, Linux or macOS). The first map build needs git, cmake, a C compiler, and network access to fetch ACC, the ACS compiler. `doomformer doctor` checks that stack. Runs that open a window need a display; `--digit` and most other commands are headless.`--opt` selects the one-map schedule: 0 original, 1 dolls that cannot hit the same plane share a wave, 2 also uses tuned timing from the package, 3 also copies each layer through light accumulators with ACS. Tile-map mode (`demo` default, `mnist --tiles`) splits layers across maps and is not controlled by `--opt`.
PARAMETERS
--version
Print the installed package version.--opt 0-3
One-map schedule (see DESCRIPTION). Default 0 except draw and learn, which default to 3. Not valid on the tile-map demo.--workers N
Parallel ViZDoom processes (default: min of CPU count and 8).--seed N
Sampling or example seed. Meaning depends on the command.
COMMANDS
hello
Compile a tiny 4-6-5-3 integer MLP, run random inputs, and check every value. --cases N (default 5), --seed, --opt.doctor
Check Python, ViZDoom, Freedoom, and ACC; build ACC and compile an ACS probe if needed.draw
DrawPad: a 28x28 floor canvas, a READ switch, and a 7-segment display. Without --digit this opens a window (arrows to walk, Ctrl to ink, Space on READ). With --digit 0-9 the marine walks a built-in stroke headless. Default --opt 3. --seed picks stroke variant.mnist
Run the DrawPad MLP on MNIST test digits (default 4). --digits N, --all (10,000), --image PATH (your own digit), --tiles, --workers, --opt, --record PATH, --ray [ADDRESS].demo
A trained transformer writes a DOOM level name. Default: tile maps in a pool of games. --one-map puts one forward pass in a single map; --loop lets that map write the whole text; --until-eos stops at the end-of-text token; --softmax, --nightmare (doombrain), --fast (random-weight toy), --model, --prompt, --letters, --temperature, --seed, --workers, --png PATH.ask question
A 2-layer transformer answers a question about DOOM from a small fact set. --workers.plan model
Count dolls and sectors without building. model is a shipped name, a model directory, an MLP `.npz`, or a spiking-net `.json`. --opt, --explain.play wad
Walk a compiled map in a ViZDoom window (needs a display).museum action
Playable seven-segment museum map. action is build, verify, export, or shots.machine [program [args...]]
A counter machine or SUBLEQ machine in one map. `list` prints programs; example: `doomformer machine multiply 7 9`.learn digits
Online perceptron whose weights are ceiling heights. --steps, --classes, --opt (default 3).facts
Probe maps for engine limits (PASS/FAIL per fact). See `doomformer facts --help`.fuzz, verify, extract, lint, tune, bench
Differential fuzzing, domain verification, static netlist extraction, wave-schedule lint, timing calibration, and engine-time measurements. Each has its own flags; start from `doomformer` command --help.
CAVEATS
The first ACS build needs a compiler toolchain and GitHub access. Later runs reuse it.EXACT means DOOM matched the integer network. It does not mean a drawn digit was classified correctly.Without --digit, draw and play need a display. ViZDoom, Freedoom, and a working IWAD are required for almost every command.`--ray` needs the optional extra `pip install "doomformer[ray]"`.
