<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>github.com/mottopanikeiku</title>
  <subtitle>Browse aymeric&#39;s, an independent, searchable archive of readable snapshots from followed feeds, preserved in Git with aggr.</subtitle>
  <id>https://aggr.aymericbeaumet.com/sources/github.com/mottopanikeiku/</id>
  <link rel="alternate" type="text/html" href="https://aggr.aymericbeaumet.com/sources/github.com/mottopanikeiku/"/>
  <link rel="self" type="application/atom+xml" href="https://aggr.aymericbeaumet.com/sources/github.com/mottopanikeiku/atom.xml"/>
  <updated>2026-10-29T23:25:46+00:00</updated>
  <author>
    <name>aymeric&#39;s</name>
  </author>
  <generator version="2.0.0" uri="https://github.com/aymericbeaumet/aggr">aggr</generator>
  <entry>
    <id>urn:aggr:item:535555895ff60c769ef75b5e1b7cb8da0b6770f4</id>
    <title type="text">Show HN: I Turned DOOM into a Transformer</title>
    <link rel="alternate" type="text/html" href="https://aggr.aymericbeaumet.com/items/hnrss-org/2026-10-29-show-hn-i-turned-doom-into-a-transformer/"/>
    <link rel="via" type="text/html" href="https://github.com/mottopanikeiku/doomformer"/>
    <published>2026-10-29T23:25:46+00:00</published>
    <updated>2026-10-29T23:25:46+00:00</updated>
    <author>
      <name>falperc</name>
    </author>
    <category term="news"/>
    <source>
      <title>Hacker News: Front Page</title>
    </source>
    <summary type="text">Instead of trying to run DOOM on things, I have instead decided to use DOOM (many, many, many doom games actually) to create a transformer. For a lot of the math required I essentially had to use DOOM game mechanics and voodoo dolls (DOOM…</summary>
    <content type="html">&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.4.0/banner_wide.png&quot;&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.4.0/banner_wide.png&quot; alt=&quot;DOOMFORMER: the marine fights a horde of demons under a hellish sky&quot; loading=&quot;eager&quot; decoding=&quot;async&quot; fetchpriority=&quot;high&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Neural networks computed by voodoo dolls inside DOOM maps.&lt;/strong&gt;&lt;br /&gt;
Every value is read back and checked against NumPy. Tolerance 0.&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/actions/workflows/tests.yml&quot;&gt;&lt;picture class=&quot;article-picture article-badge&quot; style=&quot;--image-width:160px;--image-ratio:160 / 24&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/actions/workflows/tests.yml/badge.svg&quot; width=&quot;160&quot; height=&quot;24&quot; alt=&quot;tests&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases&quot;&gt;&lt;picture class=&quot;article-picture article-badge&quot; style=&quot;--image-width:160px;--image-ratio:160 / 24&quot;&gt;&lt;img src=&quot;https://camo.githubusercontent.com/bd90ae1758c512eefd27c9166c2687910317d20c7e48a052a3b85b95d1b3918e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d6f74746f70616e696b65696b752f646f6f6d666f726d65723f636f6c6f723d386230303030&quot; width=&quot;160&quot; height=&quot;24&quot; alt=&quot;release&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://camo.githubusercontent.com/96abf9b704f80578ea56dd10cab0d911c56d46dbec347f431ece9cf60ac175ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d332e31312532422d626c7565&quot;&gt;&lt;picture class=&quot;article-picture article-badge&quot; style=&quot;--image-width:160px;--image-ratio:160 / 24&quot;&gt;&lt;img src=&quot;https://camo.githubusercontent.com/96abf9b704f80578ea56dd10cab0d911c56d46dbec347f431ece9cf60ac175ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d332e31312532422d626c7565&quot; width=&quot;160&quot; height=&quot;24&quot; alt=&quot;Python 3.11+&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/LICENSE&quot;&gt;&lt;picture class=&quot;article-picture article-badge&quot; style=&quot;--image-width:160px;--image-ratio:160 / 24&quot;&gt;&lt;img src=&quot;https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565&quot; width=&quot;160&quot; height=&quot;24&quot; alt=&quot;MIT&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://colab.research.google.com/github/mottopanikeiku/doomformer/blob/main/examples/doomformer_colab.ipynb&quot;&gt;&lt;picture class=&quot;article-picture article-badge&quot; style=&quot;--image-width:160px;--image-ratio:160 / 24&quot;&gt;&lt;img src=&quot;https://camo.githubusercontent.com/eff96fda6b2e0fff8cdf2978f89d61aa434bb98c00453ae23dd0aab8d1451633/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667&quot; width=&quot;160&quot; height=&quot;24&quot; alt=&quot;Open in Colab&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer#quick-start&quot;&gt;Quick start&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer#walk-a-digit-doom-reads-it&quot;&gt;Walk a digit&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer#the-museum-rewire-one-connection&quot;&gt;The museum&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer#how-it-works&quot;&gt;How it works&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer#what-is-checked&quot;&gt;What is checked&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://mottopanikeiku.github.io/doomformer/&quot;&gt;Films&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/README.md&quot;&gt;Docs&lt;/a&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;10,000 / 10,000&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;1,355&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;4&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MNIST test digits exact&lt;/td&gt;
&lt;td&gt;voodoo dolls in one MNIST map&lt;/td&gt;
&lt;td&gt;mismatches in 20,000 fuzzed nets&lt;/td&gt;
&lt;td&gt;other DOOM engines run the museum exactly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.4.0/ladder.png&quot;&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.4.0/ladder.png&quot; alt=&quot;A number is a crowd of voodoo dolls. A weight is a line on the floor. A sum is a light level or a height. An activation is a staircase. Attention is a ceiling. Every value is read back and compared with NumPy: tolerance 0.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;&lt;span class=&quot;code-snippet&quot; data-language=&quot;Shell&quot;&gt;&lt;span class=&quot;syntax-source syntax-shell syntax-bash&quot;&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;pip&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; install git+https://github.com/mottopanikeiku/doomformer   &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; Python 3.11+, Linux or macOS&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;doomformer&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; hello             &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; 2 s: a small MLP, every value checked&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;doomformer&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; draw&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;digit&lt;/span&gt; 7    &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; 15 s: the marine walks a 7 and the level reads it&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;doomformer doctor&lt;/code&gt; checks your setup. It builds ACC, the ACS compiler, if it is missing. That needs git, cmake and a C compiler. On Fedora: &lt;code&gt;sudo dnf install git cmake gcc gcc-c++ make&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Tip&lt;/p&gt;
&lt;p&gt;No install needed for the &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://colab.research.google.com/github/mottopanikeiku/doomformer/blob/main/examples/doomformer_colab.ipynb&quot;&gt;Colab notebook&lt;/a&gt;. Draw a digit in your browser and DOOM reads it.&lt;/p&gt;
&lt;h2&gt;Walk a digit, DOOM reads it&lt;/h2&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.1.0/drawpad.gif&quot;&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.1.0/drawpad.gif&quot; alt=&quot;DrawPad: the marine walks a 7 across a 28x28 floor canvas, presses READ, and the winning voodoo doll lights a 7 on a 7-segment display&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The marine holds FIRE and inks the floor. Then he presses READ.&lt;/p&gt;
&lt;p&gt;1,355 voodoo dolls in the same map run an MNIST network. The winning digit&#39;s doll crosses a line. That line lights the digit on the display.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;code-snippet&quot;&gt;          ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
       ▄████████████████
       ████▀▀     ▀████▀
       ▀▀▀        ▄███▀
                  ████
                  ███
                  ███
                  ███
                 ████
                 ███▀
                 ████
                 ▀███

DOOM reads: 7  (right)   -- the winner&amp;#39;s doll lit it on the 7-segment display
EXACT: all 248 values DOOM computed [...] equal the NumPy integer reference (tolerance 0)
READ pass: 273 game tics = 8 s of real-time DOOM at 35 tics/s, 3 s wall [...]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Python reads back 248 values and checks every one. With &lt;code&gt;--digit&lt;/code&gt;, Python presses the keys for you. Without it, you walk and draw yourself. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/commands.md#doomformer-draw---digit-7&quot;&gt;Full output&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note&lt;/p&gt;
&lt;p&gt;EXACT means DOOM got the same numbers as the integer network. It does not mean the digit is right.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;run&lt;/th&gt;
&lt;th&gt;right&lt;/th&gt;
&lt;th&gt;exact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;first 100 MNIST test digits&lt;/td&gt;
&lt;td&gt;99&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1,000 sampled test digits, one map each&lt;/td&gt;
&lt;td&gt;966&lt;/td&gt;
&lt;td&gt;1,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;all 10,000 test digits, tile maps&lt;/td&gt;
&lt;td&gt;9,716 (97.16 %)&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The float model scores 97.58 %. The network also trained on the strokes the scripted marine walks. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/drawpad.md&quot;&gt;Details&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://mottopanikeiku.github.io/doomformer/#drawpad&quot;&gt;Film&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.1.0/mnist.png&quot;&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.1.0/mnist.png&quot; alt=&quot;eight MNIST test digits and what DOOM read: 7 2 1 0 4 9 6 3, all exact&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;The museum: rewire one connection&lt;/h2&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.7.1/museum_mutate.png&quot;&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.7.1/museum_mutate.png&quot; alt=&quot;Two views of one doll lane. Before MUTATE, DOOM reads 7 and the doll has passed its gate. After MUTATE, DOOM reads 1 and the same voodoo doll stands at its gate.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tip&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Play it without Python.&lt;/strong&gt; Download &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.7.1/museum.wad&quot;&gt;museum.wad&lt;/a&gt; (&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.7.1/museum_SHA256SUMS.txt&quot;&gt;sha256&lt;/a&gt;) and the free &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://freedoom.github.io/download.html&quot;&gt;Freedoom&lt;/a&gt; IWAD. Then run &lt;code&gt;gzdoom -iwad freedoom2.wad -file museum.wad&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Step on seven floor pads to light a digit. Press READ. 136 voodoo dolls run a tiny network and light the answer.&lt;/p&gt;
&lt;p&gt;Press MUTATE and the level rewires one connection while it runs. The same 7 now reads as 1. You can watch it happen: one doll stops at its gate.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;code-snippet&quot; data-language=&quot;Shell&quot;&gt;&lt;span class=&quot;syntax-source syntax-shell syntax-bash&quot;&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;$&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; doomformer museum verify&lt;/span&gt;
&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt;                        pads abc     w_7a +1  DOOM reads 7  scores &lt;span class=&quot;syntax-keyword syntax-control syntax-regexp syntax-set syntax-begin syntax-shell&quot;&gt;[&lt;/span&gt;4, 6, 3, 5, 4, 3, 2, 7, 3, 4&lt;span class=&quot;syntax-keyword syntax-control syntax-regexp syntax-set syntax-end syntax-shell&quot;&gt;]&lt;/span&gt;  EXACT (148 values&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-logical syntax-continue syntax-shell&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;744&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; tics&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-logical syntax-continue syntax-shell&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;[...]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-post-cmd syntax-shell&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; after MUTATE           pads abc     w_7a&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; -&lt;/span&gt;1&lt;/span&gt;  DOOM reads 1  scores &lt;span class=&quot;syntax-keyword syntax-control syntax-regexp syntax-set syntax-begin syntax-shell&quot;&gt;[&lt;/span&gt;4, 6, 3, 5, 4, 3, 2, 5, 3, 4&lt;span class=&quot;syntax-keyword syntax-control syntax-regexp syntax-set syntax-end syntax-shell&quot;&gt;]&lt;/span&gt;  EXACT (148 values&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-logical syntax-continue syntax-shell&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;744&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; tics&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-logical syntax-continue syntax-shell&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;[...]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-post-cmd syntax-shell&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; after RESTORE          pads abc     w_7a +1  DOOM reads 7  scores &lt;span class=&quot;syntax-keyword syntax-control syntax-regexp syntax-set syntax-begin syntax-shell&quot;&gt;[&lt;/span&gt;4, 6, 3, 5, 4, 3, 2, 7, 3, 4&lt;span class=&quot;syntax-keyword syntax-control syntax-regexp syntax-set syntax-end syntax-shell&quot;&gt;]&lt;/span&gt;  EXACT (148 values&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-logical syntax-continue syntax-shell&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;744&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; tics&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-logical syntax-continue syntax-shell&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;[...]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-post-cmd syntax-shell&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A self-test version runs exactly in GZDoom, LZDoom, UZDoom and ZDoom 2.8.1. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/museum.md&quot;&gt;Details&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;How it works&lt;/h2&gt;
&lt;p&gt;Every part of a network becomes a part of the map:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;in a neural network&lt;/th&gt;
&lt;th&gt;in the DOOM map&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;a value of 5&lt;/td&gt;
&lt;td&gt;5 voodoo dolls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;a weight&lt;/td&gt;
&lt;td&gt;a line on the floor; each doll that crosses it adds the weight&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;a sum&lt;/td&gt;
&lt;td&gt;a sector&#39;s light level or floor height&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;an activation (ReLU)&lt;/td&gt;
&lt;td&gt;a staircase of gates the dolls must climb&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;attention&lt;/td&gt;
&lt;td&gt;dolls squeezing under ceilings that another value lowered&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;a lesion&lt;/td&gt;
&lt;td&gt;a closed door&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;One layer, from dolls to dolls:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;code-snippet&quot;&gt;flowchart LR
    A[&amp;quot;input value&amp;lt;br/&amp;gt;= a crowd of dolls&amp;quot;] --&amp;gt; B[&amp;quot;weight lines&amp;lt;br/&amp;gt;each crossing adds w&amp;quot;]
    B --&amp;gt; C[&amp;quot;the sum&amp;lt;br/&amp;gt;= a light level or height&amp;quot;]
    C --&amp;gt; D[&amp;quot;staircase of gates&amp;lt;br/&amp;gt;= the activation&amp;quot;]
    D --&amp;gt; E[&amp;quot;next layer&amp;#39;s dolls&amp;quot;]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Loading&lt;/p&gt;
&lt;p&gt;The engine has sharp edges, and the compiler works around them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A floor mover ignores a second request while it is still moving.&lt;/li&gt;
&lt;li&gt;A teleport cancels lines a doll crossed earlier in the same tic.&lt;/li&gt;
&lt;li&gt;Things far from a BSP node can land in the wrong room, so every map fits in 32,000 units.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;doomformer facts&lt;/code&gt; checks these in about 10 s. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/HOW_IT_WORKS.md#engine-facts&quot;&gt;Engine facts&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/HOW_IT_WORKS.md#engine-features-it-needs&quot;&gt;Engine features it needs&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/engine_limits.md#other-ports&quot;&gt;Other ports&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Computers in DOOM maps are not new. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://www.wad-archive.com/wad/8d0de31d8b392fc2d7fd817e933b3cf43bca799a&quot;&gt;counter.wad&lt;/a&gt; counts with voodoo dolls, &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/pwiecz/conway.wad&quot;&gt;conway.wad&lt;/a&gt; runs Game of Life, and &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/nukep/doom-calculator&quot;&gt;Danny Spencer&#39;s calculator&lt;/a&gt; adds numbers. New here: a compiler for neural networks, and an exact check on every value. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/related_work.md&quot;&gt;Related work&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;What is checked&lt;/h2&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.4.0/pipeline.png&quot;&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.4.0/pipeline.png&quot; alt=&quot;Pipeline: your network becomes integers and a DOOM map, ViZDoom runs it and Python reads the values back (light levels and plane heights). A NumPy integer reference, which never sees the map, computes the same values. Every value is compared with tolerance 0: EXACT or MismatchError.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Every run compares each value the map exposes with NumPy. That proves the inputs that ran, nothing more. So the repo also attacks its own check:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;attack&lt;/th&gt;
&lt;th&gt;result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tamper&lt;/strong&gt; with one weight line&lt;/td&gt;
&lt;td&gt;the check fails on exactly the inputs that cross it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fuzz&lt;/strong&gt; 20,000 random nets at the range limits&lt;/td&gt;
&lt;td&gt;0 mismatches; CI fuzzes a fresh seed on every push&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mutate&lt;/strong&gt; one line of a map, 1,004 times&lt;/td&gt;
&lt;td&gt;297 caught; no survivor is proven harmless&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Extract&lt;/strong&gt; the weights back out of the map, without DOOM&lt;/td&gt;
&lt;td&gt;equal to the source net&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Guard&lt;/strong&gt; every readout page with a poison value&lt;/td&gt;
&lt;td&gt;a page that never runs cannot pass old values&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The MNIST map exposes 248 values. It does not expose its 903 staircase counts and 1,351 gate comparisons. Those are checked only through the sums they feed. Fuzzing and tests found four bugs in the compiler. All are fixed. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/verification.md&quot;&gt;Verification&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who computes what&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;run&lt;/th&gt;
&lt;th&gt;Python&lt;/th&gt;
&lt;th&gt;voodoo dolls&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mnist&lt;/code&gt;, &lt;code&gt;df.compile&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;writes the inputs, waits, reads&lt;/td&gt;
&lt;td&gt;every sum, activation, comparison and the choice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;demo&lt;/code&gt;, &lt;code&gt;ask&lt;/code&gt; (tile maps)&lt;/td&gt;
&lt;td&gt;writes tokens, copies values between maps, samples letters&lt;/td&gt;
&lt;td&gt;every sum and activation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;draw&lt;/code&gt;, &lt;code&gt;--loop&lt;/code&gt;, the marine&#39;s brain, the fly&lt;/td&gt;
&lt;td&gt;only advances the clock and reads&lt;/td&gt;
&lt;td&gt;everything, including the choice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;machine&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;loads the program, then advances the clock and reads&lt;/td&gt;
&lt;td&gt;program counter and registers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;museum&lt;/code&gt;, played in GZDoom&lt;/td&gt;
&lt;td&gt;nothing&lt;/td&gt;
&lt;td&gt;every sum, comparison and the choice&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;ACS level scripts move gates, rewind the dolls, sense the world and copy results out. Two do more. &lt;code&gt;df.Agent&lt;/code&gt; takes an argmax in ACS. &lt;code&gt;--opt 3&lt;/code&gt; copies each layer&#39;s values into the next layer with a script. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/HOW_IT_WORKS.md#who-does-what-per-demo&quot;&gt;Per demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The maps need ZDoom (UDMF and ACS). This repo runs &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/Farama-Foundation/ViZDoom&quot;&gt;ViZDoom&lt;/a&gt; 1.3.2 with Freedoom assets.&lt;/p&gt;
&lt;h2&gt;Commands&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What DOOM does&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Skill level&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer hello&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a small MLP, 5 random inputs&lt;/td&gt;
&lt;td&gt;2 s&lt;/td&gt;
&lt;td&gt;I&#39;m too young to die&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer draw --digit 7&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the marine walks a 7, the level reads it&lt;/td&gt;
&lt;td&gt;15 s&lt;/td&gt;
&lt;td&gt;Hey, not too rough&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer museum build&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a playable map that reads a digit&lt;/td&gt;
&lt;td&gt;1 s&lt;/td&gt;
&lt;td&gt;Hey, not too rough&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer mnist&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;reads 4 test digits, or your own image&lt;/td&gt;
&lt;td&gt;1.5 to 3 min&lt;/td&gt;
&lt;td&gt;Hurt me plenty&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer demo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a transformer writes a level name&lt;/td&gt;
&lt;td&gt;15 to 60 s&lt;/td&gt;
&lt;td&gt;Hurt me plenty&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer machine subleq all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a tiny computer runs three programs&lt;/td&gt;
&lt;td&gt;about 5 min&lt;/td&gt;
&lt;td&gt;Ultra-Violence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer learn digits --classes 4 --steps 300&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a blank brain learns digits inside the map&lt;/td&gt;
&lt;td&gt;about 5 min&lt;/td&gt;
&lt;td&gt;Ultra-Violence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer ask &amp;quot;what does iddqd do&amp;quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;answers from 189 DOOM facts&lt;/td&gt;
&lt;td&gt;about 11 min&lt;/td&gt;
&lt;td&gt;Ultra-Violence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;doomformer demo --nightmare&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the 2-layer model, 106 tile maps&lt;/td&gt;
&lt;td&gt;3.5 to 7 min&lt;/td&gt;
&lt;td&gt;Nightmare!&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Times are from a 16-core arm64 Linux machine. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/commands.md&quot;&gt;Every command&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some outputs are picked. DEMON CANYON, the name &lt;code&gt;--nightmare&lt;/code&gt; writes, is one hand-picked sample. &lt;code&gt;ask&lt;/code&gt; gets 94.7 % of its training questions right, and 35.4 % of new wordings.&lt;/p&gt;
&lt;h2&gt;Bigger experiments&lt;/h2&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.1.0/hero.gif&quot;&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://github.com/mottopanikeiku/doomformer/releases/download/v0.1.0/hero.gif&quot; alt=&quot;His brain is the level: the marine fights a demon while 1,345 dots on the right, voodoo dolls of him, run his policy transformer&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;His brain is the level.&lt;/strong&gt; The level senses the nearest demon. 1,345 voodoo dolls of the marine run his brain and pick an action. The level turns him and fires. Python only steps the clock and reads. 50 of 50 decisions are exact. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://mottopanikeiku.github.io/doomformer/#brain&quot;&gt;Film&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/demos/brainlevel.py&quot;&gt;Code&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Warning&lt;/p&gt;
&lt;p&gt;He is not playable. One decision takes 22 s of game time, and the demons are frozen while he thinks. With the demons awake (&lt;code&gt;--live&lt;/code&gt;), he dies in 5.5 s without a kill. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/DEMOS.md#live-demons-what-the-latency-costs-him&quot;&gt;Live demons&lt;/a&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;run it from a clone&lt;/th&gt;
&lt;th&gt;what you see&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;python -m demos.brainlevel&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;his brain is the level&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;python -m demos.brainlevel --live&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the same brain against awake demons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;python -m demos.brainlevel --lesion-when near&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the level closes neuron doors when a demon gets close&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;python -m demos.aimlearn&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a perceptron learns to aim inside one game&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;python -m demos.flyloop&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a fruit-fly circuit drives the marine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;python -m demos.lobotomy&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;lesions that turn him into a pacifist&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/DEMOS.md&quot;&gt;All demos, numbers and picked seeds&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Build your own&lt;/h2&gt;
&lt;p&gt;Compile a network into a map. Let its outputs open doors, flash lights or shove the marine. This runs as pasted:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;&lt;span class=&quot;code-snippet&quot; data-language=&quot;Python&quot;&gt;&lt;span class=&quot;syntax-source syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-statement syntax-import syntax-python&quot;&gt;&lt;span class=&quot;syntax-keyword syntax-control syntax-import syntax-python&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;numpy&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;syntax-keyword syntax-control syntax-import syntax-as syntax-python&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;syntax-meta syntax-statement syntax-import syntax-python&quot;&gt;&lt;span class=&quot;syntax-keyword syntax-control syntax-import syntax-python&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;doomformer&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;syntax-keyword syntax-control syntax-import syntax-as syntax-python&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;df&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-python&quot;&gt;#&lt;/span&gt; 2 inputs -&amp;gt; [a AND b, a OR b] -&amp;gt; 2 outputs, all integers
&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;net&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;syntax-keyword syntax-operator syntax-assignment syntax-python&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;MLP&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;
    &lt;span class=&quot;syntax-variable syntax-parameter syntax-python&quot;&gt;weights&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-assignment syntax-python&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-arguments syntax-python&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;syntax-variable syntax-parameter syntax-python&quot;&gt;biases&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-assignment syntax-python&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-arithmetic syntax-python&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-arguments syntax-python&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;syntax-variable syntax-parameter syntax-python&quot;&gt;thresholds&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-assignment syntax-python&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-arguments syntax-python&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;syntax-variable syntax-parameter syntax-python&quot;&gt;signed_input&lt;/span&gt;&lt;span class=&quot;syntax-keyword syntax-operator syntax-assignment syntax-python&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-language syntax-python&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-arguments syntax-python&quot;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;syntax-meta syntax-statement syntax-with syntax-python&quot;&gt;&lt;span class=&quot;syntax-keyword syntax-control syntax-flow syntax-with syntax-python&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;compile&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;net&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-statement syntax-with syntax-python&quot;&gt;&lt;span class=&quot;syntax-keyword syntax-control syntax-flow syntax-with syntax-as syntax-python&quot;&gt;as&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-statement syntax-with syntax-python&quot;&gt; &lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;brain&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-block syntax-with syntax-python&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;syntax-meta syntax-statement syntax-for syntax-python&quot;&gt;&lt;span class=&quot;syntax-keyword syntax-control syntax-flow syntax-for syntax-python&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-statement syntax-for syntax-python&quot;&gt;&lt;span class=&quot;syntax-keyword syntax-control syntax-flow syntax-for syntax-in syntax-python&quot;&gt;in&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-statement syntax-for syntax-python&quot;&gt; &lt;span class=&quot;syntax-meta syntax-group syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-group syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-tuple syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-tuple syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-group syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-block syntax-for syntax-python&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-python&quot;&gt;#&lt;/span&gt; computed by voodoo dolls; raises df.MismatchError on any difference from net.reference
&lt;/span&gt;        &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-support syntax-function syntax-builtin syntax-python&quot;&gt;print&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-arguments syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-string syntax-python&quot;&gt;&lt;span class=&quot;syntax-string syntax-quoted syntax-double syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-string syntax-python&quot;&gt;&lt;span class=&quot;syntax-string syntax-quoted syntax-double syntax-python&quot;&gt;-&amp;gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-end syntax-python&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-arguments syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;brain&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;tolist&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;brain&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;record&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-function-call syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-generic-name syntax-python&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-accessor syntax-dot syntax-python&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-qualified-name syntax-python&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-python&quot;&gt;array&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-python&quot;&gt;&lt;span class=&quot;syntax-meta syntax-structure syntax-list syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-begin syntax-python&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-list syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-list syntax-end syntax-python&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-separator syntax-arguments syntax-python&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;syntax-meta syntax-string syntax-python&quot;&gt;&lt;span class=&quot;syntax-string syntax-quoted syntax-double syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-string syntax-python&quot;&gt;&lt;span class=&quot;syntax-string syntax-quoted syntax-double syntax-python&quot;&gt;dolls.gif&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-end syntax-python&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python&quot;&gt;)&lt;/span&gt;&lt;/span&gt;   &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-python&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-python&quot;&gt;#&lt;/span&gt; film the dolls doing it
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;df.MLP.from_torch&lt;/code&gt; converts a PyTorch model (&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/examples/02_pytorch_to_doom.py&quot;&gt;example 02&lt;/a&gt;). The &lt;code&gt;world&lt;/code&gt; and &lt;code&gt;actions&lt;/code&gt; hooks wire outputs to doors, lights and thrusts (&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/examples/03_brain_opens_doors.py&quot;&gt;example 03&lt;/a&gt;). &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/BUILD_YOUR_OWN.md&quot;&gt;Guide&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/examples&quot;&gt;12 examples&lt;/a&gt; · &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/issues/new/choose&quot;&gt;Show and tell&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Many games at once&lt;/h2&gt;
&lt;p&gt;One map runs in one game, on one core. &lt;code&gt;df.run_many&lt;/code&gt; spreads inputs over many games, or over a Ray cluster. A network can also be split into tile maps, one per layer. Then Python copies values between them.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;run&lt;/th&gt;
&lt;th&gt;digits&lt;/th&gt;
&lt;th&gt;right&lt;/th&gt;
&lt;th&gt;exact&lt;/th&gt;
&lt;th&gt;time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;one map, 14 games&lt;/td&gt;
&lt;td&gt;1,000&lt;/td&gt;
&lt;td&gt;966&lt;/td&gt;
&lt;td&gt;1,000&lt;/td&gt;
&lt;td&gt;2 h&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4 tile maps, 6 games&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;td&gt;9,716&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;td&gt;23 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;&lt;span class=&quot;code-snippet&quot; data-language=&quot;Shell&quot;&gt;&lt;span class=&quot;syntax-source syntax-shell syntax-bash&quot;&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;doomformer&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; mnist&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;tiles&lt;/span&gt;&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;all&lt;/span&gt;&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;workers&lt;/span&gt; 6         &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; all 10,000 digits as tile maps, about 23 min&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;pip&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; install &lt;span class=&quot;syntax-string syntax-quoted syntax-double syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-begin syntax-shell&quot;&gt;&amp;quot;&lt;/span&gt;doomformer[ray]&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-end syntax-shell&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;ray&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; start&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;head                  &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; other machines: ray start --address=HEAD:6379&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;doomformer&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; mnist&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;all&lt;/span&gt;&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;ray&lt;/span&gt;&lt;span class=&quot;syntax-variable syntax-parameter syntax-option syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-parameter syntax-shell&quot;&gt; --&lt;/span&gt;record&lt;/span&gt; mnist.json   &lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; all 10,000 digits, one map each, on a cluster&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Budget one core and 1.3 GB of RAM per game. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/scaling.md#scaling-out-many-games-many-machines&quot;&gt;Scaling&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;More&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;what&lt;/th&gt;
&lt;th&gt;try&lt;/th&gt;
&lt;th&gt;read&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Faster schedules: MNIST in one map from 5,696 to 272 tics&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--opt 3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/scheduling.md&quot;&gt;scheduling&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A counter machine: 7 × 9 = 63 in 464 checked steps&lt;/td&gt;
&lt;td&gt;&lt;code&gt;doomformer machine multiply 7 9&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/machine.md&quot;&gt;machine&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A SUBLEQ machine with self-modifying code&lt;/td&gt;
&lt;td&gt;&lt;code&gt;doomformer machine subleq all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/machine.md&quot;&gt;machine&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A blank brain learns digits in the map: 71 % held-out&lt;/td&gt;
&lt;td&gt;&lt;code&gt;doomformer learn digits&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/learning.md&quot;&gt;learning&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PyTorch import with BatchNorm, pooling and QAT&lt;/td&gt;
&lt;td&gt;&lt;code&gt;MLP.from_torch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/interop.md&quot;&gt;interop&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A transformer that learned induction, exact in DOOM&lt;/td&gt;
&lt;td&gt;&lt;code&gt;python -m demos.induction&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/models/induction/EVAL.md&quot;&gt;induction&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Patching, lesions and steering, checked in DOOM&lt;/td&gt;
&lt;td&gt;&lt;code&gt;intref.forward(interventions=...)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/interventions.md&quot;&gt;interventions&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speed per pass and throughput&lt;/td&gt;
&lt;td&gt;&lt;code&gt;doomformer bench&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/scaling.md&quot;&gt;scaling&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Limits&lt;/h2&gt;
&lt;p&gt;Important&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Slow.&lt;/strong&gt; A small MLP runs about 23,000 times slower than NumPy. Most of the time goes to idle conveyor belts. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/HOW_IT_WORKS.md#speed&quot;&gt;Speed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Only the runs are checked.&lt;/strong&gt; Inputs that never ran are not covered. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/verification.md#not-covered&quot;&gt;Not covered&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integer models.&lt;/strong&gt; Attention is integer attention. No model has LayerNorm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ViZDoom first.&lt;/strong&gt; Other DOOM engines ran only small maps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No reinforcement learning.&lt;/strong&gt; The marine copies a scripted aimbot.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Finite machines.&lt;/strong&gt; Memory is bounded. Nothing here claims DOOM is Turing complete.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Picked samples.&lt;/strong&gt; Showcased seeds and names are picked. &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/DEMOS.md#seeds-and-selection&quot;&gt;The list&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What&#39;s in the box&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;What it holds&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/doomformer&quot;&gt;&lt;code&gt;doomformer/&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;the toolkit: map compiler, DOOM runtime, exact checks, CLI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/demos&quot;&gt;&lt;code&gt;demos/&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;research code: the marine&#39;s brain, the level generator, the fly circuit, the learning arena&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/training&quot;&gt;&lt;code&gt;training/&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;training scripts for every model, with the data and sources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/models&quot;&gt;&lt;code&gt;models/&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;every trained model with its training log and evaluation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/examples&quot;&gt;&lt;code&gt;examples/&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;twelve one-file examples, most under 15 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/tests&quot;&gt;&lt;code&gt;tests/&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;496 tests; CI runs them against real headless DOOM on Linux and macOS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/README.md&quot;&gt;&lt;code&gt;docs/&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;how it works, every demo with its numbers, the engine facts, the guide, &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/docs/commands.md&quot;&gt;every command&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/CHANGELOG.md&quot;&gt;&lt;code&gt;CHANGELOG.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;what each release added&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Licensing&lt;/h2&gt;
&lt;p&gt;Code and docs: &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/LICENSE&quot;&gt;MIT&lt;/a&gt;. Data keeps its own licence (&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/mottopanikeiku/doomformer/blob/main/THIRD_PARTY.md&quot;&gt;THIRD_PARTY.md&lt;/a&gt;). The level-name lists come from the Doom Wiki (CC BY-SA 4.0) and id Software&#39;s source (GPL-2.0). The 100 sample MNIST digits are CC BY-SA 3.0. The fruit-fly circuits in &lt;code&gt;models/fly&lt;/code&gt; come from the FlyWire connectome (CC BY-NC 4.0, non-commercial). Freedoom graphics are BSD-licensed. DOOM is a trademark of id Software / ZeniMax. This project is not affiliated with them.&lt;/p&gt;
</content>
  </entry>
</feed>
