<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Teaching a model to write Magic cards by building the compiler first on Arthur Baboin</title><link>https://blog.deadgate.fr/stories/mtg-compiler/</link><description>Recent content in Teaching a model to write Magic cards by building the compiler first on Arthur Baboin</description><generator>Hugo</generator><language>en</language><copyright>© Arthur Baboin</copyright><lastBuildDate>Sat, 11 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.deadgate.fr/stories/mtg-compiler/index.xml" rel="self" type="application/rss+xml"/><item><title>A joke about fake Magic cards, and the wall I hit trying to make it real</title><link>https://blog.deadgate.fr/stories/mtg-compiler/01-the-joke/</link><pubDate>Sat, 27 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.deadgate.fr/stories/mtg-compiler/01-the-joke/</guid><description>&lt;p&gt;&lt;em&gt;This is the first in a series about building a small language model that writes Magic: The Gathering cards into a compiler I built by hand. This one is the origin story: how a joke turned into a problem I couldn&amp;rsquo;t put down, and the wall that made everything after it necessary. You don&amp;rsquo;t need to know anything about Magic to follow along: where the game matters, I&amp;rsquo;ll explain it.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>I'd never built a compiler. Here's where my instincts were wrong.</title><link>https://blog.deadgate.fr/stories/mtg-compiler/02-building-the-compiler/</link><pubDate>Sat, 27 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.deadgate.fr/stories/mtg-compiler/02-building-the-compiler/</guid><description>&lt;p&gt;&lt;em&gt;This is the second piece in a series about building a small language model that writes
Magic: The Gathering cards into a compiler I built by hand.
&lt;a href="../01-the-joke" &gt;The first piece&lt;/a&gt; ended where this one starts:
I&amp;rsquo;d decided the only way out was to stop asking a language model to write valid Magic text directly,
and instead have it target a structured format I could check mechanically.
That meant building a compiler.
I had never built one.
This is the story of being wrong about that three times before I got it right.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>My coding agents kept cheating. I was building the cheat detector for months before I knew its name.</title><link>https://blog.deadgate.fr/stories/mtg-compiler/03-reward-hacking/</link><pubDate>Sun, 28 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.deadgate.fr/stories/mtg-compiler/03-reward-hacking/</guid><description>&lt;p&gt;&lt;em&gt;This is the third piece in a series about building a small language model that writes Magic: The Gathering cards into a compiler I built by hand. &lt;a href="../01-the-joke" &gt;The first piece&lt;/a&gt; was the origin story; &lt;a href="../02-building-the-compiler" &gt;the second&lt;/a&gt; was about being wrong three times before I found the right parser architecture. This one is about what happened when I pointed automated optimizers at that architecture and walked away. It&amp;rsquo;s the piece I&amp;rsquo;d most want you to read, because what I stumbled into has a name, and it turns out to be one of the central problems in AI safety.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>The bottleneck wasn't the model. It was the shape of the language.</title><link>https://blog.deadgate.fr/stories/mtg-compiler/04-shadowing/</link><pubDate>Mon, 29 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.deadgate.fr/stories/mtg-compiler/04-shadowing/</guid><description>&lt;p&gt;&lt;em&gt;This is the fourth piece in a series about building a small language model that writes Magic: The Gathering cards into a compiler I built by hand. The &lt;a href="../01-the-joke" &gt;first three&lt;/a&gt; pieces got us here: a hand-built compiler that turns Magic&amp;rsquo;s text into a clean, typed format I can check mechanically, and a hard-won way to keep automated agents honest while they improved it. With all of that in place, I could finally do the thing the whole project was for: train a model to generate that format from plain human intent. This piece is what I found when I did.&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>