<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kang wang</title>
    <description>The latest articles on DEV Community by kang wang (@kang_wang_375088cb68739bf).</description>
    <link>https://dev.to/kang_wang_375088cb68739bf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3445294%2F5d5a16d1-6cd3-4dd8-929e-cbf7e2624633.png</url>
      <title>DEV Community: kang wang</title>
      <link>https://dev.to/kang_wang_375088cb68739bf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kang_wang_375088cb68739bf"/>
    <language>en</language>
    <item>
      <title>Building an AI-Directed Browser Roguelite with a Deterministic Baseline</title>
      <dc:creator>kang wang</dc:creator>
      <pubDate>Sat, 26 Sep 2026 09:12:46 +0000</pubDate>
      <link>https://dev.to/kang_wang_375088cb68739bf/building-an-ai-directed-browser-roguelite-with-a-deterministic-baseline-2848</link>
      <guid>https://dev.to/kang_wang_375088cb68739bf/building-an-ai-directed-browser-roguelite-with-a-deterministic-baseline-2848</guid>
      <description>&lt;p&gt;I gave two coding agents the same brief: build a browser marble roguelite that can be played without an account or download.&lt;/p&gt;

&lt;p&gt;The result is Marble Alchemy, with two public builds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The AI Director build writes one bounded daily challenge with GLM-5.3 Flash, validates the rule locally, and lets Matter physics execute it in the browser.&lt;/li&gt;
&lt;li&gt;The deterministic baseline keeps the same core loop while using fixed rules, so the comparison stays reproducible.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;Both builds use TypeScript, Phaser, and Matter. Each has five stages, six upgrades, mouse and touch controls, procedural visuals, and synthesized audio. The public entry point lets a player choose either build, while the field guide explains the rules and evidence.&lt;/p&gt;

&lt;p&gt;The AI layer is deliberately constrained. The model proposes a challenge; the game accepts only a bounded rule shape, then runs the actual collision and damage logic locally. The model does not decide whether a collision happened. That boundary makes the daily challenge inspectable and keeps the game playable when the model is unavailable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verification beyond the first screen
&lt;/h2&gt;

&lt;p&gt;The Codex build started with four input and responsive-layout defects. After the fixes, 13 rule tests and 19 browser tests passed, and a normal UI run completed all five stages.&lt;/p&gt;

&lt;p&gt;The fable build passed 24 unit tests and 19 end-to-end tests. In 12 random-aim runs it won 5 times and stalled 0 times. These are different protocols, so they are not one combined score.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;A model feature becomes easier to evaluate when its authority is small and its output has a deterministic execution boundary. It also makes debugging more concrete: a failure can be assigned to the prompt, validation, physics, input handling, or presentation instead of being treated as one vague AI result.&lt;/p&gt;

&lt;p&gt;Play both builds: &lt;a href="https://chaoschemy.com/" rel="noopener noreferrer"&gt;https://chaoschemy.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI Director: &lt;a href="https://chaoschemy.com/gpt6/?utm_source=devto&amp;amp;utm_campaign=engineering_note&amp;amp;utm_content=gpt6" rel="noopener noreferrer"&gt;https://chaoschemy.com/gpt6/?utm_source=devto&amp;amp;utm_campaign=engineering_note&amp;amp;utm_content=gpt6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Evidence guide: &lt;a href="https://chaoschemy.com/guide.html?utm_source=devto&amp;amp;utm_campaign=engineering_note&amp;amp;utm_content=guide" rel="noopener noreferrer"&gt;https://chaoschemy.com/guide.html?utm_source=devto&amp;amp;utm_campaign=engineering_note&amp;amp;utm_content=guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source and test evidence: &lt;a href="https://github.com/convee/marble-alchemy" rel="noopener noreferrer"&gt;https://github.com/convee/marble-alchemy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would love feedback on the first impression, the comparison protocol, and the defects that remain after real interaction.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gamedev</category>
      <category>typescript</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
