<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Encyclopedia Autonomica]]></title><description><![CDATA[Trusted by readers at Nasdaq, Nvidia, and Stanford, Encyclopedia Autonomica is the go-to guide for anyone building or deploying autonomous agents. We cover what matters: how real-life AI agents reason, plan, remember, and act.]]></description><link>https://jdsemrau.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!kmqt!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4191238-47fc-439e-9f74-9df5d0617cf7_1024x1024.png</url><title>Encyclopedia Autonomica</title><link>https://jdsemrau.substack.com</link></image><generator>Substack</generator><lastBuildDate>Mon, 13 Jul 2026 11:41:56 GMT</lastBuildDate><atom:link href="https://jdsemrau.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[JDS]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[enyclopedia-autonomica@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[enyclopedia-autonomica@substack.com]]></itunes:email><itunes:name><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></itunes:name></itunes:owner><itunes:author><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></itunes:author><googleplay:owner><![CDATA[enyclopedia-autonomica@substack.com]]></googleplay:owner><googleplay:email><![CDATA[enyclopedia-autonomica@substack.com]]></googleplay:email><googleplay:author><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[A Self-Improving Code World Model Agent: From Orbit Wars to Capital Markets]]></title><description><![CDATA[Fighting digital wars in virtual orbits with knowledge transfer into capital markets.]]></description><link>https://jdsemrau.substack.com/p/a-self-improving-code-world-model</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/a-self-improving-code-world-model</guid><pubDate>Mon, 06 Jul 2026 04:38:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4gzA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In my <a href="https://jdsemrau.substack.com/p/deepmind-code-world-models">recent post</a>, I introduced DeepMind&#8217;s work on Code World Models and contrasted it with Yann LeCun&#8217;s Joint-Embedding Predictive Architecture. </p><p>Now I want to take this concept further and implement my own CWM to engage in orbital warfare. </p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;cb1a54c2-27af-4075-b4f5-5c3a6f8c15d6&quot;,&quot;duration&quot;:null}"></div><p>So I felt it fitting to open with a quote from the movie WarGames.</p><blockquote><ul><li><p><strong>David Lightman</strong>: [<em>typing</em>] Love to. How about Global Thermonuclear War?</p></li><li><p><strong>Joshua</strong>: Wouldn&#8217;t you prefer a good game of chess?</p></li><li><p>[<em><strong>Jennifer</strong> laughs</em>]</p></li><li><p><strong>David Lightman</strong>: [<em>typing</em>] Later. Let&#8217;s play Global Thermonuclear War.</p></li><li><p><strong>Joshua</strong>: Fine.</p></li></ul></blockquote><p>The general idea is that rather than training a neural network learning the game's dynamics through trial-and-error (the RL approach), you use a code language model to <em>write a simulator</em> of it, then hand that simulator to a classical search algorithm. </p><p>One of my immediate observations was that there are actually two tasks:</p><ol><li><p><strong>Synthesis</strong> (turning game rules into executable code) and </p></li><li><p><strong>Planning</strong> (finding good actions in that code) </p></li></ol><p>Both of them have different profiles as classical search is better at planning and LLM-based agents are better at synthesis.</p><p>But let&#8217;s step back and reiterate how DeepMind&#8217;s implementation works. </p><p>The first step of their solution is actually quite mundane: the agent first plays a few games to completion using a random policy, and the data collected during each game forms the trajectories used to learn the CWM. The simulator is then generated via iterative LLM refinement, which uses those trajectories to auto-generate unit tests that validate simulated transitions against them; progressively improving the CWM with each refinement pass.</p><p>For perfect-information games, where the state of the game is 100% visible at all times, it pairs this with a standard Monte Carlo Tree Search (1,000 simulations per action); for games with hidden state, it uses Information Set MCTS, which samples from a belief distribution over possible ground truths rather than planning from a single known state. </p><p>That&#8217;s why I thought it was interesting. The code repository will be made available in chat.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/p/a-self-improving-code-world-model?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/p/a-self-improving-code-world-model?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p>In this post, I want to expand on their work and understand how MCTS works in a <strong>simultaneous-move</strong> game like Orbit Wars. </p><p>What makes Orbit Wars interesting is that it is not really turn-based in the alternating sense. I.e., the game loop doesn&#8217;t stop to let the user take time to analyze its play and then the other players move. Here, every player acts at the same instant. And not doing anything is also an action.</p><p>And that&#8217;s where DeepMind&#8217;s solution fails as neither standard MCTS nor IS-MCTS handles this directly for a simple reason. </p><p>Both assume a single active player at each node. </p><h4>Simultaneous-Move MCTS</h4><p>In simultaneous games, each action's value depends on all players&#8217; actions. So, instead of treating every joint action as one giant action space, decoupled Upper Confidence Bound (UCB) lets each player run its own UCB independently. UCB in this context is a selection rule that picks which action to try next by balancing exploitation of actions with high average reward against exploration of actions that haven&#8217;t been tried enough, using a confidence bound that shrinks as an action gets sampled more.</p><p>Standard minimax alternates Max (us) and Min (opponent) nodes. </p><p>But in Orbit Wars, both players act simultaneously; neither player moves &#8220;after&#8221; the other. The correct game-theoretic model at each node is a <em><a href="https://en.wikipedia.org/wiki/Normal-form_game">normal-form game</a></em>: a matrix where the rows are our actions, the columns are the opponent&#8217;s actions, and each cell is the outcome.</p><pre><code><code>Our action &#8595;  |  Opp: Rush  |  Opp: Expand  |  Opp: Hold
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9532;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9532;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9532;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
Rush          |   0.4       |    0.8        |   0.9
Expand        |   0.2       |    0.6        |   0.7
Hold          |   0.1       |    0.5        |   0.6</code></code></pre><p>The solution concept is a Nash equilibrium: a mixed strategy where neither player can improve by deviating. Computing exact Nash equilibria at every MCTS node is expensive (linear program per node). Instead, we use decoupled UCB.</p><p>Each player at each node maintains an <em>independent</em> UCB table over their own actions:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;UCB_i(a, n) = \\frac{Q_i(a, n)}{N_i(a, n)} + C \\cdot \\sqrt{\\frac{\\ln N(n)}{N_i(a, n)}}&quot;,&quot;id&quot;:&quot;QLUTXZTXCM&quot;}" data-component-name="LatexBlockToDOM"></div><pre><code><code>where:
  Q_i(a, n) = sum of player i's values when they chose action a at node n
  N_i(a, n) = visit count for player i choosing a at node n
  N(n)      = total node visits
  C         = &#8730;2  (exploration constant)</code></code></pre><p>At selection time, the joint action is the Cartesian product of each player&#8217;s UCB-argmax. Each player&#8217;s UCB table is updated with <em>their own component</em> of the leaf value vector, not the joint reward. In two-player zero-sum games, this converges to the Nash equilibrium; in multiplayer settings, it approximates correlated equilibria.</p><p>Here, each player maintains an independent action-value table, and the joint action is the Cartesian product of their individual UCB argmaxes. </p><p>This is also my primary algorithmic extension beyond DeepMind&#8217;s framework. And I will explain it in more detail in a later section.</p><p>In contrast to traditional Reinforcement Learning methods, where we are optimizing a policy function, we optimize a heuristic value function <em>v(state, player_id) </em>that maps a game state to a scalar in<code>[0, 1]</code>, where 1.0 means a certain win and 0.5 means parity. </p><p>So why does this matter?</p><p>Simultaneous-move games are not a niche problem. The stock market, where I spent most of my day job time, is the canonical example. In this market, every participant submits orders without knowing what others will submit at the same instant; prices clear after all orders arrive, not sequentially. A participant who telegraphs their strategy can be front-run; one that commits to a pure strategy can be arbitraged. The same structure appears in auctions, mechanism design, and any multi-agent system where agents act on shared state without coordinating first. Nash equilibrium reasoning (the mathematical foundation of market microstructure) requires planning algorithms that handle simultaneous moves correctly. </p><p>So it&#8217;s easy to understand why I selected this problem, as building a Code World Model for Orbit Wars is, in that sense, building infrastructure for a much broader class of problems.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>For the simulator itself, similar to DeepMind, I used a coding agent and a refinement loop through executed game trajectories. </p><p>When building such a system yourself, you have to make three choices: </p><ol><li><p>How to represent the state of the world, </p></li><li><p>How does the model search for good actions, and </p></li><li><p>How do you evaluate positions at the leaves of your search tree when you run out of time to keep searching? </p></li></ol><p>A Code World Model solves choice (1) with a property that no neural-network world model can match: determinism. Given the same state and the same action, a code world model always returns the same successor state. This solves the problem of the generation of illegal moves, which I already pointed out in my work on Game Theory and Agent Reasoning.</p><p> It is a function. You call it, you get the answer. It&#8217;s deterministic.</p><p>That determinism is what makes everything downstream possible. </p><p>Search algorithms assume that <em>f(state, action) &#8594; next_state</em> is reliable. When it is not (when the world model sometimes predicts illegal states, or drifts after 30 steps), the search tree fills with phantom branches, and the agent confidently optimises toward a future that cannot happen. </p><p>There is a second advantage that matters more than it initially appears: speed. Taking notes from high-frequency trading, let&#8217;s assume we have a time budget of 500ms per decision. A reimplementation of the engine can execute in 0.5ms, a factor of one thousand. At a 170ms search budget, that is the difference between fewer than 1 simulation and ~150 depth-3 simulations per turn. That depth-3 MCTS finds qualitatively different strategies than a one-node lookahead: strategies that involve multi-turn setups, timing attacks around comet spawns, and recognising when a garrison is large enough to defend without reinforcement.</p><p>The third advantage is what I find most interesting: modularity. Because the world model is code (plain Python with no learned weights), it can be read, debugged, and corrected by engagements with standard coding agents. When the agent makes a strange decision, you can trace it: run the offending state through the MCTS search, observe which action had the highest visit count, print the value estimates at its children, and inspect the world model transitions that produced them. This kind of debuggability is difficult, maybe impossible, with a neural forward model. You cannot open a neural network and read why it predicted a particular next state. </p><h4>What Makes Orbit Wars Hard</h4><p>Let me start by explaining how Orbit Wars is structured. The gameworld is a continuous space with a sun at the centre. Planets orbit the sun or sit stationary. </p><p>On each decision node, you can argue that this is a turn, and a player submits a list of actions like fleet launches. A fleet launch is a triplet: <em>[from_planet_id, angle_radians, num_ships].</em> </p><p>Fleets travel in straight lines and are destroyed if they cross the sun.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PQsS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PQsS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 424w, https://substackcdn.com/image/fetch/$s_!PQsS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 848w, https://substackcdn.com/image/fetch/$s_!PQsS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 1272w, https://substackcdn.com/image/fetch/$s_!PQsS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PQsS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png" width="613" height="288.3962912087912" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:685,&quot;width&quot;:1456,&quot;resizeWidth&quot;:613,&quot;bytes&quot;:193175,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PQsS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 424w, https://substackcdn.com/image/fetch/$s_!PQsS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 848w, https://substackcdn.com/image/fetch/$s_!PQsS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 1272w, https://substackcdn.com/image/fetch/$s_!PQsS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F124586e2-889e-441d-9a48-3855d6e7ab30_2720x1280.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Three properties combine to make this hard:</p><p><strong>Orbiting targets.</strong> A planet 30 units away at angular velocity 0.025 rad/turn will have rotated ~2.4 units by the time your fleet arrives. Aiming at its current position sends ships into empty space.</p><p><strong>Simultaneous moves.</strong> Every player acts at the same instant. So your best move depends on what all opponents do at the same time. </p><p><strong>Speed matters.</strong> You can run a deep tree-search, but if your solution does not quickly produce results, your opponents might have taken the time to occupy their planets and start production there.</p><p>The solution to all three: use a coding agent to build and optimize a faithful model of the transitions of the game engine (the Code World Model) and run tree search entirely inside it.</p><p>The quality of search scales with the speed of simulation.</p><h4>The State </h4><p>How, in general, should we describe the world environment? </p><p>I packed everything the agent needs into a single <code>State</code> dataclass object:</p><pre><code><code>@dataclass
class State:
    planets: list          # [id, owner, x, y, radius, ships, production]
    fleets: list           # [id, owner, x, y, angle, from_planet_id, ships]
    initial_planets: list  # starting positions for orbital angle calculation
    comets: list           # [{planet_ids, paths, path_index}]
    comet_planet_ids: list
    step: int
    next_fleet_id: int
    angular_velocity: float
    num_players: int
    episode_steps: int = 500
    ship_speed: float = 6.0
    comet_speed: float = 4.0</code></code></pre><p>The separation of <code>planets</code> (current positions) from <code>initial_planets</code> (starting positions) is critical. Orbital position at any future step is computed from the initial angle, with no accumulated floating-point drift.</p><p>On each activity point, we need to assess and operate on eight phases in order:</p><ol><li><p>Pre-launch comet expiry: remove comets where path_index &#8805; path length</p></li><li><p>Comet spawning</p></li><li><p> Fleet launch (apply player actions)             </p><p>    &#9492;&#9472; deduct ships, add fleet to state </p></li><li><p>Production                                       <br>  &#9492;&#9472; owned planet ships += production</p></li><li><p> Orbital mechanics                                <br>  &#9492;&#9472; rotate orbiting planets one tick              <br>  &#9492;&#9472; advance comet path indices  </p></li><li><p>Fleet movement + collision detection             <br>     &#9492;&#9472; swept-pair hit test vs all planets            <br>     &#9492;&#9472; OOB + sun-crossing check  </p></li><li><p>Mid-tick comet expiry (black-hole effect)        </p></li><li><p>Combat resolution                                <br>  &#9492;&#9472; fleet vs fleet, then winner vs garrison </p><p></p></li></ol><p>The sequence ordering matters. Not only from a memory management perspective. But also from a ground truth and internal consistency of the environment perspective. For example, production must happen <em>before</em> movement, so a planet garrisoned on turn T knows about any extra ships to defend with. Comet expiry has two phases (steps 1 and 7) because fleets can collide with a comet on its final tick, at which point the comet disappears mid-tick and the fleet ships are silently lost (the &#8220;black hole&#8221; effect). And that brings up an important point. Since the state of the game is constantly in flux, we need to be able to verify if the CWM is in sync with the game engine. A world model that is fast but wrong is worse than the external game engine. </p><p>Every error introduces excess unproductive branches into the search tree: the agent optimises toward futures that the actual game engine will not produce. Verification is not optional.</p><p>The approach I used here is replay matching. RM is re-running recorded trajectories through the model and checking its predictions match the real outcomes. Because the environment stores complete game records, i.e., every state, every action, every step, I can run the CWM against these replays, and its output is compared against the recorded ground-truth states at every step. </p><p>Since there is also a temporal sequence of actions, we can conclude that a mismatch at step 47 means the bug was introduced somewhere in steps 1&#8211;47: bisect, fix, verify again.</p><p>I found two subtle bugs this way:</p><ol><li><p><strong>Production fires before movement.</strong> A garrison that gains production ships at step T can use those ships to defend against a fleet that arrives in the same tick. If you implement movement before production, the fleet always sees the pre-production garrison, and your combat resolution is off by exactly <code>production</code> ships for every attack.</p></li><li><p><strong>Mid-tick comet expiry.</strong> A comet planet that exhausts its path during fleet movement disappears <em>before combat is resolved</em> for that tick. Any fleet that already collided with it this tick loses its ships silently: they do not participate in combat. This produces an effect where fleets apparently vanish against comets, which looks like a collision bug until you notice the timing.</p></li></ol><p>This brings us to the problem of collision detection. It&#8217;s wasteful if a fleet crashes into the sun or off the game grid. The standard approach (checking whether a fleet&#8217;s end position is inside a planet&#8217;s radius) fails for fast fleets and orbiting planets. Instead, I linearise both motions over the tick and test whether the moving fleet and moving planet come within the planet&#8217;s radius at any point <code>t &#8712; [0, 1]</code>:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;d(t) = \\left\\| \\left(A + t\\,\\delta A\\right) - \\left(P_0 + t\\,\\delta P\\right) \\right\\|&quot;,&quot;id&quot;:&quot;SMXNVYFSSH&quot;}" data-component-name="LatexBlockToDOM"></div><p>where:</p><ul><li><p>AA A = fleet start position</p></li><li><p>&#948;A\delta A <span>&#948;</span>A = fleet displacement this tick (speed &#215; direction)</p></li><li><p>P0P_0 <span>P0</span>&#8203; = planet start position</p></li><li><p>&#948;P\delta P <span>&#948;P</span> = planet displacement this tick (one orbital step)</p></li></ul><p>In code I implemented it like this:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;c0a4e91d-95b2-4098-90c2-d1e2d0085d15&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">def swept_pair_hit(A, B, P0, P1, r):
    d0x = A[0] - P0[0];  d0y = A[1] - P0[1]
    dvx = (B[0]-A[0]) - (P1[0]-P0[0])
    dvy = (B[1]-A[1]) - (P1[1]-P0[1])
    a = dvx*dvx + dvy*dvy
    b = 2.0 * (d0x*dvx + d0y*dvy)
    c = d0x*d0x + d0y*d0y - r*r
    if a &lt; 1e-12: return c &lt;= 0.0      # negligible relative velocity (fleet and planet may both be moving)
    disc = b*b - 4.0*a*c
    if disc &lt; 0.0: return False
    sq = math.sqrt(disc)
    t1 = (-b - sq) / (2.0*a)
    t2 = (-b + sq) / (2.0*a)
    return t2 &gt;= 0.0 and t1 &lt;= 1.0    # overlap interval hits [0,1]</code></pre></div><p>The per-fleet relative-position and relative-velocity vectors are assembled into <em>(F, P)</em> matrices, the discriminant is computed in a single broadcast pass, and <em>np.argmax </em>extracts the first hit per fleet in list order. The vectorized version runs the full fleet&#8211;planet collision pass in well under the 0.5 ms per-tick budget, even with large fleets.</p><h4>The Intercept Problem</h4><p>In my opinion, this is the most mathematically interesting sub-problem of Orbit Wars. A fleet launched from position <code>S</code> travels in a straight line at constant speed. The target planet orbits at an angular velocity <code>&#969;</code>. The question is: what angle do you fire at so the fleet arrives at the planet&#8217;s position, not where it was when you launched?</p><p>Fleet speed is a sublinear function of ship count, with larger fleets moving slower:</p><pre><code><code>speed(n) = 1 + (v_max &#8722; 1) &#215; (log(n) / log(1000))^1.5

where v_max = 6.0 (configurable)</code></code></pre><p>Ships Speed 1 1.00 10 2.03 100 3.77 500 5.28 1000 6.00</p><p>The <code>^1.5</code> exponent means the curve is concave: the first 10 ships buy more speed than the last 500. Small scout fleets crawl; mass invasions are fast. </p><p>The intercept angle satisfies a fixed-point equation. Let <code>&#952;(t)</code> be the planet&#8217;s angle at absolute step<em> t</em>:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\theta(t) = \\theta_0 + \\omega \\cdot t&quot;,&quot;id&quot;:&quot;GHKYRULMDC&quot;}" data-component-name="LatexBlockToDOM"></div><pre><code><code>Position at t:  P(t) = (cx + r&#183;cos(&#952;(t)),  cy + r&#183;sin(&#952;(t)))

Flight time T:  T = ||P(t&#8320; + T) &#8722; S|| / speed(n)</code></code></pre><p>Both <code>T</code> and <code>P(t&#8320; + T)</code> depend on each other. Solve by iteration:</p><pre><code><code>aim &#8592; P(t&#8320;)                     # initial guess: current position
for i in range(max_iters):
    T &#8592; ||aim &#8722; S|| / speed(n)
    new_aim &#8592; P(t&#8320; + T)         # predict planet at estimated arrival
    if ||new_aim &#8722; aim|| &lt; tol:
        return atan2(aim.y &#8722; S.y, aim.x &#8722; S.x)
    aim &#8592; new_aim</code></code></pre><p>In code, convergence happens in 4&#8211;6 iterations for typical orbital velocities. The function returns <code>None</code> if it fails to converge, a safety valve that filters degenerate trajectories.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;44e7fce1-6e52-4029-b388-33af5a8339d4&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">def solve_intercept(source_pos, target_planet_id, fleet_size,
                    depart_turn, state, max_iters=20, tol=1e-4):
    target = next((p for p in state.planets if p[0] == target_planet_id), None)
    if target is None:
        return None

    initial_target = next(
        (p for p in state.initial_planets if p[0] == target_planet_id), None)

    speed = fleet_speed(fleet_size, state.ship_speed)
    av    = state.angular_velocity
    aim   = _predict_pos(target, initial_target, av, depart_turn)

    prev_angle = None
    for _ in range(max_iters):
        dist    = math.hypot(aim[0] - source_pos[0], aim[1] - source_pos[1])
        eta     = dist / speed if speed &gt; 0.0 else 0.0
        new_aim = _predict_pos(target, initial_target, av, depart_turn + eta)
        new_angle = math.atan2(new_aim[1] - source_pos[1],
                               new_aim[0] - source_pos[0])

        if prev_angle is not None:
            diff = abs(math.atan2(math.sin(new_angle - prev_angle),
                                  math.cos(new_angle - prev_angle)))
            if diff &lt; tol:
                return new_angle % (2 * math.pi)

        prev_angle = new_angle
        aim = new_aim
    return None</code></pre></div><h4>Reducing Exponential  Action Space</h4><p>Tracking the raw action space is combinatorially expensive. With 5 planets, 10 targets, and 10 ship sizes, we observe 10^10 joint actions per turn. MCTS cannot enumerate this efficiently </p><p>My solution is a two-level abstraction.</p><p>For each owned planet, I calculate a small fixed menu:</p><pre><code><code>Option 0: No-op (hold all ships)
Option 1: fit-launch to target T&#8321;  &#8592; "exactly enough to capture"
Option 2: all-in (1.0) to T&#8321;       &#8592; enemy planets only
Option 3: fit-launch to T&#8322;
Option 4: all-in to T&#8322;
...
Option N: multi-spray to all T&#8342;    &#8592; one slot for simultaneous multi-front</code></code></pre><p>The <em>fit</em> fraction is the key innovation. Rather than sending a fixed 50% or 100% of your garrison, compute exactly how many ships arrive with the garrison + 1 margin needed to capture:</p><pre><code><code>eta      = dist(source, target) / speed(available_ships)
projected_garrison = garrison&#8320; + production &#215; min(eta, 40) &#215; 0.6
needed   = projected_garrison + MARGIN &#8722; friendly_already_inbound
ships    = max(0, min(needed, available))</code></code></pre><p>This prevents two failure modes that destroy naive agents: <em>over-sending</em> (wasting ships that could take a second planet) and <em>under-sending</em> (fleet arrives and bounces off a garrison that grew during transit).</p><h4>The Full MCTS Loop</h4><p>We remember that the full MCTS loop consists of 4 stages. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4U2y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4U2y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 424w, https://substackcdn.com/image/fetch/$s_!4U2y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 848w, https://substackcdn.com/image/fetch/$s_!4U2y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 1272w, https://substackcdn.com/image/fetch/$s_!4U2y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4U2y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png" width="1456" height="772" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:772,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:164103,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4U2y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 424w, https://substackcdn.com/image/fetch/$s_!4U2y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 848w, https://substackcdn.com/image/fetch/$s_!4U2y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 1272w, https://substackcdn.com/image/fetch/$s_!4U2y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26f49bf8-158b-41d9-bab6-e02bb81db278_2180x1156.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can then implement the in-game loop like this:</p><pre><code><code>&#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
&#9474;  while time.monotonic() &lt; deadline:                     &#9474;
&#9474;                                                         &#9474;
&#9474;  &#9484;&#9472;&#9472; SELECT &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;     &#9474;
&#9474;  &#9474;  For each player i, choose action a_i via UCB  &#9474;     &#9474;
&#9474;  &#9474;  with progressive widening:                    &#9474;     &#9474;
&#9474;  &#9474;    allowed = ceil(pw_c &#215; visits^pw_alpha)       &#9474;     &#9474;
&#9474;  &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;     &#9474;
&#9474;           &#8595;                                             &#9474;
&#9474;  &#9484;&#9472;&#9472; EXPAND &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;     &#9474;
&#9474;  &#9474;  joint = [concrete(a_0), concrete(a_1), ...]   &#9474;     &#9474;
&#9474;  &#9474;  child.state = cwm_apply_joint_action(joint)   &#9474;     &#9474;
&#9474;  &#9474;  (new node: evaluate immediately)              &#9474;     &#9474;
&#9474;  &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;     &#9474;
&#9474;           &#8595;                                             &#9474;
&#9474;  &#9484;&#9472;&#9472; EVALUATE &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;    &#9474;
&#9474;  &#9474;  if terminal: exact reward (1.0 / 0.5 / 0.0)   &#9474;    &#9474;
&#9474;  &#9474;  if depth &#8805; max_depth: cwm_value_function(...)  &#9474;    &#9474;
&#9474;  &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;    &#9474;
&#9474;           &#8595;                                             &#9474;
&#9474;  &#9484;&#9472;&#9472; BACKPROPAGATE &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;    &#9474;
&#9474;  &#9474;  For each player i:                             &#9474;    &#9474;
&#9474;  &#9474;    stats[i][a_i].value += value[i]              &#9474;    &#9474;
&#9474;  &#9474;    stats[i][a_i].visits += 1                    &#9474;    &#9474;
&#9474;  &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;    &#9474;
&#9474;                                                         &#9474;
&#9474;  return argmax_visits( stats[player_id] )               &#9474;
&#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;</code></code></pre><p>If we assume 64 actions per player, fully exploring every action before revisiting any, would take 64 simulations just to see each action once. Progressive widening improves this as it reveals actions gradually: the <code>k</code>-th action is exposed only when the node has at least <code>ceil(pw_c &#215; visits^pw_alpha)</code> visits. </p><p>Actions are pre-sorted by a production/distance prior so that promising moves surface first. This makes naive sense as it ensures that the agent exploits good moves early and explores broadly only when it has the budget.</p><p>Between turns, the root node is cached. At the next turn, the child whose state matches the newly observed state (verified by a lightweight signature of step, planet owners, and ship counts) is promoted to root. A node that accumulated 500 visits last turn starts with 500 visits instead of 0.</p><h4>Feature Design</h4><p>How are we identifying which feature matters when predicting a game-winning action? </p><p>I designed each feature around the same pattern: </p><pre><code><code>ratio(own, opp_agg) = own / (own + opp_agg)</code></code></pre><p>This keeps all features in a normalized range of <code>[0, 1]</code> and means 0.5 always represents parity, regardless of the raw scale of the underlying quantity.</p><p>Based on that and a review of game trajectories, the code agent and I retrieved these features.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sQIF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sQIF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 424w, https://substackcdn.com/image/fetch/$s_!sQIF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 848w, https://substackcdn.com/image/fetch/$s_!sQIF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 1272w, https://substackcdn.com/image/fetch/$s_!sQIF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sQIF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png" width="492" height="562.2857142857143" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:912,&quot;width&quot;:798,&quot;resizeWidth&quot;:492,&quot;bytes&quot;:191629,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sQIF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 424w, https://substackcdn.com/image/fetch/$s_!sQIF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 848w, https://substackcdn.com/image/fetch/$s_!sQIF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 1272w, https://substackcdn.com/image/fetch/$s_!sQIF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F919c8d20-888b-4cac-a8a6-2948df62aa79_798x912.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I then introduced the concept of weight normalisation.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;v(s, i) = \\frac{\\sum_{k} w_k \\cdot f_k(s, i)}{\\sum_{k} w_k}&quot;,&quot;id&quot;:&quot;MLSPEPOGAF&quot;}" data-component-name="LatexBlockToDOM"></div><p>Weight normalisation means you can add or remove features without rescaling: the output always stays in <code>[0, 1]</code>. A weight of 0 effectively removes a feature.</p><h4>Learning Through Self-Play </h4><p>Manually tuning 24 parameters (15 value-function weights, an MCTS budget, and 8 search hyperparameters) is practically impossible. The search landscape is non-convex (aggressive and defensive playstyles are different local optima), noisy (win-rate estimates from a small number of games have high variance), and high-dimensional.</p><p>I use the <a href="https://arxiv.org/pdf/1604.00772">Covariance Matrix Adaptation Evolution Strategy</a> (CMA-ES). CMA-ES belongs to the broader family of evolutionary algorithms, but more specifically, it's an evolution strategy that searches by sampling candidate solutions from a multivariate Gaussian and adapting that Gaussian's mean and covariance toward the best-performing samples each generation. In other words, it is also a gradient-free optimiser that maintains a multivariate Gaussian over parameter space and adapts its covariance matrix toward regions of high reward.</p><p>All 24 parameters are normalised to <code>[0, 1]</code>:</p><pre><code><code>_PARAMS = [
    ("w_material",        "continuous", (0.05, 1.0)),
    ("w_production",      "continuous", (0.05, 1.0)),
    ("w_control",         "continuous", (0.05, 1.0)),
    # ... 11 more value weights ...
    ("mcts_budget_s",     "continuous", (0.05, 0.25)),
    ("opp_aggregation",   "discrete",   ["sum", "max", "mean"]),
    ("max_depth",         "discrete",   [2, 3, 4]),
    ("pw_c",              "discrete",   [2.0, 4.0, 8.0]),
    ("pw_alpha",          "discrete",   [0.3, 0.5, 0.7]),
    ("k_targets",         "discrete",   [3, 4, 5]),
    ("n_active_planets",  "discrete",   [2, 3, 4]),
    ("k_reinforce",       "discrete",   [0, 1, 2]),
    ("fine_fractions",    "discrete",   [False, True]),
]</code></code></pre><p>Discrete parameters (e.g. <code>max_depth &#8712; {2, 3, 4}</code>) are encoded as continuous values and rounded at decode time. This is a standard trick for mixed-domain CMA-ES: the covariance matrix treats them as continuous, and the discretisation happens in evaluation only.</p><p><strong>The Learning Loop</strong></p><pre><code><code>Initialise: x&#8320; = encode(incumbent_weights),  &#963;&#8320; = 0.3

repeat:
  solutions &#8592; es.ask()              # sample &#955; &#8776; 14 candidates
  for each solution x&#7522;:
      w&#7522;  &#8592; decode(x&#7522;)
      score(w&#7522;) &#8592; pool_win_rate(w&#7522;, pool)   # self-play games
  es.tell(solutions, &#8722;scores)       # CMA-ES minimises

  best_in_gen &#8592; argmax(scores)
  if score(best_in_gen) &gt; incumbent_score:
      save best_in_gen
      pool.append(best_in_gen)      # grow pool with new snapshot
      re-baseline incumbent against updated pool

until n_evals &#8805; budget</code></code></pre><p>The key difference from vanilla CMA-ES is the growing self-play pool.</p><p>Starting with <code>[greedy, incumbent]</code>, every time CMA-ES finds a new best performing candidate, it is added to the pool. Future candidates are evaluated against the <em>entire pool</em> simultaneously: a candidate that beats greedy but loses to an older snapshot is penalised.</p><p>This prevents cyclic strategies: a weight vector that is only good against one particular playstyle cannot dominate the pool score.</p><pre><code><code>Pool evolution (example run):

Gen  0:   pool = [greedy, v0]
Gen  3:   v1 beats pool &#8594; pool = [greedy, v0, v1]
Gen  7:   v2 beats pool &#8594; pool = [greedy, v1, v2]   (v0 evicted, capped at 6)
Gen 14:   v3 beats pool &#8594; pool = [greedy, v1, v2, v3]
...</code></code></pre><h4>Noise and Why It Matters</h4><p>With 12 games per evaluation, the win-rate estimate for a single candidate has a standard deviation:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\sigma = \\sqrt{\\frac{p(1-p)}{n}} \\approx \\sqrt{\\frac{0.25}{12}} \\approx 0.144 \\quad \\text{at } p = 0.5&quot;,&quot;id&quot;:&quot;UWRIDPLALY&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>The signal between two similar-quality candidates is often only ~0.05.</p><p>This means many evaluations will place a genuinely better candidate <em>below</em> an inferior one due to noise alone. CMA-ES partly compensates for this: it evaluates a whole <em>population</em> of &#955; &#8776; 14 candidates per generation, and the covariance update averages across all 14 outcomes rather than treating each evaluation independently. </p><p>The effective noise on the gradient estimate is:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\sigma_{\\text{gradient}} \\approx \\frac{\\sigma_{\\text{single}}}{\\sqrt{\\lambda}} \\approx \\frac{0.144}{\\sqrt{14}} \\approx 0.038&quot;,&quot;id&quot;:&quot;BPZCMXFAOP&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>Still substantial, but workable. </p><p>Increasing to 24 games per evaluation would halve the per-candidate noise at the cost of roughly halving the number of generations in a fixed time budget, a tradeoff worth making once the covariance model has been built (later in training).</p><p>A practical implication: never accept a single CMA-ES run as final. Re-evaluate the saved best weights against a larger game sample (50&#8211;100 games) to confirm it actually beats the previous incumbent before shipping it.</p><p>Training ran for ~140 generations at 12 parallel workers with 12 games per evaluation and a 300-step game truncation. </p><p>The chart below shows pooled win rate (score / games played, against the full pool) over generation number for 2p mode:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JuOx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JuOx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 424w, https://substackcdn.com/image/fetch/$s_!JuOx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 848w, https://substackcdn.com/image/fetch/$s_!JuOx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 1272w, https://substackcdn.com/image/fetch/$s_!JuOx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JuOx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png" width="875" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:44324,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JuOx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 424w, https://substackcdn.com/image/fetch/$s_!JuOx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 848w, https://substackcdn.com/image/fetch/$s_!JuOx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 1272w, https://substackcdn.com/image/fetch/$s_!JuOx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a9c2f5-7710-47a5-a18c-062e8b7238fc_875x533.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Each step up represents a newly accepted candidate that beat the incumbent against the entire pool. The slope of improvement is fastest in the first 40 generations (where CMA-ES builds its covariance model and escapes the starting point) and flattens as the pool hardens.</p><p>For 4p, the trajectory is noisier because a single evaluation is a 4-player game where variance is higher: a strong candidate can lose to coordinated focus-fire from three weaker opponents:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zt6J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zt6J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 424w, https://substackcdn.com/image/fetch/$s_!Zt6J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 848w, https://substackcdn.com/image/fetch/$s_!Zt6J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 1272w, https://substackcdn.com/image/fetch/$s_!Zt6J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zt6J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png" width="869" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:869,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40844,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zt6J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 424w, https://substackcdn.com/image/fetch/$s_!Zt6J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 848w, https://substackcdn.com/image/fetch/$s_!Zt6J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 1272w, https://substackcdn.com/image/fetch/$s_!Zt6J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9231e434-8e9c-49ed-9c63-6095b833b6c0_869x533.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Comparing the default weights (uniform ~0.25 across all features) to the converged weights reveals what actually predicts outcomes:</p><p><strong>2-player converged weights:</strong></p><pre><code><code>Feature           Default   Converged   Change
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
w_material         0.45      0.9954     +121%  &#8592; dominant signal
w_centrality       0.00      0.5992     new    &#8592; map position matters
w_time_fleet       0.00      0.5247     new    &#8592; committed ships count
w_prod_density     0.00      0.4919     new    &#8592; efficiency matters
w_production       0.20      0.5162     +158%
w_phase_material   0.00      0.3834     new    &#8592; endgame weighting
w_event_fleet      0.00      0.3808     new    &#8592; imminent arrivals
w_control          0.25      0.0521     &#8722;79%   &#8592; planet count unreliable
w_anti_leader      0.00      0.0000     &#9472;      &#8592; 2p: irrelevant</code></code></pre><p>The most interesting findings were:</p><p><strong>w_centrality</strong> went from 0 (unused in defaults) to 0.60 over the observation period. Central planets have short fleet paths to all quadrants, making them economically and militarily dominant. The default weights ignored this entirely. CMA-ES found it in ~40 generations by discovering that candidates with high centrality weighting consistently beat those without it.</p><p><strong>w_control</strong> (planet count) collapsed from 0.25 to 0.05. Owning more planets than your opponent is not predictive of winning; owning <em>better</em> planets (central, high-production) is. This is an insight that would be hard to arrive at by manual tuning.</p><p><strong>4-player converged weights:</strong></p><pre><code><code>Feature           2p weight   4p weight   Interpretation
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
w_material         0.9954      0.9959     stable across modes
w_control          0.0521      0.9398     4p: presence = survival
w_centrality       0.5992      0.0022     4p: central = target
w_threat           0.1842      0.5817     4p: safe core critical
w_anti_leader      0.0000      0.2934     4p: don't get focus-fired
w_cohesion         0.3252      0.4141     compact = defensible</code></code></pre><p>In 4p, w_control rockets to 0.94: board presence is survival. Three opponents can coordinate to eliminate you; if you own 40% of planets, you survive; if you own 10%, you don&#8217;t. Meanwhile w_centrality collapses to near-zero (0.002): central planets draw coordinated attacks from three opponents simultaneously, making them a liability rather than an asset in 4p.</p><p>At 12 workers, 12 games/evaluation, 300-step games, one generation takes approximately:</p><pre><code><code>&#955; &#8776; 14 candidates &#215; 12 games &#215; ~40s/game = 6,720 game-seconds
At 12 parallel workers: 6,720 / 12 / 60 &#8776; 9.3 minutes/generation

48 hours &#8594; ~300 generations &#8594; ~4,200 candidate evaluations</code></code></pre><p>For a 24-dimensional parameter space, CMA-ES typically needs <code>10&#8211;100 &#215; dimension = 240&#8211;2,400</code> evaluations for solid convergence. A 48-hour run is well into the reliable convergence range.</p><h4>Comets as Temporary High-Value Planets</h4><p>In the game engine, comets appear at fixed steps (50, 150, 250, 350, 450) throughout each game and temporarily add groups of four neutral planets that move along pre-computed elliptical paths. They are among the richest events in the game: comet ships count toward your score, and a well-timed comet capture can flip a losing position.</p><p>Each comet group is a set of four planets placed at 4-fold rotationally symmetric positions. </p><p>Their path is a densely sampled, highly eccentric ellipse with the sun at one focus:</p><pre><code><code>Eccentricity e ~ Uniform(0.75, 0.93)   &#8592; very elongated
Semi-major axis a ~ Uniform(60, 150)    &#8592; wide orbit
Perihelion = a(1&#8722;e)                     &#8592; must clear sun + comet radius

4-fold symmetry: the base path (Q4 quadrant) generates 3 copies
  via 90&#176; rotation, so all four comets enter simultaneously from
  different quadrants.</code></code></pre><p>The path is resampled at constant arc-length intervals of <code>comet_speed = 4.0</code> units/tick, giving each comet a fixed travel speed regardless of path curvature. Only the contiguous on-board segment is kept (5&#8211;40 waypoints). Generation retries up to 300 times to find a valid configuration that clears the sun and all existing planets.</p><p>Because comets appear at known steps, a well-calibrated agent can:</p><ol><li><p><strong>Anticipate the spawn</strong>: save garrison ships rather than spending them 5 turns before a comet spawns</p></li><li><p><strong>Position intercept fleets</strong>: launch toward the anticipated entry point one tick before spawn</p></li><li><p><strong>Contest ownership</strong>: the comet planet starts neutral; the first fleet to arrive takes it</p></li></ol><p>The CWM models comet expiry with two distinct events. Pre-launch expiry removes comets whose path has already ended before the turn starts (the agent cannot act on them). Mid-tick expiry removes comets that exhaust their path <em>during</em> fleet movement: any fleet that collides with a mid-tick-expiring comet has its ships silently deleted (the black hole effect). This is a subtle engine quirk that the CWM replicates exactly.</p><p>The value function&#8217;s <code>event_fleet</code> feature partially captures comet-related fleet pressure by encoding signed ship arrivals over a 20-turn horizon, but it does not explicitly model the spawn probability. This is a known gap: an agent with explicit comet-anticipation logic would have a strategic edge over the current system.</p><h4>Banking the Overage Budget</h4><p>One non-obvious optimisation has a disproportionate impact on midgame performance.</p><p>The environment gives each agent a 1-second per-turn hard limit plus a 60-second <em>overage bank</em> that accumulates across the game. The MCTS search formula draws from the bank:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{budget} = \\min\\left(\\text{base_budget} + \\text{remaining_overage} \\times 0.30,\\ 0.60\\text{ s}\\right)&quot;,&quot;id&quot;:&quot;WDMVJOQQHZ&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>In the opening phase (turns 0&#8211;25), the correct move is nearly deterministic: expand outward, capturing the closest neutral planets by production/distance&#178;. MCTS wastes its entire budget rediscovering this same answer. The wasted budget accumulates in the overage bank but is unavailable for the critical midgame.</p><p>The opening book bypasses MCTS entirely. For the first 15 turns (2p) or 25 turns (4p), the agent executes a proximity-first multi-spray using <code>production / distance&#178;</code> scoring:</p><pre><code><code>def _opening_book(state, player_id):
    # Multi-source: each owned planet claims its nearest high-value neutral.
    # Planets sorted by garrison descending so the richest planet picks first.
    own = sorted(owned_planets, key=lambda p: p[5], reverse=True)
    claimed = set()
    launches = []
    for src in own:
        available = [t for t in neutrals if t[0] not in claimed]
        if not available:
            break
        best = max(available, key=lambda t: t[4] / dist&#178;(src, t))
        claimed.add(best[0])
        launches.append((src[0], best[0], "fit"))
    return tuple(launches)</code></code></pre><p>The <em>distance</em><code>&#178;</code> denominator is intentional. </p><p><strong>production / distance </strong>(linear) can prefer a distant planet with production 3 over a nearby one with production 1. But the distant planet takes 3&#215; longer to capture, during which the opponent captures the nearby one and you&#8217;ve committed ships to an unopposable flight. The quadratic penalty correctly balances production value against the opportunity cost of a longer commitment.</p><p>The multi-source design matters for games where you start with more than one planet, or when your garrison has split across captures mid-opening. Each planet expands independently to its nearest valuable neutral, so all fronts push outward simultaneously rather than funnelling through a single launch pad.</p><p>Saved budget: 15&#8211;25 turns &#215; ~0.6 s &#8776; 9&#8211;15 seconds of extra midgame search time.</p><h4>Competing Architectures</h4><p>During training, I am playing the CWM-MCTS solution against four opponents (from zero-lookahead heuristics to trained neural policies) across three axes: search depth, simulation throughput, and measured win rate.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3kva!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3kva!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 424w, https://substackcdn.com/image/fetch/$s_!3kva!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 848w, https://substackcdn.com/image/fetch/$s_!3kva!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 1272w, https://substackcdn.com/image/fetch/$s_!3kva!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3kva!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png" width="1456" height="346" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1865af29-2936-4121-9c42-8859af4543de_1976x470.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:346,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:139279,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3kva!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 424w, https://substackcdn.com/image/fetch/$s_!3kva!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 848w, https://substackcdn.com/image/fetch/$s_!3kva!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 1272w, https://substackcdn.com/image/fetch/$s_!3kva!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1865af29-2936-4121-9c42-8859af4543de_1976x470.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><pre><code><code>  &#8224; not directly measured against ours 
  &#8225; standard MCTS assumes a single active player at each node, which is wrong for
    simultaneous-move games; converges to a pure strategy rather than Nash
    equilibrium and is therefore exploitable</code></code></pre><p>Before I go further into the results, below is a brief flowchart of how each competing architecture converts an observation into an action:</p><p><strong>Random</strong></p><pre><code><code>obs &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9654; random move</code></code></pre><p><strong>Greedy</strong></p><pre><code><code>obs &#9472;&#9472;&#8594; [score each candidate]
              production / dist&#178;  &#8592; one-move horizon; no lookahead
              garrison advantage
        &#9472;&#9472;&#8594; argmax &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9654; best move</code></code></pre><p><strong>MCTS + External API</strong></p><pre><code><code>obs &#9472;&#9472;&#8594; [initialise tree]
         &#9500;&#9472; API call (~500 ms) &#8594; state' &#8594; score
         &#9474;                                      budget exhausted; &lt; 1 sim
         &#9492;&#9472; (no more iterations fit in 0.17 s)
        &#9472;&#9472;&#8594; argmax_visits &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9654; best move</code></code></pre><p><strong>Neural RL (PPO)</strong></p><pre><code><code>obs &#9472;&#9472;&#8594; [feature encoder  (CNN / MLP)]
                &#8595;   &#8592; weights learned offline; GPU; weeks of env interaction
         [policy head]  &#9472;&#9472;&#8594;  action logits  &#9472;&#9472;&#8594;  sample &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9654; best move
              (no explicit lookahead; game theory encoded implicitly in weights)</code></code></pre><p><strong>CWM + SM-MCTS (this system)</strong></p><pre><code><code>obs &#9472;&#9472;&#8594; [state_from_obs]
              &#8595;
        [get_candidates] &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; solve_intercept (orbital fixed-point)
        [classify_opponent] &#9472;&#9472;&#9472;&#9472; k-means archetype over replay history
              &#8595;
        &#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
        &#9474;  SM-MCTS  (0.17 s wall-clock budget)                 &#9474;
        &#9474;                                                       &#9474;
        &#9474;  SELECT    ego:  decoupled UCB + prog. widening      &#9474;
        &#9474;            opp:  archetype-biased action sampling    &#9474;
        &#9474;  EXPAND    cwm_apply_joint_action      (0.5 ms/call) &#9474;
        &#9474;  EVALUATE  cwm_value_function          (2 &#181;s/call)   &#9474;
        &#9474;  BACKPROP  per-player Q/N tables                     &#9474;
        &#9474;                                          ~150 iters  &#9474;
        &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;
              &#8595;
        [argmax_visits] &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9654; best move</code></code></pre><h4>Results</h4><p>All win rates for (2-player, 50 games) shown below are from direct arena play. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9LbG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9LbG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 424w, https://substackcdn.com/image/fetch/$s_!9LbG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 848w, https://substackcdn.com/image/fetch/$s_!9LbG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 1272w, https://substackcdn.com/image/fetch/$s_!9LbG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9LbG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png" width="930" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16614755-2d62-4963-8b96-9865332356e1_930x622.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:930,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:50518,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9LbG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 424w, https://substackcdn.com/image/fetch/$s_!9LbG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 848w, https://substackcdn.com/image/fetch/$s_!9LbG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 1272w, https://substackcdn.com/image/fetch/$s_!9LbG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16614755-2d62-4963-8b96-9865332356e1_930x622.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><pre><code><code>  &#8224; "Full system" = MCTS-CMA + archetype opponent model.
    55 % vs MCTS-CMA alone isolates the archetype model's contribution.
  &#8225; Sequential MCTS = joint-action UCB (OpenSpiel MCTSBot style), same CWM,
    same budget, same weights. Only the tree structure differs</code></code></pre><p>The 72% over MCTS-Default quantifies the CMA-ES contribution in isolation: same search code, different leaf weights, 22 percentage points gained. The jump from MCTS-Default to the full system compounds better evaluation (CMA-ES) with better opponent modeling (archetype-biased sampling), reaching 55% over the CMA-ES-only baseline. </p><p>The speed advantage of the CWM is independent of which MCTS variant you use: both &#8220;CWM + Standard MCTS&#8221; and &#8220;CWM + SM-MCTS&#8221; run at ~150 sims/turn. The gap between them is purely algorithmic: one finds an exploitable pure strategy, the other approximates a Nash equilibrium. </p><p>For a simultaneous-move game, this is the more important of the two extensions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9eap!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9eap!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 424w, https://substackcdn.com/image/fetch/$s_!9eap!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 848w, https://substackcdn.com/image/fetch/$s_!9eap!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 1272w, https://substackcdn.com/image/fetch/$s_!9eap!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9eap!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png" width="1456" height="497" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:497,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:70952,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9eap!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 424w, https://substackcdn.com/image/fetch/$s_!9eap!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 848w, https://substackcdn.com/image/fetch/$s_!9eap!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 1272w, https://substackcdn.com/image/fetch/$s_!9eap!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119bbd7f-0c0e-4e18-a6b6-66440e984adc_1586x541.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>(2p, 120 steps, 50 games)</p><pre><code><code>Matchup                              Win Rate
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
MCTS-CMA vs. Random                  1.000
MCTS-CMA vs. Greedy                  1.000
MCTS-Default vs. Greedy              0.960
MCTS-CMA vs. MCTS-Default            ~0.72
Full System vs. MCTS-CMA             ~0.55</code></code></pre><p>The greedy agent is trivially beaten: it has no lookahead and over-expands into indefensible territory. The interesting comparison is MCTS-CMA vs MCTS-Default: a 72% win rate purely from better value-function weights, with identical search architecture.</p><h4>4-Player Self-Play Pooled Win Rate</h4><pre><code><code>Config                               Pooled win rate   vs. random
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
Random                               0.25              1.0&#215;
Greedy                               0.28              1.1&#215;
MCTS-Default (uniform weights)       0.32              1.3&#215;
MCTS-CMA (default vs greedy only)    0.35              1.4&#215;
MCTS-CMA (self-play pool, 5 snaps)   0.50              2.0&#215;</code></code></pre><p>The jump from 0.35 to 0.50 between pool-less and pool-based training is the clearest demonstration that self-play diversity matters. Evaluating only against greedy produces weights that exploit greedy&#8217;s specific weaknesses (never reinforcing, linear distance scoring) but fail against MCTS opponents that don&#8217;t share those weaknesses.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!024g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!024g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 424w, https://substackcdn.com/image/fetch/$s_!024g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 848w, https://substackcdn.com/image/fetch/$s_!024g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 1272w, https://substackcdn.com/image/fetch/$s_!024g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!024g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png" width="881" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:881,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:41336,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!024g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 424w, https://substackcdn.com/image/fetch/$s_!024g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 848w, https://substackcdn.com/image/fetch/$s_!024g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 1272w, https://substackcdn.com/image/fetch/$s_!024g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a77b5a-bd53-4dc6-954a-1a8cecd0f500_881x533.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Subtree reuse means the tree warms up over the first ~5 turns. From turn 10 onward, the promoted root already carries hundreds of accumulated visits from prior turns, and fresh simulations build on top of those rather than restarting from scratch.</p><h4>Where Time Is Actually Spent</h4><p>In light of applications in high-profile trading and keeping high-speed decision-making, profiling a typical 2p midgame turn (step 80, budget = 0.173 s) yields the following times:</p><pre><code><code>Component                   Time (ms)   % of budget
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
MCTS simulation loop          158.0        91.3%
  &#9492;&#9472; cwm_apply_joint_action    (0.5 ms &#215; ~300 calls)
  &#9492;&#9472; cwm_value_function        (0.002 ms &#215; ~300 calls)
  &#9492;&#9472; UCB select + backprop     (0.03 ms &#215; ~300 calls)
Action candidate generation     8.0         4.6%
  &#9492;&#9472; solve_intercept calls
State construction              4.0         2.3%
  &#9492;&#9472; state_from_obs
Output concretisation           2.0         1.2%
  &#9492;&#9472; abstracted_to_concrete
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
Total                         172.0        99.4%</code></code></pre><p>The search loop dominates, which is exactly what you want. </p><p>The engineering goal of every non-search component is to be fast enough to be irrelevant. <em>cwm_value_function</em> at 0.002 ms contributes only 0.6 ms total across 300 calls. state_from_obs at 4 ms is the largest non-search cost and could be optimised if needed (e.g., by caching the planet-id-to-index maps between turns).</p><h4>SM-MCTS vs. Sequential MCTS</h4><p>To isolate the algorithmic contribution of simultaneous-move awareness, we benchmarked our <em>SM-MCTS</em> against a <strong>sequential MCTS</strong> opponent: the same algorithm OpenSpiel&#8217;s <em>MCTSBot</em> would produce when applied to a simultaneous-move game. Sequential MCTS treats the joint-action node as a UCB search over all <code>(a&#8320;, a&#8321;)</code> pairs, committing both players&#8217; actions together rather than decoupling their Q-tables.</p><p>Both agents use the same CWM, the same per-turn time budget (10 ms), the same tree depth (3), and the same value-function weights. </p><p>The only difference is the tree structure: decoupled vs. joint-action UCB.</p><pre><code><code>  SM-MCTS         Sequential MCTS (OpenSpiel-style)
  &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;  &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
  Per node:       Per node:
    P0 Q/N table    Joint (a&#8320;, a&#8321;) Q/N table
    P1 Q/N table

  Joint action  = UCB(P0) &#215; UCB(P1) (Cartesian product)
                                   Joint action = UCB over all (a&#8320;, a&#8321;) pairs

  Converges to  &#8776; Nash equilibrium  Converges to &#8594; pure strategy (exploitable)
  Space: O(|A&#8320;| + |A&#8321;|)           Space: O(|A&#8320;| &#215; |A&#8321;|)</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AM1Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AM1Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 424w, https://substackcdn.com/image/fetch/$s_!AM1Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 848w, https://substackcdn.com/image/fetch/$s_!AM1Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 1272w, https://substackcdn.com/image/fetch/$s_!AM1Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AM1Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png" width="1456" height="523" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:523,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106251,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AM1Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 424w, https://substackcdn.com/image/fetch/$s_!AM1Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 848w, https://substackcdn.com/image/fetch/$s_!AM1Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 1272w, https://substackcdn.com/image/fetch/$s_!AM1Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4e01c5-65f6-4cc0-9d15-a02c15b49327_1617x581.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Results across 1,000 games (500 as P0, 500 as P1 to cancel first-mover advantage): 850 wins, 0 draws, 150 losses (85.0% win rate, 95% CI [82.8%, 87.2%], SE = 1.1%). Wall time: 459 s total (0.46 s/game, 10 parallel workers). The chart above shows the W/D/L split and the cumulative win-rate convergence over the full run.</p><p>An 85% win rate from the same CWM, same time budget, same weights, purely by choosing the correct algorithm for simultaneous-move games. Sequential MCTS locks onto a pure strategy early in the search (exploiting its Q-table greedily leads to a single committed action) while SM-MCTS maintains independent uncertainty per player and spreads probability mass across multiple options. The sequential agent cannot recover once SM-MCTS finds its exploitable pure strategy.</p><h4>In closing</h4><p>The most important engineering lesson is the CWM: everything else downstream (search depth, value accuracy, training quality) scales linearly with how fast your forward model runs. A 1000&#215; speedup in the simulator is worth more than any algorithmic improvement to the search.</p><p>The most important research lesson is from the CMA-ES weights: game intuitions fail at scale. Planet count (control) being nearly irrelevant in 2p but dominant in 4p; map centrality being a massive advantage in 1v1 but a liability in 4p: these are findings that would require thousands of hours of human gameplay to internalise, but the optimiser discovers them in ~40 generations.</p><p>The linear value function is the primary remaining bottleneck. Feature interactions (for example, the compounding advantage of being both materially ahead <em>and</em> at game&#8217;s end) are currently approximated by single features (<em>phase_material</em>) rather than learned from data. A small neural network trained on <em>(state, outcome)</em> pairs collected from self-play would capture these non-linear interactions with no increase in search latency (a 2-layer MLP with 32 hidden units runs at ~20 &#181;s on CPU, still fast enough for 150 depth-3 sims/turn).</p><p><em>Decoupled UCB</em> is the same fix for the same failure mode, since a limit-order strategy optimised against a fixed, sequential model of &#8220;the rest of the book&#8221; converges to a pure quote that a faster or better-informed counterparty can pick off, while treating each participant&#8217;s order-placement policy as an independent action-value table pushes the search toward a mixed strategy that is harder to adverse-select against. </p><p>And the <em>CMA-ES</em> result generalises directly: the features that dominate price-formation and adverse-selection risk are rarely the ones a human trader would hand-pick first, which is exactly why parameter search against a diverse, self-play pool of counterparties, rather than tuning against one static model of &#8220;the market,&#8221; is what surfaces them. </p><p>I still find the concept of the Code World Model to manage state transitions between states extremely interesting. And plan to apply it to a state of the equity markets going forward.</p><p>Generalizing, Orbit Wars is a stand-in for any environment where agents act on a shared state without a turn order, and a market order book is the canonical instance. Every piece built here has a direct reading in that domain. The Code World Model is a fast, deterministic simulator of a venue&#8217;s matching logic, the same role a backtester or exchange-replay engine plays for a trading strategy, and it is subject to the same law: a strategy search is only as good as the number of counterfactual order-book states per second it can evaluate. </p><p>Thank you for reading this far. It&#8217;s been a longer-than-expected post. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4gzA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4gzA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 424w, https://substackcdn.com/image/fetch/$s_!4gzA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 848w, https://substackcdn.com/image/fetch/$s_!4gzA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 1272w, https://substackcdn.com/image/fetch/$s_!4gzA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4gzA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png" width="1152" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1152,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1658284,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/203464504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4gzA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 424w, https://substackcdn.com/image/fetch/$s_!4gzA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 848w, https://substackcdn.com/image/fetch/$s_!4gzA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 1272w, https://substackcdn.com/image/fetch/$s_!4gzA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e6668b9-4f4d-443d-9119-bf60ea50da45_1152x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p>]]></content:encoded></item><item><title><![CDATA[DeepMind's (Code) World Models]]></title><description><![CDATA[When Letting LLMs Write the Simulator Matters More Than Letting Them Play]]></description><link>https://jdsemrau.substack.com/p/deepmind-code-world-models</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/deepmind-code-world-models</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 22 Jun 2026 11:37:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!xBYc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Yann LeCun has <a href="https://techcrunch.com/2024/10/16/metas-ai-chief-says-world-models-are-key-to-human-level-ai-but-it-might-be-10-years-out/">argued</a> for years that next-token prediction is insufficient for human-level intelligence and that AI needs world models that learn how the world works. I agree, even if I see the solution not in the model per se, but in the agentic framework around it. It&#8217;s one of the reasons why, since 2023, I have sensors as part of my agent definition because they are required to perceive the world. </p><p>We all have a naive model of the world. If we turn a glass of water around, we expect the water to splash on the floor. World models in agentic systems are internal representations that let a system anticipate what happens next and plan accordingly</p><p>If there is one thing I have learned, given my own work on memory architecture (<a href="https://jdsemrau.substack.com/p/context-window-saturation-in-reasoning">i</a>, <a href="https://jdsemrau.substack.com/p/memory-and-context">ii</a>, <a href="https://jdsemrau.substack.com/p/memory-and-knowledge-for-agents">iii</a>), and also <a href="https://jdsemrau.substack.com/p/the-importance-of-object-permanence">object permanence</a>, is that providing the right frame of reference to understand everything that&#8217;s dumped into the context window increases accuracy manifold. </p><p>Recently, LeCun&#8217;s Joint-Embedding Predictive Architecture (<a href="https://github.com/galilai-group/stable-worldmodel">JEPA</a>) pushed this concept even further. Of course, originally, the term world-model is more often applicable to <a href="https://jdsemrau.substack.com/p/visual-language-action-models">VLAMs</a>, but I am certain that we can extend the concept to more general agent architectures. Especially, since I see them as a milestone on the road to robotics. In this post, I argue that a world model doesn&#8217;t need to predict <em>everything. Not every pixel. Not every grain of rice.</em> </p><p>The model should learn to abstract a representation of the world, based on logic and simple rules, that captures what&#8217;s predictable and discards everything isn&#8217;t. </p><p>And in a way, that is exactly what the Architect from the movie The Matrix: Reloaded also said.</p><blockquote><p>The first Matrix I designed was quite naturally perfect, it was a work of art &#8211; flawless, sublime. A triumph equalled only by its monumental failure. The inevitability of its doom is apparent to me now as a consequence of the imperfection inherent in every human being.</p></blockquote><p>What is predictable can be controlled. </p><p><em>Kevin Kelly</em>, in his seminal work Out of Control, calls this concept <strong>the emergence of control,</strong> where it arises from successfully harnessing what is predictable rather than comprehensively modeling everything. </p><p>I think that&#8217;s the right framing, </p><p>But I&#8217;d like to take it one step further: </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gD8B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gD8B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 424w, https://substackcdn.com/image/fetch/$s_!gD8B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 848w, https://substackcdn.com/image/fetch/$s_!gD8B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 1272w, https://substackcdn.com/image/fetch/$s_!gD8B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gD8B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png" width="725" height="196.1881868131868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:394,&quot;width&quot;:1456,&quot;resizeWidth&quot;:725,&quot;bytes&quot;:50065,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/202039877?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gD8B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 424w, https://substackcdn.com/image/fetch/$s_!gD8B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 848w, https://substackcdn.com/image/fetch/$s_!gD8B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 1272w, https://substackcdn.com/image/fetch/$s_!gD8B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7e917d-631f-4acb-b97b-c70e57654de7_1865x505.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>A world model perceives the world through sensors. In autonomous driving, we talk about cameras and LIDAR. But I think this concept can be extended to purely software agents as well. </p><p>I have implemented sensors in my agent architectures for a long time. In my case, it is not a car that needs to react to sensing an object in the street, but an unusual volume pattern, or an arriving email from a colleague. </p><p>The sensor picks up this new information and provides it to the world model. </p><p>The world model is a predictable abstraction of the world. The world model then provides the information to the planner, who is tasked with finding the right action to take. Given this action, the model forecasts the impact on the world of the action, and then hands it over to the agent to execute the action. </p><p>Here, the term agency is really important. </p><p>It defines the difference between automation and agent. </p><p>As now, after the action has been implemented, the world has changed, and the state of the world has moved one frame further. A stock has been bought, sold, or not. A response email has been written. </p><p>Each <strong>action</strong> moves the agent temporally and sequentially through context. The state of the world changes. </p><p>Each <strong>state transition</strong> describes &#8220;what comes next, given what just happened&#8221;. </p><p>This temporal and sequential framing allows us to validate what we are seing make sense as the sensory observation is scoped to whatever sequence of events the agent pays attention to. I will touch on these components again when I discuss hierarchies. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>Models work the best when they rely on very basic logic. The sun is up during the day. If I can see the sun (a sensor), then it must be daytime. </p><p>A <a href="https://ai.meta.com/research/publications/cwm-an-open-weights-llm-for-research-on-code-generation-with-world-models/">code world model</a> is an extension to the standard world model, as it describes the world through such codified logic. Conceptually, Code World Models have evolved out of a traditional reinforcement learning school of thought that operates within a refined environment. The benefit of using a code world model is that we can just execute the code and observe its effects instead of building a holistic model of the environment. </p><p>Since the boundaries of the world model are assumed finite, it is possible to define <strong>structured, rule-based regularities</strong> that make the future predictable enough to control. In its most basic form, we define </p><ul><li><p><strong>States</strong>: &#8220;A turn moves through draw, discard, or knock phases, and the legal actions are different in each one.&#8221;</p></li><li><p><strong>Invariants</strong>: &#8220;A player can never launch more ships than the planet currently holds, and the code enforces this on every call rather than trusting the caller.&#8221;</p></li><li><p><strong>Conditions</strong>: &#8220;If the attacking force exceeds the garrison, the planet changes ownership.&#8221;</p></li></ul><p>Each state is temporal. And, I think that is really important to understand. While a rule describes how each moment transitions into the <em>next</em> one, the code world model enables long-running, executable accumulation of exactly these kinds of one-sentence rules, applied one step at a time.</p><p>Just like a game loop. </p><p>And I think that&#8217;s where the concept gets really interesting.</p><h4>Monte Carlos Tree Search</h4><p>We begin this section with a discussion of the constraints of simulated environments. In simulated environments, there are generally two very different ways to get a language model to behave intelligently within it. The popular approach is to treat the model as the policy itself: You feed it the rules, the current state, and the model predicts the next state. You see this commonly in reinforcement learning algorithms like PPO. Here, the model becomes an &#8220;intuitive player&#8221; that pattern-matches its way through Chess openings or Poker ranges. Since this approach is traditional RL and therefore quite well known, I won&#8217;t go into too much detail. </p><p>I think its more interesting, instead of having the model play the game a billion times, creating a model that <em>writes the game</em>. That means, given a natural-language rulebook and a handful of example trajectories, have it produce a working simulator. This simulator can then be used to predict state transitions, enumerate legal moves, and expected score outcomes. </p><p>We then hand that simulator to Information Set Monte Carlo Tree Search (ISMCTS) and let <em>that</em> do the playing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L3Jg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L3Jg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 424w, https://substackcdn.com/image/fetch/$s_!L3Jg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 848w, https://substackcdn.com/image/fetch/$s_!L3Jg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 1272w, https://substackcdn.com/image/fetch/$s_!L3Jg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L3Jg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png" width="960" height="540" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:540,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:38904,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/202039877?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L3Jg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 424w, https://substackcdn.com/image/fetch/$s_!L3Jg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 848w, https://substackcdn.com/image/fetch/$s_!L3Jg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 1272w, https://substackcdn.com/image/fetch/$s_!L3Jg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfc20116-8391-4749-9fc2-5e91753ebde6_960x540.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Monte Carlo Tree Search is an algorithm that builds a search tree incrementally over four repeated phases: </p><p><strong>Selection</strong> traverses the tree from the root using a policy that balances exploiting high-value nodes against exploring under-visited ones, until it reaches a leaf; </p><p><strong>Expansion</strong> adds one or more new child nodes to that leaf; </p><p><strong>Rollout</strong> (simulation) plays out a sequence of actions, often randomly or via a fast policy, from the new node to estimate a value Q; and </p><p><strong>Backpropagation</strong> propagates that value back up through every node visited in the selection path, updating their visit counts and value estimates. </p><p>Repeating these four steps many times concentrates simulation effort on promising branches, so the visit counts at the root eventually approximate the optimal action distribution without needing to exhaustively search the full tree.</p><p>Generator simulation and ISMCTS together form the concept of the <strong>Code World Model</strong>, or CWM. First introduced in this recent paper from Google DeepMind, &#8220;<a href="https://arxiv.org/abs/2510.04542">Code World Models for General Game Playing</a>,&#8221; the team pushes this idea further by introducing imperfect information, stochasticity, and games the model has never seen before. </p><p>This paper fits perfectly to Yann LeCun&#8217;s long-running argument that world models, not next-token prediction, are the road to machine intelligence. Given my own learings on self-correcting systems, I can see their point. </p><p>While both concepts, code-as-world-model and learned-latent-world-model, are technically different, they try to answer the same underlying question.</p><blockquote><p>&#8220;If I have the current state and want to do an action, what will the next state be?&#8221;</p></blockquote><h4>Data to Code Translation</h4><p>The DeepMind paper defines the job of the LLM as translation. You give it a textual description of a game&#8217;s rules and add a small number of recorded trajectories from random play. Trajectories here refer to recorded sequences of (state, action, next-state) tuples, i.e., actual play-throughs of the game, logged turn by turn. </p><p>The Code World Model is now tasked to produce code that implements the game engine and a standard interface to it. </p><p>The interface is:</p><ol><li><p>a state transition function, </p></li><li><p>a legal-move enumerator, </p></li><li><p>an observation function, </p></li><li><p>a reward function, and a termination check. </p></li></ol><p>This interface is similar to <a href="https://openspiel.readthedocs.io/en/latest/api_reference.html">OpenSpiel&#8217;s API,</a> the open-source game research framework. Therefore, the resulting code can immediately be dropped into existing, battle-tested planning algorithms.</p><p>Why does this matter? </p><p>Well, in my opinion, there are three advantages this buys you, which are exactly the three things that make &#8220;<a href="https://neurips.cc/media/neurips-2023/Slides/71955.pdf">LLM as policy</a>&#8221; approaches fragile.</p><p><strong>Verifiability.</strong> A CWM is, by construction, a formal specification of the game&#8217;s rules. If the planner wants to know which moves are legal at the current state, it doesn&#8217;t ask the LLM and hope; it calls a function and gets a deterministic answer. The notorious failure mode of LLM-as-policy agents, and something I also encountered in my <a href="https://jdsemrau.substack.com/p/nemotron-vs-qwen-game-theory-and">Game Theory </a>work, is that these models propose illegal moves.</p><p><strong>Strategic depth.</strong> Once you have a working simulator, you can throw arbitrary amounts of search at it. MCTS with a thousand simulations per move doesn&#8217;t care whether the underlying model &#8220;feels&#8221; confident; it just brute-force explores the game tree. This is the classic <em>System 1 / System 2</em> split that <a href="https://www.suebehaviouraldesign.com/en/blog/system-1-and-system-2-explained/">Daniel Kahneman </a>made famous. The LLM supplies a fast, intuitive understanding of the <em>what of the game</em>, while the search algorithm supplies the deliberate, grounded lookahead execution that intuition alone can&#8217;t match.</p><p><strong>Generalization.</strong> For all forms of robotics training, a system do to one thing and do this one thing extremely well has been possible for a long time. The road to AGI might be paved with CWM&#8217;s ability to generalize better to unknown game situations. An LLM asked to <em>translate rules into code</em> is doing something it has seen a copious amount of: turning a specification into a program. The meta-task, i.e., data-to-code translation, is one that the model has practiced at scale, even if the specific game is novel. That&#8217;s why the paper&#8217;s out-of-distribution games (invented specifically so they can&#8217;t be in any LLM&#8217;s training data) are such an important part of the evaluation.</p><h4>Inference-as-code</h4><p>Most prior work on LLM-synthesized world models, <a href="https://arxiv.org/abs/2402.12275">WorldCoder</a> or <em>GIF-MCTS</em>, assumed fully observed, deterministic environments. For generalization, especially if we can bring this concept into capital markets, that is a problem and also a huge simplification. Chess and Go are fully observed: every piece is visible to both players at all times. Poker is not. Bridge is not. Most real strategic situations, negotiations, markets, multi-agent coordination are not.</p><p>The DeepMind paper&#8217;s most substantial contribution, in my opinion, is the contribution of &#8220;inference as code.&#8221; </p><p>My argument is that if you&#8217;re playing Poker you only know your own cards and the public information. How do you predict what your opponent might be holding? </p><p>Card counting is one option. Another is having Information Set MCTS handle this by sampling states to ground truth, testing consistency with sensor observations, running searches across the distribution, and aggregating statistics.</p><p>The problem is that ISMCTS needs a way to <em>generate</em> those plausible ground-truth samples. </p><p>That&#8217;s where inference-as-code comes in. </p><p>In the DeepMind paper, the team tasks the LLM to synthesize a second piece of code, an <em>inference function</em> that takes an observation and action history and samples a plausible, complete history of the game, including the parts the player doesn&#8217;t see: the chance player&#8217;s card deals, the opponent&#8217;s hidden actions, everything. </p><p>Because the CWM&#8217;s transition function is deterministic, sampling a plausible <em>history</em> is equivalent to sampling a plausible <em>hidden state</em>, running the sampled history through the CWM, and getting back a hidden state that&#8217;s consistent with everything you&#8217;ve actually observed.</p><p>For every point in a trajectory where you, the player, took an action, the world model performs a unit test asserting that replaying the sampled history reproduces your actual observation and your actual action at that point. If the inference function passes all these tests, the sampled histories are guaranteed to belong to the <em>support</em> of the true posterior, not necessarily the exact right distribution, but at least plausible, valid states the game could actually be in. </p><p>In other words, the result is a set of hidden states that are <em>actually possible</em> given everything you've observed, as opposed to states that are ruled out by what you've seen. </p><h4>Open vs. Closed </h4><p>One of the paper&#8217;s more practically important contributions is a distinction it calls &#8220;open deck&#8221; versus &#8220;closed deck&#8221; synthesis. </p><p><em>Open deck synthesis</em> assumes that during the training/synthesis phase, you have access to the hidden information in your offline trajectories. You&#8217;re building the model in a &#8220;design room&#8221; where you can see everyone&#8217;s cards, even though the deployed agent never will. This is a reasonable assumption in several real scenarios: cooperative training environments, game-design phases where developers have full state access, or expert demonstrations that come with hindsight annotations. It&#8217;s also the assumption made by the most directly comparable prior work, &#8220;POMDP Coder.&#8221;</p><p><em>Closed deck synthesis</em> drops this assumption entirely. The CWM only sees what the player saw: your own observations and your own actions, never the hidden state, not even after the fact. The paper presents this as the realistic scenario for an agent thrown into a genuinely novel online game, and as far as the authors are aware, no prior CWM work has addressed it.</p><p>The technical solution here is elegant: a kind of code-based autoencoder. </p><p>The LLM still produces a CWM and a hidden-history inference function, but the unit tests are restricted to only what&#8217;s verifiable <em>without</em> hidden information. </p><p>Essentially, &#8220;does the round-trip from observation through inferred hidden history back to observation reproduce what I actually saw?&#8221; </p><p>The inference function acts as an encoder, the CWM acts as a decoder, and the combination of game rules plus the required API serves as the regularizer that keeps this from collapsing into a trivial, useless latent space (the kind of degenerate solution that plain autoencoders are notorious for if you don&#8217;t constrain them).</p><p>Performance does degrade in the closed-deck setting, sometimes substantially. Bargaining&#8217;s online inference accuracy drops from 100% (open deck) to 76% (closed deck). Gin Rummy, already the hard case, becomes essentially unusable: inference accuracy collapses to roughly 9-54% depending on whether you&#8217;re looking at train, test, or online numbers, none of which is good. But here&#8217;s the genuinely surprising finding: despite this synthesis-quality degradation, <em>game-play performance against Gemini 2.5 Pro doesn&#8217;t degrade nearly as much</em>. The CWM-ISMCTS agent built on a noticeably worse closed-deck model still beats or matches the LLM-as-policy baseline in most games. The paper even notes a counterintuitive improvement in one game (Hand of War) under closed-deck conditions, hypothesizing that the freedom to synthesize a <em>simpler</em> state space &#8212; one not constrained to match some externally-imposed &#8220;true&#8221; hidden state &#8212; might sometimes help rather than hurt.</p><p>The practical lesson: synthesis-accuracy metrics and downstream-performance metrics are not the same thing, and a CWM that&#8217;s &#8220;wrong&#8221; in calibrated, support-preserving ways can still be useful for planning, because what the planner actually needs is <em>a</em> valid state to reason from, not necessarily <em>the</em> state.</p><h4>Tree Search vs. Conversation</h4><p>Neither a CWM nor an inference function will come out right on the first try. For all forms of machine learning we need a way to provide corrective feedback. </p><p>During training, the refinement loop generates unit tests from the offline trajectories: for each recorded transition, a test checks whether the CWM&#8217;s prediction matches what actually happened, across states, observations, rewards, and move legality. The CWM is refined until either every test passes or the compute budget runs out.</p><p>The CWM operates two mechanisms. Conversation and Tree Search.</p><p>&#8220;<strong>Conversation</strong>&#8221; is a sequential agentic loop where each failed test&#8217;s stack trace gets appended to the conversation history, and the model is asked to fix it. </p><p>&#8220;<strong>Tree search</strong>&#8221; is more elaborate. Here, multiple candidate CWMs are maintained simultaneously in a refinement tree, and <a href="https://en.wikipedia.org/wiki/Thompson_sampling">Thompson sampling </a>decides which candidate to refine next, weighted toward candidates with either high test-pass rates or few refinement attempts so far, essentially borrowing the bandit-style exploration/exploitation logic that underlies MCTS itself, but applied to <em>code candidates</em> rather than <em>game moves</em>. </p><p>The key practical advantage of tree search is the ability to backtrack: if a line of refinement is going nowhere, the search can abandon it and try a different branch, rather than being stuck digging deeper into a conversational dead end. </p><p>For the perfect-information games in the paper, both approaches converge to perfect transition accuracy quickly, but tree search is also resilient under imperfect-information conditions.</p><h4>Synthesizing the Value Function</h4><p>After the CWM itself and the inference functions, a Code World Model requires a third artifact: heuristic value functions (HVF). The HVF is used to initialize the value of newly-expanded leaf nodes in MCTS and ISMCTS rather than relying purely on random rollouts. Unlike the CWM and inference functions, value functions aren&#8217;t refined against ground truth as there is no &#8220;correct&#8221; heuristic to test against. </p><p>Instead, several candidates are generated in one shot, and the best one is selected through a local tournament: agents using different value functions (including a &#8220;no value function, just rollouts&#8221; baseline) play against each other on the synthesized CWM, and the winner is kept.</p><h4>Where Code World Models and JEPA meet</h4><p>It&#8217;s worth being precise about what&#8217;s actually shared between the DeepMind CWM line of work and the world-model research associated with Yann LeCun, because the overlap is conceptual rather than architectural. </p><p>LeCun&#8217;s &#8220;Path Towards Autonomous Machine Intelligence&#8221; position paper and succeeding work are about <em>learned, latent-space</em> world models. JEPA&#8217;s central bet is that generative models, which try to predict every pixel of the future, are solving the wrong problem; the world is full of irrelevant, unpredictable detail, and a model that tries to reconstruct all of it will waste capacity and fail. Instead, JEPA-style architectures learn an abstract representation of &#8220;what matters&#8221; and make predictions in that abstract space, closer to how, in LeCun&#8217;s framing, a child develops an intuitive model of gravity and object permanence without ever needing to predict the exact trajectory of every falling object down to the pixel.</p><p>The <a href="https://github.com/galilai-group/stable-worldmodel">stable-worldmodel</a> library operationalizes this research. Their implementation is effectively &#8220;a learned simulator that predicts how an environment evolves in response to actions, enabling agents to plan by imagining future outcomes,&#8221; providing fundamentals like: standardized dataset collection from simulated environments, training pipelines for world models, and solvers (including CEM, the Cross-Entropy Method, a classic sampling-based planning algorithm) that use the learned world model for planning. The workflow mimics model-based RL: collect rollouts, train a model that predicts state transitions, then plan against that model rather than against the real environment.</p><p>So where&#8217;s the connection to Code World Models? </p><p>Not in the representation, CWMs are <em>symbolic</em> (literal Python code with explicit state dictionaries and deterministic functions), while JEPA-style world models are <em>learned and latent</em> (neural networks operating on abstract embeddings, typically for continuous, high-dimensional domains like video and robotics). </p><p>But the <em>function</em> is identical: both are &#8220;a thing you can run forward to imagine what happens next, so that a planner doesn&#8217;t need to act blind.&#8221;</p><p>This actually clarifies when each approach makes sense. Code World Models shine when the domain has <em>crisp, describable rules</em>. I.e., board games, card games, turn-based strategy, anything where &#8220;the rules&#8221; is a coherent concept that fits in a prompt and where exact, verifiable transitions matter (you really don&#8217;t want your Poker agent confused about whether a flush beats a straight). </p><p>Learned latent world models shine when the domain is <em>continuous, high-dimensional, and resistant to crisp specification</em>, robotic manipulation, video, and physical dynamics, where &#8220;writing down the rules&#8221; isn&#8217;t really a coherent idea, because the rules <em>are</em> physics, at a level of detail no one&#8217;s going to type into a prompt.</p><p>In both approaches, the model that &#8220;<em>understands</em>&#8221; the domain is explicitly decoupled from the system that <em>acts</em> in it. </p><p>In CWM, the LLM&#8217;s job ends at producing a simulator; MCTS or ISMCTS does the planning. </p><p>In JEPA-based systems, the learned world model&#8217;s job is to predict consequences in representation space; the CEM solver or other planning algorithm does the planning. </p><p>Both architectures are, in a sense, rejections of the &#8220;one model does everything end-to-end&#8221; approach, whether that&#8217;s an LLM directly emitting moves, or a generative video model directly emitting pixels of an imagined future. The bet, in both cases, is that separating &#8220;knowing how the world works&#8221; from &#8220;deciding what to do about it&#8221; produces systems that are more verifiable, more sample-efficient, and more capable of the kind of deep, deliberate lookahead that neither pure pattern-matching nor pure generation reliably delivers on its own.</p><h4>What This Should Mean in Practice</h4><p>We are building agents here. So if you&#8217;re also building one to run a game, then if this game is operating an environment with quirks, edge cases, or undocumented behaviors that diverge from any official rulebook, then the CWM approach offers a concrete, falsifiable workflow.</p><p>You need to: </p><ol><li><p>get the LLM to write the simulator, </p></li><li><p>generate unit tests from real trajectories, </p></li><li><p>refine until those tests pass, and </p></li><li><p>only then let a classical planner loose on the result. </p></li></ol><p>The paper&#8217;s results, CWM-based agents matching or beating a frontier &#8220;thinking&#8221; LLM used as a direct policy in nine out of ten games, including ones invented specifically to be unfamiliar, suggest this isn&#8217;t a niche technique. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4G5S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4G5S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 424w, https://substackcdn.com/image/fetch/$s_!4G5S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 848w, https://substackcdn.com/image/fetch/$s_!4G5S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 1272w, https://substackcdn.com/image/fetch/$s_!4G5S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4G5S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png" width="968" height="211" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:211,&quot;width&quot;:968,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Refer to caption&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Refer to caption" title="Refer to caption" srcset="https://substackcdn.com/image/fetch/$s_!4G5S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 424w, https://substackcdn.com/image/fetch/$s_!4G5S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 848w, https://substackcdn.com/image/fetch/$s_!4G5S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 1272w, https://substackcdn.com/image/fetch/$s_!4G5S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e602519-00a2-4f2b-b234-53dd74cad0b3_968x211.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h5><a href="https://arxiv.org/html/2510.04542v1">source: figure 4</a></h5><p>It&#8217;s a genuinely different division of labor between language models and search, one where the LLM&#8217;s most valuable contribution might not be the move it suggests, but the simulator it writes. </p><p>Unresolved cases are instructive, too. Gin Rummy&#8217;s procedural, multi-stage scoring logic remains the hard frontier, a reminder that &#8220;translate the rules into code&#8221; is itself a task with a difficulty gradient, and that gradient tracks <em>procedural depth</em> more than it tracks how complex a game seems to a human player. For anyone applying this approach to their own domain, that&#8217;s probably the single most useful diagnostic question to ask up front: how many sequential, conditional phases does a single turn actually involve? The more of those there are, the more refinement budget, and the more carefully-chosen unit tests &#8212; you should expect to need before the world model the LLM writes actually matches the world it&#8217;s describing.</p><p>Thank you for reading this far. </p><p>Kindly share this post if you think it provides value to you. Thank you!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Encyclopedia Autonomica is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xBYc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xBYc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 424w, https://substackcdn.com/image/fetch/$s_!xBYc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 848w, https://substackcdn.com/image/fetch/$s_!xBYc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 1272w, https://substackcdn.com/image/fetch/$s_!xBYc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xBYc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png" width="1344" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1344,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2071535,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/202039877?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xBYc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 424w, https://substackcdn.com/image/fetch/$s_!xBYc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 848w, https://substackcdn.com/image/fetch/$s_!xBYc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 1272w, https://substackcdn.com/image/fetch/$s_!xBYc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F645bfcd2-5bac-4eb8-b163-8a86f47e706c_1344x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p>]]></content:encoded></item><item><title><![CDATA[Agentic AI FinOps Playbook]]></title><description><![CDATA[A guide to tokenmaxxing AI costs in your organization]]></description><link>https://jdsemrau.substack.com/p/agentic-ai-finops-playbook</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/agentic-ai-finops-playbook</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Thu, 28 May 2026 11:37:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Wh8J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a5a6710-eef8-4b56-b931-28a872c28eea_960x540.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Jevons Paradox is causing your model bills to grow faster than anyone planned, buried in infrastructure invoices, and distributed across dozens of teams with no coherent view of what they&#8217;re buying or why. </p><p>Over the last few years, companies have pushed to become AI-ready by pushing their employees to use AI as much as possible </p><p>But now the <a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/ai-cost-crisis-hits-tech-giants-as-employee-tokenmaxxing-backfires-agentic-ai-eats-up-to-1000x-more-tokens-than-standard-ai-sparks-corporate-pullback-at-microsoft-meta-and-amazon">bills</a> are coming in, and it&#8217;s not nice.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>If your CFO is starting to ask questions and the CTO doesn&#8217;t have clean answers, its a tough spot to be in. </p><p>So I wrote this playbook as a six-phase programme for getting that situation under control. I figure that, as usual, this is not simply about cutting costs, but building the institutional capability to manage AI spend the same way mature organizations manage cloud spend. If some terms are unknown, I added a glossary at the end.</p><blockquote><p><em>Tokenmaxxing isn&#8217;t about spending less. It&#8217;s about spending right.</em></p></blockquote><p>I did not invent the term, but I&#8217;ve been using it since my last <a href="https://jdsemrau.substack.com/p/tokenmaxxing-and-optimizing-context">post</a> on the topic. </p><p><em>Tokenmaxxing</em> is about extracting the maximum business value from every token, not just minimizing them and organizing them into 6 sequential phases</p><p>Each phase has a clear goal, a set of concrete actions, and named departmental owners. </p><p>You can run this progressively, Phase 1 before Phase 2 or adapt it to wherever your organization already is.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rU-P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rU-P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 424w, https://substackcdn.com/image/fetch/$s_!rU-P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 848w, https://substackcdn.com/image/fetch/$s_!rU-P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 1272w, https://substackcdn.com/image/fetch/$s_!rU-P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rU-P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png" width="1360" height="516" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:516,&quot;width&quot;:1360,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:118501,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/199552642?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rU-P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 424w, https://substackcdn.com/image/fetch/$s_!rU-P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 848w, https://substackcdn.com/image/fetch/$s_!rU-P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 1272w, https://substackcdn.com/image/fetch/$s_!rU-P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5de8f1a2-56ae-4847-aa5c-348d8eafaea8_1360x516.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I will now go into more detail for each of these phases, but I believe they are fundamentally clear, and this document serves as a high-level playbook, rather than a deep dive.</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/agentic-ai-finops-playbook">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Recursive Language Models and Neurosymbolic Context Management]]></title><description><![CDATA[Recursive AI & neurosymbolic memory: how RLMs and symbolic architectures solve long-context reasoning for production AI agents.]]></description><link>https://jdsemrau.substack.com/p/recursive-language-models-and-neurosymbolic-context-management</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/recursive-language-models-and-neurosymbolic-context-management</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 25 May 2026 05:38:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!unLR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>&#8220;Recursion: see Recursion.&#8221; &#8212; Dictionary definition joke</p></blockquote><blockquote><p>&#8220;To iterate is human, to recurse divine.&#8221; &#8212; L. Peter Deutsch</p></blockquote><p>The more agents iterate over your workspace, the more long-context reasoning and memory management remain open challenges. As you are well aware, traditional transformer-based LLMs are limited by fixed token windows: once the prompt exceeds the context length, earlier information is simply forgotten.</p><p>As I wrote in my research paper &#8220;<a href="https://www.researchgate.net/publication/380345952_Production_Rule_Systems_In_Autonomous_Agents">Production Rule Systems In Autonomous Agents</a>&#8221;, I propose that recursive designs might be an interesting new approach to evaluating intelligence, and Recursive Language Models (RLM) specifically could be a new paradigm with a fundamentally different inference strategy. </p><p>What is an RLM?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>An RLM treats the prompt not as raw text fed into a transformer, but as part of an <em>external environment</em> (e.g., a variable in a REPL) that the agent can programmatically explore. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-yXM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-yXM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 424w, https://substackcdn.com/image/fetch/$s_!-yXM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 848w, https://substackcdn.com/image/fetch/$s_!-yXM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 1272w, https://substackcdn.com/image/fetch/$s_!-yXM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-yXM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png" width="1456" height="1109" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1109,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Teaser Figure&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Teaser Figure" title="Teaser Figure" srcset="https://substackcdn.com/image/fetch/$s_!-yXM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 424w, https://substackcdn.com/image/fetch/$s_!-yXM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 848w, https://substackcdn.com/image/fetch/$s_!-yXM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 1272w, https://substackcdn.com/image/fetch/$s_!-yXM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a30d755-402a-4c12-b80b-5c54679b940e_2721x2073.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5><a href="https://alexzhang13.github.io/blog/2025/rlm/">source</a></h5><p>More on my work on <a href="https://jdsemrau.substack.com/p/group-sequence-policy-optimization">REPL, GSPO, and GRPO</a>.</p><p>Concretely, given a long prompt <code>P</code>, the RLM initializes a programming environment with <code>P</code> loaded, and provides the agent with high-level context (like the length of <code>P</code>). The agent then writes code to inspect, decompose, and query <code>P</code>, for example, splitting the input into segments or searching for relevant parts, and recursively calls itself on those subtasks. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ffqr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ffqr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 424w, https://substackcdn.com/image/fetch/$s_!Ffqr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 848w, https://substackcdn.com/image/fetch/$s_!Ffqr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 1272w, https://substackcdn.com/image/fetch/$s_!Ffqr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ffqr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png" width="1456" height="791" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:791,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94245,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/183974401?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ffqr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 424w, https://substackcdn.com/image/fetch/$s_!Ffqr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 848w, https://substackcdn.com/image/fetch/$s_!Ffqr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 1272w, https://substackcdn.com/image/fetch/$s_!Ffqr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3baa4490-6ece-417f-8a7d-8e155e02072b_1472x800.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Effectively, RLMs work by offloading prompt management to a symbolic layer (code and environment) while using the transformer only on manageable snippets. And maybe it makes sense to reframe &#8220;prompt&#8221; here as an <em>instruction</em> rather than a <em>question</em>. Especially if you are working within the context of workspace agents, the agent would request additional information and/or trigger a service to execute a task. Naturally, it can be expected that there will be a constant back and forth between the main conversational task and tertiary agents. </p><p>This leads to frequent decomposition and self-invocation. This approach, if solved by RLMs, lets RLMs handle arbitrarily long inputs (far beyond any model&#8217;s token limit) and has been shown to dramatically improve quality on long-context tasks. In experiments with GPT-5 (Zhang <em>et al.)</em>, RLMs maintained accuracy on problems 100&#215; longer than its context window, whereas a vanilla transformer&#8217;s performance quickly degraded.</p><p>Transformer-based agents and RLMs thus contrast sharply in principle: </p><ol><li><p>Transformers process the entire prompt in one shot (subject to memory and cost constraints), whereas RLMs treat large inputs as a symbolic environment and iteratively &#8220;consume&#8221; them. Crucially, an RLM still uses the same neural core (e.g. GPT) but augments it with a memory management layer. </p></li><li><p>The RLM framework is akin to <em>out-of-core computing</em> in databases: small fast memory plus clever external storage. By building a memory-first architecture, RLMs avoid simply concatenating more tokens. </p></li><li><p>Instead, they mimic programs that fetch, filter, and summarize context as needed. This inversion of the memory role is the key theoretical foundation: RLMs prioritize structured memory access over expanding the raw context window.</p></li></ol><p>As I have already touched upon in <a href="https://jdsemrau.substack.com/p/grounded-symbolic-reasoning-sense-symbolize-plan-act">Grounded Autonomy: Neuro-symbolic Representations in the Reasoning Loop </a>(Aug 2025)</p><h4><strong>Neurosymbolic Reasoning, Structures, and Context</strong></h4><p>I believe that neurosymbolic architectures that tightly integrate symbolic knowledge with LLMs to manage context and reasoning operate much more effectively on long-form tasks. A prerequisite for agent implementations in production. In these neurosymbolic agents, high-level structures (e.g., logic rules, symbolic memory graphs, planning modules) work alongside neural networks. For example, <em>neuro-symbolic agents</em> may use an agent as a language interface while delegating precise computation or consistency checks to symbolic components. </p><p>In fact, Narayanan (2026) describes neuro-symbolic agents as systems that &#8220;combine neural models with symbolic structures (rules, graphs, typed schemas)&#8221; to gain better controllability and verifiability. These designs preserve the flexible language reasoning of neural nets, while offloading correctness, long-term memory, or discrete planning to symbolic modules.</p><p>Neurosymbolic context management often takes one or more of these forms:</p><p><strong>Symbolic memory stores</strong>: Here, a graph or database records knowledge derived from the environment. For instance, semantic memory consists of structured knowledge bases or graphs that the agent can query. Such memory can be indexed by concepts or embeddings, enabling retrieval when needed. My Superbill app &#8220;Sentinel&#8221;, for example, stores facts and rules about a stock in an RDF knowledge graph, then queries it via symbolic logic to inform its answers. Agent frameworks are now commonly are already able to build <em>hierarchical memory graphs</em> for agents, organizing knowledge in multi-level structures to capture dependencies and temporal coherence. These graphs evolve as the agent operates: new nodes or edges are added, and old facts can be consolidated or abstracted.</p><p><strong>Hierarchical Planning</strong>: Something I touched upon in <a href="https://jdsemrau.substack.com/p/ai-security-and-the-world-of-horizon">AI Security and the World of Horizon Zero Dawn</a>. Symbolic planning decomposes tasks into sub-tasks using logic or graphs. Recent approaches to neurosymbolic planning combine LLMs with symbolic planners. For example, a neuro-symbolic planner might use an LLM to propose high-level actions, then verify or refine them with a planner written in PDDL (Planning Domain Definition Language). Alessio Capitanelli demonstrates this with &#8220;<a href="https://arxiv.org/html/2303.00438v3">Teriyaki</a>,&#8221; a system that trains GPT-3 to act like a symbolic planner. Teriyaki generates PDDL plans action-by-action, enabling concurrent planning and execution. His experiments showed it solved 95.5% of test problems (comparable to traditional planners), produced plans ~13% shorter on average, and significantly reduced planning latency. Similarly, other work builds <em>hierarchical decomposers</em>: Cornelio, for example apllies a knowledge graph along with LLMs to break complex tasks into subtasks, then applies a symbolic validator to check correctness. Their hybrid approach (&#8220;KG-RAG&#8221; + LLM) outperformed baselines on difficult robotic planning benchmarks. In essence, I believe that hierarchical planning and verification use symbolic structure (graphs, validators) are extremely effective when managing context as the agent holds high-level plans symbolically, calls the agent only for parts of the reasoning, and checks actions with logic to maintain consistency.</p><p>Further, <strong>Semantic Abstraction</strong> involves converting raw input into higher-level symbols or categories. For instance, an agent might parse text into a semantic representation (like a frame or schema) that summarizes concepts and relationships. These abstractions can be stored as part of memory. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W7FV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W7FV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 424w, https://substackcdn.com/image/fetch/$s_!W7FV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 848w, https://substackcdn.com/image/fetch/$s_!W7FV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 1272w, https://substackcdn.com/image/fetch/$s_!W7FV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W7FV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png" width="1456" height="908" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:908,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:982147,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/183974401?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!W7FV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 424w, https://substackcdn.com/image/fetch/$s_!W7FV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 848w, https://substackcdn.com/image/fetch/$s_!W7FV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 1272w, https://substackcdn.com/image/fetch/$s_!W7FV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20f9756-424f-40bd-a330-80a4294fba80_1774x1106.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5><a href="https://www.mdpi.com/1424-8220/25/18/5688">source</a></h5><p>In this recent study of cognitive mobility agents, agents used &#8220;semantic abstraction&#8221; to capture user routines at different time scales. The research team from the Valencian Research Institute for Artificial Intelligence built weekly identity-driven plans (long-term) and daily reactive adaptations (short-term), then distilled these experiences into abstract concepts (like <em>destination preferences</em> or <em>time budgets</em>) that shaped future decisions. </p><p>This approach to memory, storing <em>generalized knowledge</em> about an agent&#8217;s experiences, is crucial for keeping context manageable. Semantic memories (general facts, rules, user profiles) are often stored in knowledge bases or embeddings and selectively retrieved. Other systems use a durative memory strategy: they group related events over time into summaries (e.g. &#8220;morning routine: coffee then commute&#8221;), which then serve as symbols the agent can reason about. These semantic representations serve as abstractions that bridge raw observations and high-level goals.</p><p>Together, these neurosymbolic techniques enable agents to remember what matters and reason across time. Rather than letting a transformer wade through raw tokens indefinitely, the agent maintains structured memory layers: scratchpad/working memory for immediate subgoals, short-term memory for recent context, and long-term/semantic memory for facts and patterns. </p><p>This mirrors human cognition and offers a scalable approach: by dynamically retrieving only relevant symbolic memory (instead of full text), the agent focuses on continuity with bounded resources.</p><h4>Memory Architectures for Long-Term Context</h4><p>A key distinction to highlight is <em>context window vs. memory architecture</em>. Traditional agent prompts act like volatile RAM: they hold the current working context but are lost once overflowed. In contrast, a memory-first system is more like a persistent database. </p><p>A memory architecture allows an agent to store, retrieve, and reuse information beyond its active session<em>,</em> enabling it to remember facts and adapt through experience. </p><p>In practical terms, as I had shown before, memory architecture layers must support multiple capabilities. One possible implementation could be like this:</p><ul><li><p>Working memory (context window): a dynamic space for immediate reasoning (e.g., a short conversation or code snippet).</p></li><li><p>Episodic memory: logs of past events or interactions (often stored as sequences or graphs of episodes) that can be recalled whole or consolidated into longer narratives.</p></li><li><p>Semantic memory: a database of generalized knowledge and facts (implemented as knowledge graphs, databases, or vector embeddings).</p></li><li><p>Procedural memory: stored skills and heuristics (often less explicitly mentioned in agentic systems, but akin to fine-tuned behaviors or policies).</p></li></ul><p>As mentioned above, semantic memory is often implemented via knowledge graphs or embeddings, enabling efficient retrieval of factual or conceptual information. You can then use agent frameworks using tools to access vector databases for factual lookup, symbol-based memories for structure, and in-session buffers for immediate tasks. I have in the past explored several, and up until January 2026, my go-to framework was Smolagents, but since then, I have mostly been using Claude&#8217;s <a href="https://github.com/anthropics/claude-agent-sdk-python">SDK</a>.</p><p>Context management emphasizes <em>relevance and retention</em>. </p><p>Simply inflating the context window has never been a successful strategy. Large context sizes incur steep compute costs and do not guarantee the model &#8220;remembers&#8221; older content; the attention weights still dilute with length. </p><p>Instead, intelligent memory systems decide autonomously what to bring into context.</p><p>And that&#8217;s the game changer.</p><p>Naturally, memories should be selectively retrieved through similarity search or keyed queries rather than blind token dumps. This is naively true. But this is also why Retrieval-Augmented Generation (RAG), where the model queries a vector store or database at inference time, has been so prevalent in the past. It is also why the RLM framework, by design, layers the context: the agent only ever sees a snippet at a time, but can retrieve other snippets on demand programmatically.</p><h4>Applications and Case Studies</h4><p>In my preparation for this post, I found these projects that implemented the ideas of recursive inference and neurosymbolic memory:</p><p><strong>Extended Context Language Tasks</strong>: Zhang&#8217;s RLM experiments themselves serve as case studies. They applied RLMs to tasks like needle-in-a-haystack retrieval, code repository understanding, and synthetic reasoning. In each case, the RLM significantly outperformed a baseline that used the raw prompt, especially as input length grew. For instance, on a synthetic pairwise reasoning task, vanilla GPT-5 failed catastrophically beyond 50K tokens, while the RLM maintained high accuracy even at millions of tokens. These results demonstrate that recursive prompting can effectively emulate an &#8220;infinite context&#8221; system with only nominal extra cost per query.</p><p><strong>Robotic Planning (Teriyaki):</strong> In robotics, combining agents with symbolic planners is already happening. The &#8220;Teriyaki&#8221; framework is a generator of task plans that mixes GPT-3 with classical planning. They trained GPT-3 to output PDDL plans and then use those to guide execution. This neurosymbolic hybrid solved ~95% of test planning problems (versus about 98% for a pure PDDL planner) but produced more compact plans and was much faster to output each action. In human-robot tests, this meant the robot could adapt its plan on-the-fly as it executed actions, maintaining fluency in collaboration. Teriyaki demonstrates how symbolic context (PDDL states and effects) and LLM creativity (generating possible next steps) can together improve real-world planning under uncertainty. Would be keen to see how this would perform with 2026 SOTA models.</p><p><strong>Hierarchical LLM Agents</strong> introduce complex task decomposition. Here, the LLM executes planning by alternating between LLM subroutines and symbolic checks. The agent first queries an LLM to outline a top-level plan, then uses a knowledge-graph RAG system to fetch relevant domain information, then refines subplans, validating each step with a symbolic &#8220;world model.&#8221; In experiments involving multi-step cooking or assembly tasks, this approach beat pure LLM baselines and pure planning baselines. This might indicate that neurosymbolic context (the knowledge graph + logic validator) can guide LLMs to more correct, context-aware solutions.</p><p><strong>Cognitive Simulation (Urban Mobility)</strong>: Peng applied these ideas to simulating human behavior. The team built agent-based models where each simulated person had an LLM-driven cognitive loop. Each agent used multi-horizon planning: it set weekly goals (based on profile) and daily plans (based on immediate events), integrated with episodic memory (past events) and semantic abstraction (general patterns). For example, an agent might abstract &#8220;takes route A to work&#8221; from repeated daily logs and then prefer that option even if details change. In large-scale mobility simulations, these agents could exhibit realistic adaptive behaviors under disruptions (like road closures). Their study finds that LLM-driven planning plus memory layers allows agents to <em>&#8220;form routines, reflect on disruptions, and adapt strategies over time.&#8221;</em> The semantic abstractions (e.g., user preferences, typical schedules) were key to coordinating short-term context with long-term personality traits.</p><p>In summary, in my opinion, these cases illustrate how recursive and neurosymbolic techniques are already shaping production solutions. In my opinion, they allow agent systems to work effectively on tasks that require sustained context: enterprise knowledge agents, robotics plans, long simulations, and beyond. The common thread is that each application divides labor between the neural and the symbolic: long-term patterns go into memory or logic, short-term specifics go into the transformer. This hybrid strategy is proving effective for on-premise, privacy-sensitive, and computation-limited environments where maximizing context and reasoning is critical.</p><h4>In closing</h4><p>I think the convergence of recursive inference strategies and neurosymbolic memory architectures represents a promising path for managing long-term context. Recursive Language Models show that we can dramatically extend an agent&#8217;s effective context by programmatically breaking tasks down and using the agent as a subroutine. </p><p>At the same time, neurosymbolic frameworks leverages that context is organized, interpretable, and persistently stored: knowledge graphs, logic modules, and hierarchical planners give structure to what might otherwise be an amorphous token stream. </p><p>In practice, this means moving away from monolithic prompt windows and toward multi-layer memory systems. I believe that simply increasing context size is a dead end, and instead champions modular memory layers and planning loops.</p><p>Thus, I propose a new design philosophy for AI agents: one that blends neural flexibility with symbolic memory. As initial experiments like Sentinel, RLMs, and Teriyaki demonstrate, such recursive neurosymbolic agents can tackle tasks that were previously impossible for fixed-window transformers. </p><p>Going forward, I expect more systems to adopt these ideas, using dynamic memory graphs, hierarchical abstraction, and programmatic context access to achieve true long-term reasoning and continuity.</p><p>Thank you for reading this far.</p><p>Kindly share this post, as it allows me to write more on this topic.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/p/recursive-language-models-and-neurosymbolic-context-management?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/p/recursive-language-models-and-neurosymbolic-context-management?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4>References :</h4><ul><li><p>Zhang <em>et al.</em>, &#8220;<a href="https://arxiv.org/abs/2512.24601">Recursive Language Models</a>&#8221;, arXiv (2025) &#8211; Describes the RLM framework for unbounded input processing.</p></li><li><p>Honda &amp; Hagiwara, &#8220;<a href="https://www.sciencedirect.com/science/article/pii/S0925231225019411">Context-dependent neuro-symbolic AI through self-supervised learning with LLMs&#8221;</a>, <em>Neurocomputing</em> (2025) &#8211; Introduces a neuro-symbolic network that learns context-aware reasoning, reducing search space for proof tasks.</p></li><li><p>Cornelio <em>et al.</em>, &#8220;<a href="https://arxiv.org/abs/2504.04578">Hierarchical Planning for Complex Tasks with KG-RAG and Symbolic Verification&#8221;</a>, arXiv (2025) &#8211; Proposes an LLM-based planner enhanced by knowledge-graph retrieval and symbolic validators.</p></li><li><p>Capitanelli &amp; Mastrogiovanni, &#8220;<a href="https://arxiv.org/abs/2303.00438">Teriyaki: Neurosymbolic Robot Action Planning&#8221;, </a><em><a href="https://arxiv.org/abs/2303.00438">Frontiers in Neurorobotics</a></em> (2024) &#8211; Demonstrates a GPT-3 planner trained to output PDDL plans, combining neural generation with symbolic planning.</p></li><li><p>Peng <em>et al.</em>, &#8220;<a href="https://www.mdpi.com/1424-8220/25/18/5688">Cognitive Agents in Urban Mobility&#8221;</a>, <em>Simul. Model. Pract. Theory</em> (2023) &#8211; Shows LLM-driven agents using multi-horizon plans, episodic memory, and semantic abstraction to simulate adaptive commuter behavior.</p></li><li><p>Xu<em>.</em>, &#8220;<a href="https://arxiv.org/html/2601.01743v1">AI Agent Systems: Architectures, Applications, and Evaluation</a>&#8221;, arXiv (2026) &#8211; Comprehensive survey of agent architectures, including a section on neuro-symbolic agents.</p></li></ul><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!unLR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!unLR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 424w, https://substackcdn.com/image/fetch/$s_!unLR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 848w, https://substackcdn.com/image/fetch/$s_!unLR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 1272w, https://substackcdn.com/image/fetch/$s_!unLR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!unLR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png" width="1344" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1344,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1952212,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/183974401?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!unLR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 424w, https://substackcdn.com/image/fetch/$s_!unLR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 848w, https://substackcdn.com/image/fetch/$s_!unLR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 1272w, https://substackcdn.com/image/fetch/$s_!unLR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60d1fe33-ffe1-4441-a81c-562281d10a20_1344x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div>]]></content:encoded></item><item><title><![CDATA[Meta's Hyperagents & Self-Correcting Agents]]></title><description><![CDATA[A feedback loop that closes on the system's own implementation, not just its outputs. Five levels of self-correction. META, reinforcement learning, Q-learning]]></description><link>https://jdsemrau.substack.com/p/hyperagents-and-self-correcting-systems</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/hyperagents-and-self-correcting-systems</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 11 May 2026 04:07:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!cdut!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>&#8220;<em>The feedback loop, not the function, is the unit of intelligence.</em>&#8221;</p><p>Norbert Wiener, <a href="https://direct.mit.edu/books/oa-monograph/4581/Cybernetics-or-Control-and-Communication-in-the">Cybernetics</a> (1948)</p></blockquote><p></p><p>A couple of days ago, I was running a full fundamental analysis on AEYE. </p><p>What happened next will blow your mind. </p><p>Sorry for the hyperbole&#8230;</p><p>One of the many <a href="https://jdsemrau.substack.com/p/the-absurd-effectiveness-of-skillsmd">skills</a> I have implemented for &#8220;Sentinel&#8221; fka Superbill is a three-scenario intrinsic value model (<a href="https://www.investopedia.com/articles/basics/12/intrinsic-value.asp">Investopedia</a>). </p><p>This is a very common workflow that aims to identify if the stock is valued correctly or not. </p><p><em>Related readings:</em></p><ol><li><p><a href="https://jdsemrau.substack.com/p/pair-programming-superbill-with-codex">Pair-programming Superbill with Codex-5.2 and Claude Sonnet 4.6</a></p></li><li><p><a href="https://jdsemrau.substack.com/p/multi-agents-for-optimal-equity-portfolio-construction">Multi-Agents for Optimal Equity Portfolio Construction</a></p></li><li><p><a href="https://jdsemrau.substack.com/p/grounded-symbolic-reasoning-sense-symbolize-plan-act">Grounded Autonomy: Neuro-symbolic Representations in the Reasoning Loop</a></p></li><li><p><a href="https://jdsemrau.substack.com/p/becoming-super-agent-bill-ackman">Becoming Agent Bill Ackman</a></p></li><li><p><a href="https://jdsemrau.substack.com/p/so-i-built-agentic-deepsearch-for">So, I built Agentic DeepSearch for Investing in 2023 and Nobody Cared</a></p><p></p></li></ol><p>Partway through the analysis, the skill called the &#8220;<em>calculate_irr</em>&#8221; tool to retrieve deterministically MOIC figures. In case you don&#8217;t know, Multiple on Invested Capital is a measure of how many times over an investor has returned their initial investment. </p><p>In this case, the skill generated 3 scenarios:</p><ol><li><p>Bear at 1.671x, </p></li><li><p>Base at 2.267x, and</p></li><li><p>Bull at 2.914x. </p></li></ol><p>What then happened surprised me. And I am not ashamed to disclose that I did not expect that behaviour, even though I designed the agent. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_Fj3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_Fj3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 424w, https://substackcdn.com/image/fetch/$s_!_Fj3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 848w, https://substackcdn.com/image/fetch/$s_!_Fj3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 1272w, https://substackcdn.com/image/fetch/$s_!_Fj3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_Fj3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png" width="724" height="407.25" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:540,&quot;width&quot;:960,&quot;resizeWidth&quot;:724,&quot;bytes&quot;:314224,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/193277457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_Fj3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 424w, https://substackcdn.com/image/fetch/$s_!_Fj3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 848w, https://substackcdn.com/image/fetch/$s_!_Fj3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 1272w, https://substackcdn.com/image/fetch/$s_!_Fj3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fceb2-b344-4ef9-a185-c13dc10eba77_960x540.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Those two blurry screenshots show the moment the agent realized that something was wrong. On the left-hand side, you see the Sentinel Agent, while on the right, you see Claude Sonnet in GitHub Copilot. The Sentinel Agents run in the right rail of my app, and in case you are wondering, Sentinel also runs Claude Sonnet 4.6 as the backend through the API. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p><blockquote><p>&#8220;The most dangerous phrase in the language is &#8216;We&#8217;ve always done it this way.&#8221;, Grace Hopper</p></blockquote><h4>Distrusting your own tool</h4><p>In traditional software systems, a function is deterministically implemented and then executed during runtime to return a result. In that sense, they are just logical constructs that do their assigned task or not. In the latter case, we as software engineers usually understand and test failure cases, including edge cases. Yet, given the absence of bugs, once implemented, we have the inherent trust that the function just executes reliably and consistently. However, if something is wrong and you don&#8217;t test for it, your program will always execute it incorrectly. </p><p>In workspace agents, this might not be the case. Of course we need to engineer the same deterministic reliability into the agent tooling as in standard functions. </p><p>Yet, if we engineer our agents correctly, then we can configure agents that they validate the responses they receive. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8jLO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8jLO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 424w, https://substackcdn.com/image/fetch/$s_!8jLO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 848w, https://substackcdn.com/image/fetch/$s_!8jLO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 1272w, https://substackcdn.com/image/fetch/$s_!8jLO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8jLO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png" width="508" height="163.1293103448276" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:149,&quot;width&quot;:464,&quot;resizeWidth&quot;:508,&quot;bytes&quot;:36143,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/193277457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8jLO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 424w, https://substackcdn.com/image/fetch/$s_!8jLO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 848w, https://substackcdn.com/image/fetch/$s_!8jLO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 1272w, https://substackcdn.com/image/fetch/$s_!8jLO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb2439d-9bab-47e1-ad26-edc5c68d2544_464x149.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now what surprised me in this case is that the agent realized that the tool he was using was implemented incorrectly. This agent does not have access to the code base but can run tests. So he only informed me that something was wrong. And I then checked it using the coding agent. This agent then located the fault in tools.py, validated that the invested capital was indeed being double-counted in the MOIC formula, generated a corrective patch, applied it to the codebase, and re-ran the calculation to verify. </p><p>What I describe here is an example of what I call Level 4 agentic self-modification: An AI system with read-and-write access to its own implementation, capable of closing the loop between &#8220;something is wrong&#8221; and &#8220;the thing is fixed&#8221; without human intervention in the repair itself. </p><p>The broader research context for this behaviour, and why it matters far beyond my app, is what this post is about.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><h4>Why Self-Improvement Matters</h4><p>The long arc toward systems that improve themselves has been a dream since the term &#8220;artificial intelligence&#8221; was coined. The desire to build machines that can get better at what they do was articulated by Norbert Wiener as the foundational principle in his 1948 work on cybernetics. His main insight, and an engineering principle that I am reusing, is that intelligent behaviour is not about producing the right output, but about continuously measuring the gap between actual and desired performance and acting to close it. </p><p>The feedback loop, not the function, is the unit of intelligence.</p><p>What Wiener described abstractly, Richard Bellman formalised later mathematically. His dynamic programming framework gave us the language of sequential decisions under uncertainty, thereby establishing the basis for every reinforcement learning algorithm that followed. By the time Q-learning arrived in 1992, we had the mathematical tools to train agents that could improve their behaviour from experience, but not yet the inference capabilities and infrastructure we have now. </p><p>Historically, the leap to superhuman performance came through self-play. OpenAI researched Emergent Tool Use From Multi-Agent Autocurricula,<strong> </strong>and I wrote about it two years ago <a href="https://jdsemrau.substack.com/p/paper-review-emergent-tool-use-from">here</a>. AlphaGo and AlphaZero demonstrated that a system competing against progressively stronger versions of itself could discover strategies no human had conceived, not by being told what good play looks like, but by iteratively correcting its own failures. <a href="https://openai.com/index/openai-five/">OpenAI Five</a> then extended this to cooperative multi-agent settings. In every case, the key ingredient was the same: a loop that turns mistakes into improvement signals, and improvement signals into better behaviour.</p><p>My main concern is that reinforcement learning is a largely mathematical exercise that optimizes a policy while maximizing a payoff. </p><p>Large language models changed the texture of this problem. </p><p>And this is what I want to talk about here. </p><p>Suddenly, the &#8220;policy&#8221; being improved was not a set of numerical weights updated by gradient descent, but a reasoning process expressed in natural language. Aman Madaan et al showed in <a href="https://arxiv.org/abs/2303.17651">Self-Refine</a> that an LLM could be prompted to critique its own outputs and revise them iteratively, with each cycle yielding measurable improvement. </p><p><a href="https://jdsemrau.substack.com/p/chain-buffer-tree-of-thought-react">Chain-of-thought</a> prompting revealed that making reasoning explicit, writing out each step rather than jumping to an answer, functions as in-context self-verification. Reflexion went further: storing verbal self-reflections in episodic memory, letting an agent accumulate lessons from failure across multiple sessions.</p><p>Why does this matter beyond academic benchmarks? </p><p>Because the systems we are building now, Sentinel (investment analysis tools), coding assistants, and deep research agents, are all deployed in domains where errors have real consequences. A MOIC calculation that is wrong across every scenario is a bug that corrupts every downstream investment decision that relies on it.</p><p>Self-correction also fundamentally has a compounding characteristic. </p><p>So, in reinforcement learning, if gradient descent stalls at a local minimum, it will never find the global minimum. </p><p>And a system that corrects each error ephemerally, producing the right answer once, then reverting to the buggy behaviour, is barely better than one that never corrects at all. </p><p>We want to have agents that make durable corrections and understand why. This means that the fact that an agent can persist the fix so that every future invocation benefits from it is qualitatively different. This is the difference between a one-time patch and an actual improvement. The compounding of durable corrections is, in miniature, what we mean when we talk about systems that learn.</p><h4>Five levels of self-correction</h4><p>Not all self-correction is created equal.</p><p>The research community has converged on a useful framework for thinking about the different depths at which a system can close the loop on its own performance. I find this taxonomy genuinely clarifying; it makes explicit what is and isn&#8217;t changing when a system &#8220;corrects itself,&#8221; and it illuminates why some forms of self-correction feel like a parlour trick while others feel like a fundamental shift.</p><p>Formally: think of a system as three components, a task policy f (what it does), a parameter update rule U (how it learns), and a meta-level modification operator M (how it improves its improvement process). </p><p>Each level of self-correction is defined by which of these the system actually changes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AoNJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AoNJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 424w, https://substackcdn.com/image/fetch/$s_!AoNJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 848w, https://substackcdn.com/image/fetch/$s_!AoNJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 1272w, https://substackcdn.com/image/fetch/$s_!AoNJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AoNJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png" width="1440" height="1464" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1464,&quot;width&quot;:1440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:218373,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/193277457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AoNJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 424w, https://substackcdn.com/image/fetch/$s_!AoNJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 848w, https://substackcdn.com/image/fetch/$s_!AoNJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 1272w, https://substackcdn.com/image/fetch/$s_!AoNJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5679591a-81d6-4d8f-a598-a479c537c2e4_1440x1464.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>LEVEL 1: Output-level correction</strong></p><p>The system generates multiple candidate outputs and selects among them. Nothing internal has changed. The system is identical before and after correction.</p><p>Examples: self-consistent voting, confidence re-ranking, majority vote.</p><p><strong>LEVEL 2: Behavioural adaptation</strong></p><p>The system updates its parameters &#952; based on feedback, via a fixed update rule U. The policy improves; the mechanism of improvement doesn&#8217;t. This is classical reinforcement learning.</p><p>Examples: Q-learning, DQN, AlphaZero self-play, STaR fine-tuning.</p><p><strong>LEVEL 3: Procedural self-refinement</strong></p><p>The system generates an explicit critique of its own output, then revises it. No weights change, but the content of corrections is model-generated. The critique-revise template is fixed and externally specified.</p><p>Examples: Self-Refine, Chain-of-Thought, Tree-of-Thoughts, Reflexion.</p><p><strong>LEVEL 4: Agentic self-modification </strong></p><p>The system reads and modifies components of its own implementation, code, prompt templates, and tool configurations. It revises the procedures that generate outputs, not just the outputs themselves. The meta-operator M remains fixed.</p><p>Examples: Darwin G&#246;del Machine, ADAS, Eureka, and the screenshots at the top of this post.</p><p>LEVEL 5: Metacognitive self-modification</p><p>The system modifies the modification operator itself. It can become better at getting better, enabling compounding improvement not bound by initial design choices.</p><p>Examples: Meta&#8217;s DGM-H Hyperagents demonstrated spontaneous emergence of persistent memory, UCB-style selection, and automated bias detection.</p><p>With this definition of the levels, we can form an effective hierarchy: a system at level k can simulate all behaviours of levels below it, but not vice versa. </p><p>What makes the taxonomy useful in practice is that each level is falsifiable. L4 is falsified if you can show the codebase is unchanged before and after a correction cycle. You can literally run a diff. In my session, that diff is visible in the screenshot: tools.py was updated. The formula changed from (invested + total_return) / invested to total_return / invested. That is L4 in the most literal sense.</p><p>The safety implications track the taxonomy closely. At L1&#8211;L3, the system&#8217;s modifiable surface is limited to outputs and reasoning traces, both human-readable, both correctable from outside. At L4, the system gains write access to its own implementation. The transition from L3 to L4 is the critical safety boundary: below it, the worst a system can do is produce a wrong answer; above it, it can become a different system.</p><h4>Self-correction in Sentinel</h4><p>An ambient intelligence layer with just-in-time self-correction</p><p>The investment app whose screenshots open this post is built around what I call an ambient financial intelligence layer, a system that persists analytical context across sessions, assembles structured information from multiple tiers of memory, and can correct its own tool implementations in response to high-level semantic feedback. The MOIC fix, albeit shameful, was not a one-off: it is representative of how the system is designed to behave whenever something goes wrong.</p><p>The architecture integrates five mechanisms simultaneously:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e8vX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e8vX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 424w, https://substackcdn.com/image/fetch/$s_!e8vX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 848w, https://substackcdn.com/image/fetch/$s_!e8vX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 1272w, https://substackcdn.com/image/fetch/$s_!e8vX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e8vX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png" width="1440" height="1176" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1176,&quot;width&quot;:1440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:153045,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/193277457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!e8vX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 424w, https://substackcdn.com/image/fetch/$s_!e8vX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 848w, https://substackcdn.com/image/fetch/$s_!e8vX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 1272w, https://substackcdn.com/image/fetch/$s_!e8vX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa550eb15-7857-4d15-9c56-e181a49ce006_1440x1176.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is also a memory architecture as well as a feedback mechanism. Most reinforcement learning algorithms only see history as a delta. My implementation can specifically identify relevant memories for the problem in question.</p><p><strong>T1.LIVE</strong>: Real-time market data from Alpha Vantage, FactSet, NASDAQ Datalink, SEC EDGAR, and news/political trade feeds. Cached so each data point is fetched exactly once per session.</p><p><strong>T2.CACHE</strong>: Session cache: all tool results from the current conversation, preventing redundant API calls and giving the agent a consistent view of data it has already acquired.</p><p><strong>T3.HISTORY</strong>: The last N turns of dialogue, enabling reference resolution and maintaining context across a long analytical session.</p><p><strong>T4.THESIS</strong>: Persistent thesis memory: per-ticker JSON files storing the agent&#8217;s accumulated analytical work, writable by the agent and persisted across sessions. This is the substrate for long-term improvement.</p><p><strong>SELF-FIX: </strong>Interactive error repair: when the agent or user identify anomalous outputs, the agent localises the fault in its own tool registry, diagnoses the root cause, generates and applies a patch, and verifies the corrected output, without the user specifying a line of code.</p><p>The context assembly is deliberately tiered and intent-filtered. </p><p>Before processing any query, the system detects the query&#8217;s category,  financials, price, technical indicators, news, insider filings, and selectively includes only relevant portions of each tier. </p><p>This reduces token usage by 60&#8211;80% compared to naive context injection.</p><p>The results across 50 analytical tasks:</p><p>&#8226; Full architecture accuracy: 73% (vs. 41% baseline with no memory or self-correction)</p><p>&#8226; User-flagged errors autonomously corrected: 89%</p><p>&#8226; Accuracy on later tasks (after earlier corrections compound): 81%</p><p>&#8226; API token reduction via session caching: 58%</p><p>&#8226; Reduction in redundant tool calls: 62%</p><p>That last figure, 81% accuracy on later tasks,  is the one I find most significant. </p><p>Why?</p><p>Well, in my opinion, it measures the accuracy on tasks that came after earlier corrections had propagated. The system got measurably better over the course of the evaluation, because each durable bug fix made subsequent tasks easier. </p><p>This is what compounding looks like in practice and why I think it is so important to consider during your feedback loop design.</p><p>I should be honest about what this is not. </p><p>The evaluation benchmarks are internal and have not been independently replicated. The system is firmly at L4, not L5, since the modification operator itself is fixed and hand-crafted. And the 11% of user-flagged errors that weren&#8217;t autonomously corrected required more detailed debugging guidance or represented genuinely ambiguous specifications. </p><p>What I find compelling, though, is the convergence of several methods: the capabilities I engineered deliberately, persistent memory, execution trace logging, and structured error analysis, are the same capabilities that emerged spontaneously in the DGM-H Hyperagents research system, without being explicitly designed. </p><p>If independent research and independent engineering converge on the same architectural primitives, that suggests these are not arbitrary design choices. </p><p>They are something closer to the natural shape of effective self-correction.</p><h4>In closing</h4><p>The thing that changed.</p><p>When I read the agent's thought, I was immediately puzzled since I did not expect this response at all. </p><p>The screenshots at the top of this post may seem, on the surface, unremarkable. </p><p>A bug was found. A bug was fixed. </p><p>This happens millions of times a day in software development. </p><p>What makes them worth writing about is the mechanism: no human wrote the patch. The system read its own source, reasoned about the discrepancy, generated a correction, applied it, and verified the result. The codebase is permanently different because of a complaint the agent itself made in plain English.</p><p>Wiener&#8217;s feedback loop is 78 years old as a concept. </p><p>What is new is that the loop now operates at the level of the system&#8217;s own implementation, not just its outputs. The thing being corrected is not the answer the system gives; it is the tool the system uses to generate answers. </p><p>The safety implications are real, and I don&#8217;t want to minimise the threat. </p><p>A system with write access to its own codebase has a fundamentally different threat model than one that can only produce wrong answers. </p><p>The failure modes, misaligned self-modification, specification gaming, and the compounding of small errors through an autonomous repair loop are serious and not yet fully understood. Any honest account of self-correcting AI has to hold both things at once: this is genuinely powerful, and the oversight problems it introduces are genuinely hard.</p><p>But a financial intelligence layer that durably fixes its own calculation errors,  without requiring the user to understand the code, is not a dangerous system. It is a more trustworthy one. </p><p>The compounding of correct behaviour over time is exactly what we want from tools we rely on.</p><p>We are in the early stages of understanding what it means for a system to genuinely improve. Not to produce a better output once, but to become, in some durable sense, better at producing good outputs. The five-level taxonomy gives us a language for that question. </p><p>And my experience as described in this post is, in a small way, evidence that the question is no longer purely theoretical.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cdut!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cdut!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 424w, https://substackcdn.com/image/fetch/$s_!cdut!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 848w, https://substackcdn.com/image/fetch/$s_!cdut!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 1272w, https://substackcdn.com/image/fetch/$s_!cdut!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cdut!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png" width="1152" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1152,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1311778,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/193277457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cdut!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 424w, https://substackcdn.com/image/fetch/$s_!cdut!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 848w, https://substackcdn.com/image/fetch/$s_!cdut!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 1272w, https://substackcdn.com/image/fetch/$s_!cdut!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0349fa6c-e0a8-441f-a0aa-4f2e3520f547_1152x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p>]]></content:encoded></item><item><title><![CDATA[Tokenmaxxing and Optimizing Context with Deep Context Query]]></title><description><![CDATA[How intent-based filtering and RegEx-driven context extraction deliver 40&#8211;70% token reduction and better answers in agent systems.]]></description><link>https://jdsemrau.substack.com/p/tokenmaxxing-and-optimizing-context</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/tokenmaxxing-and-optimizing-context</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 27 Apr 2026 04:07:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!sufQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Silly Silicon Valley Executives pride themselves on creating leaderboards who burns the most tokens (<a href="https://www.theinformation.com/articles/meta-employees-vie-ai-token-legend-status?ref=jdsemrau.substack.com">tokenmaxxing</a>). Despite the weird spelling giving me PTSD of the stupid years (crypto degens know), it is for me the equivalent of measuring the result of a race by maximizing fuel usage. </p><p>As I have written in numerous occasions (<a href="https://jdsemrau.substack.com/p/context-window-saturation-in-reasoning">1</a>,<a href="https://jdsemrau.substack.com/p/evaluating-consciousness-and-reasoning">2</a>), more context isn&#8217;t always better. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!24rP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!24rP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 424w, https://substackcdn.com/image/fetch/$s_!24rP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 848w, https://substackcdn.com/image/fetch/$s_!24rP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 1272w, https://substackcdn.com/image/fetch/$s_!24rP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!24rP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:100913,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/191737952?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!24rP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 424w, https://substackcdn.com/image/fetch/$s_!24rP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 848w, https://substackcdn.com/image/fetch/$s_!24rP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 1272w, https://substackcdn.com/image/fetch/$s_!24rP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee75f804-daa1-4323-91ad-da6dd1953eb3_1599x899.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Although context windows are only ever increasing, once you run agents in production, you will quickly notice a poorly hidden constraint called <a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">attention degradation</a>. i.r., the more tokens you stuff into context, the less effectively the model attends to any individual piece of information.</p><p>Tokenmaxxing inverts the usual instinct by assuming that we maximize the quantity of tokens and not their quality. I don&#8217;t think that this approach is either valuable for getting better responses or good for the environment. </p><p>In this article, I want to present a production-ready framework, Deep Context Query (DCQ), for doing exactly that.</p><p>An intent-driven context filtering system that leans on the learnings from using GitHub Copilot and is built on RegEx pattern matching. I am using it in my latest iteration on &#8220;<a href="https://jdsemrau.substack.com/p/pair-programming-superbill-with-codex">Superbill</a>&#8221;  that I am recently dubbing &#8220;Sentinel&#8221;.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gm0d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gm0d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 424w, https://substackcdn.com/image/fetch/$s_!gm0d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 848w, https://substackcdn.com/image/fetch/$s_!gm0d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 1272w, https://substackcdn.com/image/fetch/$s_!gm0d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gm0d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png" width="1456" height="734" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:734,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:573209,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/191737952?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gm0d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 424w, https://substackcdn.com/image/fetch/$s_!gm0d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 848w, https://substackcdn.com/image/fetch/$s_!gm0d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 1272w, https://substackcdn.com/image/fetch/$s_!gm0d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd426dd3e-8ead-4c2a-ba6e-8680b104fa65_1846x931.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I have done some more work on the UI/UX recently using Claude Design and Stitch with Google. </p><p>In this app, for each opportunity, I on average, 30,000 tokens are used per request. The techniques I am presenting in this article achieve <strong>40&#8211;70% token reduction</strong> while improving response quality.</p><p>The principles are applicable to other agents as well, and not only financial research agents. If your agent operates over rich contextual data across multiple turns, token optimization is not optional. It is architecture.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><h4>The Attention Budget Problem</h4><p>Transformers compute self-attention across every token pair in the context window, n&#178; relationships for n tokens. As context grows, as it does with every agent loop iteration, the used token budget increases. This results in reduced recall accuracy, degraded reasoning precision, and increased hallucination.</p><p>What can be done to improve this?</p><p>Naturally, I was looking for ways to ensure that my agents perform well. </p><p>The Memory Intelligence Agent (<a href="https://arxiv.org/abs/2604.04503">MIA</a>) paper found that raw context injection, dumping everything into the window, performs <em>worse than no memory at all</em> when accumulated trajectories are noisy. A 7B-parameter MIA model with intelligent memory management outperformed a 32B model without it by 18 points on the GAIA benchmark. </p><p>This underlines that we need to have a clearly structured memory architecture for your agents. Not clearly engineering context leads to bloated prompts.  </p><h4>The Economics of Bloated Prompts</h4><p>Token bloat is not only a performance problem, but it is also a cost problem. </p><p>Here is a real-life example from my daily work. </p><p>A typical investment research session comprises stock data (financials, news, volume, insider trades) runs around 15,000 tokens. Add to that an 8,000-token thesis document, 12,000 tokens of tool results, 6,000 tokens of chat history, and a 3,000-token system prompt, and you&#8217;re at roughly <strong>44,000 tokens per turn</strong>.</p><p>At $3 per million input tokens (Claude Sonnet), that&#8217;s $0.132 per turn. Over a 20-turn research session, costs reach $2.64. Scale to 100,000 queries per month and you&#8217;re looking at $264,000 per year, much of it spent transmitting context the model doesn&#8217;t need for the query at hand.</p><p>Obviously, at that scale, you need to have a clear business case to make this viable. </p><h4>Deep Context Query</h4><p>My approach starts before constructing the prompt, by analyzing what the user is actually asking (intent), then extracting only the data from memory needed to answer.</p><p>Something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GanZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GanZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 424w, https://substackcdn.com/image/fetch/$s_!GanZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 848w, https://substackcdn.com/image/fetch/$s_!GanZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 1272w, https://substackcdn.com/image/fetch/$s_!GanZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GanZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png" width="1440" height="580" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:580,&quot;width&quot;:1440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:55856,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/191737952?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GanZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 424w, https://substackcdn.com/image/fetch/$s_!GanZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 848w, https://substackcdn.com/image/fetch/$s_!GanZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 1272w, https://substackcdn.com/image/fetch/$s_!GanZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdabe8475-53b3-48d7-a4a2-7f23b3a0e891_1440x580.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The intent analysis step is what makes the context management much more effective. Because I don&#8217;t use only the LLM to make that decision, I am using a dynamic and lightweight RegEx pattern matching approach to classify queries into semantic categories in under a millisecond, without a secondary model call, which then drives extraction from structured context subblocks.</p><p>Why RegEx, Not ML?</p><p>2 words. Speed and Determinism.</p><p><strong>Speed</strong>: My RegEx executes in microseconds. In production, I measure a mean of 0.34ms per query (max 0.72ms) across 1,000 production queries. In comparison, <a href="https://github.com/microsoft/LLMLingua">LLMLingua</a>, a learned compression method, reports ~340&#8211;400ms overhead, a 1,000&#215; latency disadvantage for the ML approach.</p><p><strong>Determinism</strong>: Patterns are predictable, debuggable, and version-controllable. No drift, no surprise.</p><p><strong>Zero dependencies</strong>: No training data, no secondary model, no infrastructure.</p><p><strong>Explicit control</strong>: Engineers can read, tune, and audit the exact logic.</p><p>The accuracy trade-off? </p><p>My DCQ solution achieves <strong>99.2% intent classification accuracy</strong> with a 0.8% false-negative rate, competitive with trained multi-label classifiers for comparable vocabulary sizes, at a fraction of the operational cost. For structured domains like finance, legal, or medical, RegEx often matches ML before you reach for the complexity.</p><p>So, how to implement it?</p><p>Here is a simple overview of the layers </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s3ZD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s3ZD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 424w, https://substackcdn.com/image/fetch/$s_!s3ZD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 848w, https://substackcdn.com/image/fetch/$s_!s3ZD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 1272w, https://substackcdn.com/image/fetch/$s_!s3ZD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s3ZD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png" width="1440" height="1300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1300,&quot;width&quot;:1440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:166046,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/191737952?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!s3ZD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 424w, https://substackcdn.com/image/fetch/$s_!s3ZD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 848w, https://substackcdn.com/image/fetch/$s_!s3ZD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 1272w, https://substackcdn.com/image/fetch/$s_!s3ZD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0018b647-939d-4e59-a6b1-485c9954cb5a_1440x1300.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h4><strong>Layer 1: Intent Classification</strong></h4><p>The classification layer analyzes the user query and produces a structured intent object, with boolean flags representing distinct information needs. </p><p>In my financial use-case, I am covering three core intents: news, financials, and price:</p><pre><code><code>from dataclasses import dataclass
import re

@dataclass
class Intent:
    needs_news: bool = False
    needs_financials: bool = False
    needs_price: bool = False

def analyze_intent(question: str) -&gt; Intent:
    q_lower = question.lower()
    intent = Intent()

    intent.needs_news = bool(re.search(
        r'\b(news|article|headline|press|announcement|media|report|story|publication)\b',
        q_lower
    ))

    intent.needs_financials = bool(re.search(
        r'\b(revenue|earnings|profit|margin|eps|income|cash flow|fcf|'
        r'assets|liabilities|debt|ebitda|operating|capex|dividend|'
        r'balance sheet|income statement|financial|p/e|pe ratio)\b',
        q_lower
    ))

    intent.needs_price = bool(re.search(
        r'\b(price|quote|trading at|stock price|market cap|valuation|'
        r'52-week|high|low|chart|technical)\b',
        q_lower
    ))

    return intent</code></code></pre><p>In production, you&#8217;d extend this to cover additional intents, insider trades, SEC filings, options, and portfolio context, but the pattern is identical. Each flag is independent, multiple flags can fire simultaneously, and the whole function runs in under a millisecond.</p><p>Key design choices worth noting: </p><ol><li><p>Each pattern covers 5&#8211;15 related synonyms to maximize recall, since missing a relevant query (false negative) is worse than including slightly too much. </p></li><li><p>Word boundaries (<code>\b</code>) prevent substring false positives,&#8220;earnings&#8221; won&#8217;t trigger on &#8220;learnings&#8221;, &#8220;assets&#8221; won&#8217;t fire on &#8220;assemble&#8221;.</p></li></ol><h4>Layer 2: Context Extraction</h4><p>Data arrives in structured, section-tagged blocks:</p><pre><code><code>[Volume]
Average: 50M shares
Today: 65M shares (+30%)

[News]
- 2024-03-15: Tesla announces new factory
- 2024-03-14: Q4 earnings beat estimates

[Fundamentals]
Revenue: $100B
EPS: $5.00</code></code></pre><p>DCQ extracts only the sections relevant to the detected intent, using lookahead patterns to preserve section boundaries:</p><pre><code><code>def optimize_stock_context(stock_context: str, intent: Intent, max_chars: int = 3000) -&gt; str:
    if not stock_context or len(stock_context) &lt; 100:
        return stock_context

    sections_to_include = []

    if intent.needs_price:
        volume_match = re.search(r'(\[Volume\].*?)(?=\n\s*\[|\n\s*&lt;/stock_context&gt;|$)',
                                  stock_context, re.DOTALL)
        if volume_match:
            sections_to_include.append(volume_match.group(1).strip())

    if intent.needs_news:
        news_match = re.search(r'(\[News\].*?)(?=\n\s*\[|\n\s*&lt;/stock_context&gt;|$)',
                               stock_context, re.DOTALL)
        if news_match:
            sections_to_include.append(news_match.group(1).strip())
    else:
        # Include headlines only &#8212; not full articles
        news_match = re.search(r'\[News\](.*?)(?=\n\s*\[|\n\s*&lt;/stock_context&gt;|$)',
                               stock_context, re.DOTALL)
        if news_match:
            news_lines = news_match.group(1).strip().split('\n')[:11]
            sections_to_include.append('[News]\n' + '\n'.join(news_lines))

    if intent.needs_financials:
        fundamental_match = re.search(r'(\[Fundamentals\].*?)(?=\n\s*\[|\n\s*&lt;/stock_context&gt;|$)',
                                      stock_context, re.DOTALL)
        if fundamental_match:
            sections_to_include.append(fundamental_match.group(1).strip())

    metadata_match = re.search(r'(&lt;stock_context&gt;.*?\n)', stock_context, re.DOTALL)
    metadata = metadata_match.group(1) if metadata_match else '&lt;stock_context&gt;\n'

    if sections_to_include:
        filtered = metadata + '\n\n'.join(sections_to_include) + '\n&lt;/stock_context&gt;'
        return filtered[:max_chars]

    return stock_context[:max_chars]</code></code></pre><p>The core pattern, </p><p><strong>r'(Volume.*?)(?=\n\s*\[|\n\s*&lt;/stock_context&gt;|$)'</strong> ,</p><p>matches the section header, captures everything non-greedily, and stops at the next header or closing tag via lookahead without consuming those characters. </p><p>Here, the intention is to remove what&#8217;s unnecessary, preserve everything that remains intact.</p><h4>Layer 3: Tool Result Deduplication</h4><p>Multi-turn agents accumulate tool results across turns. Without deduplication, the same financial data gets sent to the model repeatedly:</p><pre><code><code>[get_financials(TSLA)] Revenue: $100B, EPS: $5.00
[get_news(TSLA)] 15 articles fetched
[get_financials(TSLA)] Revenue: $100B, EPS: $5.00  &#8592; Duplicate!</code></code></pre><p>Research on agentic memory systems confirms that redundant tool trajectories actively degrade model performance, the model attends to duplicated noise, diluting signal from genuinely new information. In a representative 10-turn session, deduplication reduces effective API calls from 18 to 6.</p><pre><code><code>def optimize_acquired_data(acquired_data: str, intent: Intent, max_results: int = 10) -&gt; str:
    if not acquired_data or len(acquired_data) &lt; 50:
        return acquired_data

    pattern = r'\[([\w_]+)\([^)]*\)\]\s*(.*?)(?=\n\[|\n&lt;/acquired_data&gt;|$)'
    matches = re.findall(pattern, acquired_data, re.DOTALL)

    seen = {}
    for tool_name, result in matches:
        key = (tool_name, result[:100].strip())  # First 100 chars as signature
        if key not in seen:
            seen[key] = {
                'tool': tool_name,
                'result': result.strip(),
                'order': len(seen)
            }

    relevant_tools = []
    if intent.needs_news:
        relevant_tools.extend(['fetch_news', 'get_cached_news', 'get_news_item_url'])
    if intent.needs_financials:
        relevant_tools.extend(['get_financials', 'INCOME_STATEMENT', 'BALANCE_SHEET',
                              'CASH_FLOW', 'get_dividend_history'])
    if intent.needs_price:
        relevant_tools.extend(['get_price_history', 'get_technical_indicators'])

    if not relevant_tools:
        relevant_tools = None

    filtered_results = []
    for key, data in sorted(seen.items(), key=lambda x: x[1]['order']):
        if relevant_tools is None or data['tool'] in relevant_tools:
            filtered_results.append(f"[{data['tool']}(...)] {data['result']}")

    filtered_results = filtered_results[-max_results:]

    if filtered_results:
        return '&lt;acquired_data&gt;\n' + '\n\n'.join(filtered_results) + '\n&lt;/acquired_data&gt;'

    return '&lt;acquired_data&gt;&lt;/acquired_data&gt;'</code></code></pre><p>The deduplication key uses <strong>result[:100]</strong> as a signature, which allows same-tool, different-result calls to coexist (news fetched on different days) while eliminating true duplicates.</p><h4>Layer 4: Thesis Summarization and History Windowing</h4><p>Investment theses can easily grow to 10,000+ tokens over long sessions per call. For queries unrelated to reviewing or editing the thesis, DCQ replaces the full document with a section outline:</p><pre><code><code>def optimize_thesis(thesis: str, intent: Intent, max_chars: int = 3000) -&gt; str:
    if not thesis or len(thesis) &lt; 500:
        return thesis

    if intent.needs_financials:  # Thesis likely relevant for deep financial queries
        return thesis[:max_chars]

    sections = re.findall(r'^#+\s+(.+)$', thesis, re.MULTILINE)

    if sections:
        summary = "&lt;current_thesis&gt;\n"
        summary += "# Thesis Outline (full version available if needed)\n\n"
        for section in sections[:8]:
            summary += f"- {section}\n"
        content_start = thesis[:300].strip()
        summary += f"\n{content_start}...\n"
        summary += "\n&lt;!-- Full thesis omitted. Ask to review thesis for complete version. --&gt;\n"
        summary += "&lt;/current_thesis&gt;"
        return summary

    return thesis[:max_chars]</code></code></pre><h4><strong>History windowing</strong>: </h4><p>Conversation history grows linearly with turns. DCQ keeps only the 5 most recent turns, sufficient to resolve all coherent reference chains observed in production (&#8221;add that to the thesis&#8221;, &#8220;compare it to what you said about the competitor&#8221;). </p><p>Beyond that, I believe chat history is noise.</p><pre><code><code>def optimize_chat_history(chat_history: str, max_turns: int = 5) -&gt; str:
    if not chat_history or len(chat_history) &lt; 100:
        return chat_history

    turns = re.split(r'\n(?=User:|Assistant:)', chat_history)

    if len(turns) &lt;= max_turns:
        return chat_history

    recent_turns = turns[-max_turns:]

    summary = "&lt;chat_history&gt;\n"
    summary += f"&lt;!-- Showing last {max_turns} turns of {len(turns)} total --&gt;\n\n"
    summary += '\n'.join(recent_turns)
    summary += "\n&lt;/chat_history&gt;"

    return summary</code></code></pre><h4>Agent Orchestrator</h4><p>All four layers compose into a single entry point called before every prompt construction:</p><pre><code><code>def optimize_context(
    stock_context: str,
    acquired_data: str,
    current_thesis: str,
    chat_history: str,
    question: str,
    max_stock_chars: int = 3000,
    max_turns: int = 5,
    max_results: int = 10
) -&gt; tuple[str, str, str, str, Intent]:

    intent = analyze_intent(question)

    opt_stock = optimize_stock_context(stock_context, intent, max_stock_chars)
    opt_acquired = optimize_acquired_data(acquired_data, intent, max_results)
    opt_thesis = optimize_thesis(current_thesis, intent)
    opt_history = optimize_chat_history(chat_history, max_turns)

    return opt_stock, opt_acquired, opt_thesis, opt_history, intent</code></code></pre><h4>Results</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gy7X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gy7X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!gy7X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!gy7X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!gy7X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gy7X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png" width="1408" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:497358,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/191737952?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gy7X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 424w, https://substackcdn.com/image/fetch/$s_!gy7X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 848w, https://substackcdn.com/image/fetch/$s_!gy7X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 1272w, https://substackcdn.com/image/fetch/$s_!gy7X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e81542-8692-4c70-bfd2-ce5794d0cd91_1408x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I run this in production right now, but I also tested it across 1,000 representative queries over six weeks of pilot deployment. The results break down cleanly by query type. News-only queries achieve the largest reduction, from ~42,000 tokens down to ~12,500, a 70% drop, because the entire fundamentals block and most tool history is irrelevant and excluded. Financials-only queries drop from ~44,000 to ~16,800 tokens (62%). Technical analysis queries compress from ~38,000 to ~15,200 (60%). Even general, ambiguous questions see a 40% reduction from deduplication and history windowing alone. The average across all query types is 57.6%, from 43,000 tokens to 18,220.</p><p>In my opinion, the dominant lever is stock section extraction, which alone accounts for 46.5 percentage points of reduction by stripping full news sections and fundamentals blocks from queries that don&#8217;t require them. Thesis summarization adds the second-largest quality gain, collapsing an 8,000-token document to a 600-token outline for ~56% of queries that aren&#8217;t thesis reviews.</p><p>Every tested query achieved at least 35% reduction. </p><p>I did not observe a query type where DCQ made things worse.</p><p>My unsurprising verdict is that less is more. An optimized context <em>improves</em> response quality. A/B testing across 100 queries with human evaluation on a 1&#8211;5 scale (validated by the Wilcoxon signed-rank test) shows correctness moves from 4.3 to 4.4, completeness from 4.1 to 4.2, and overall quality from 4.1 to 4.4. The headline finding is relevance: +0.6 points (p &lt; 0.001), from 3.9 to 4.5. Fewer tokens, better focus. </p><p>The model attends more precisely when the noise is removed.</p><p>False negative rate was 0.8%, 8 of 1,000 queries where a relevant section was incorrectly excluded. All cases involved ambiguous queries where intent classification failed, resolvable by expanding pattern coverage.</p><p>At 100,000 queries per month, baseline annual API costs run ~$264,000. Post-DCQ, that drops to ~$112,000, $152,000 in annual savings. </p><p>At 10,000 queries per month, the savings are ~$15,200 per year. </p><h4>Lessons learned</h4><p><strong>Prioritize recall over precision.</strong> A false positive (slightly too much context included) is less harmful than a false negative (relevant section excluded). Design patterns wide, with 5&#8211;15 synonyms per category.</p><p><strong>Use word boundaries religiously.</strong> Always wrap terms in <code>\b...\b</code>. &#8220;assets&#8221; should not trigger on &#8220;assemble&#8221;; &#8220;options&#8221; should not fire on &#8220;captions&#8221;.</p><p><strong>Version-control your patterns.</strong> As domain vocabulary evolves, maintain a changelog. This creates institutional knowledge and makes regressions diagnosable.</p><p><strong>Test against real user queries.</strong> Synthetic test cases miss natural language variation. Log actual queries and validate coverage against them quarterly.</p><p><strong>Always have a graceful fallback.</strong> Wrap all optimization in try-except fallbacks. If RegEx fails on malformed input, return an unoptimized context rather than crashing the request.</p><p><strong>Log everything.</strong> Emit metrics per call: original token count, optimized token count, reduction percentage, detected intent flags, and processing latency. This data drives future improvements.</p><p><strong>Roll out progressively.</strong> Deploy to 10% of traffic, then 50%, then 100% over several weeks. Monitor error rates and user satisfaction at each step.</p><p>But this might be quite basic. What about more advanced techniques?</p><h4>Advanced Optimization Techniques</h4><p>Active Compaction (LLM-Assisted Summarization) is when history exceeds a volume threshold, use the model itself to compress older turns:</p><pre><code><code>if len(turns) &gt; 10:
    old_turns = '\n'.join(turns[:-5])
    summary_prompt = f"Summarize this conversation history in 200 words:\n{old_turns}"
    summary = llm.generate(summary_prompt)
    return f"&lt;chat_history&gt;\n{summary}\n\n{recent_5_turns}\n&lt;/chat_history&gt;"</code></code></pre><p>The cost is one additional LLM call per cycle. The benefit is that this enables much longer effective conversation windows without linear context growth.</p><p><strong>Intent Confidence Scoring </strong>replaces binary flags with continuous confidence scores for proportional filtering:</p><pre><code><code>@dataclass
class Intent:
    needs_news: float = 0.0
    needs_financials: float = 0.0
    needs_price: float = 0.0

def analyze_intent(question: str) -&gt; Intent:
    q_lower = question.lower()
    intent = Intent()
    news_matches = len(re.findall(r'\b(news|article|headline)\b', q_lower))
    intent.needs_news = min(news_matches * 0.4, 1.0)
    return intent</code></code></pre><p>If Low-confidence is detected, then I include sections defensively. In the opposite scenario, high-confidence detection, I can filter aggressively.</p><p><strong>Multi-Turn Intent Inheritanc</strong>e optimizes follow-up questions as they inherit intent from prior turns using OR logic:</p><pre><code><code>Turn 1: "What's the latest news on Tesla?"   &#8594; needs_news=True
Turn 2: "And what about Microsoft?"          &#8594; needs_news=True (inherited)</code></code></pre><p>Here you store intent in the conversation state and merge with the current turn&#8217;s detected intent. This prevents follow-up questions from losing their implicit context.</p><p><strong>Semantic Fallback for Unstructured Text</strong> supports the situation when context lacks section headers, and we need to use embedding-based cosine-similarity as a fallback:</p><pre><code><code>def extract_relevant_paragraphs(text: str, question: str, top_k: int = 3) -&gt; str:
    paragraphs = text.split('\n\n')
    question_emb = embed_text(question)
    para_embs = [embed_text(p) for p in paragraphs]
    scores = [cosine_similarity(question_emb, p_emb) for p_emb in para_embs]
    top_indices = argsort(scores)[-top_k:]
    return '\n\n'.join([paragraphs[i] for i in top_indices])</code></code></pre><p>Use RegEx for structured data; fall back to semantic matching only for unstructured text where section boundaries don&#8217;t exist.</p><h4>In Closing</h4><p>Tokens are a finite resource. And I firmly believe we need to optimize them for our own sanity. They are a precious budget, and by spending it recklessly, it puts the model in an irrelevant context, actively harming the model&#8217;s ability to reason about what matters and also the environment. </p><p>Deep Context Query delivers 40&#8211;70% token reduction across diverse query types, improved response quality through higher signal-to-noise ratio, $150K+ annual savings at production scale, zero external dependencies, and deterministic behavior that&#8217;s predictable, debuggable, and version-controllable.</p><p>The implementation runs in production at DeepCQ, processing thousands of investment research queries daily. The patterns are battle-tested against real user needs, edge cases, and performance requirements.</p><p>The principle generalises. Financial analyst, coding assistant, legal researcher, customer support agent, the context window is always finite, attention always degrades, and thoughtful curation always wins. </p><p>Understand intent. Extract precisely. Optimize relentlessly.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Encyclopedia Autonomica is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sufQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sufQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 424w, https://substackcdn.com/image/fetch/$s_!sufQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 848w, https://substackcdn.com/image/fetch/$s_!sufQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 1272w, https://substackcdn.com/image/fetch/$s_!sufQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sufQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png" width="1152" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1152,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:812049,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/191737952?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sufQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 424w, https://substackcdn.com/image/fetch/$s_!sufQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 848w, https://substackcdn.com/image/fetch/$s_!sufQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 1272w, https://substackcdn.com/image/fetch/$s_!sufQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16417f4c-cfe9-488c-b7b5-a07d2effa46a_1152x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div>]]></content:encoded></item><item><title><![CDATA[Autonomous Agents in Space Logistics and In-Space Manufacturing]]></title><description><![CDATA[I haven&#8217;t written about space for too long a time.]]></description><link>https://jdsemrau.substack.com/p/autonomous-agents-in-space-logistics</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/autonomous-agents-in-space-logistics</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 30 Mar 2026 11:07:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!WFU-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958dd887-334f-4d2c-b6ce-36362b335565_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It's been too long since I've written about space.</p><p>Now that <a href="https://grokipedia.com/page/Artemis_program">Artemis 2</a> is launching to the moon in just a (likely) couple of hours, I figured it might be a good idea to talk about Autonomous Agents and ISAM <a href="https://jdsemrau.substack.com/p/isam-in-space-servicing-assembly">again</a>. </p><p>I believe, and hope that I am right, that we are just at the cusp of a civilizational upgrade. </p><p>And in my opinion, AI in general and autonomous &#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/autonomous-agents-in-space-logistics">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Absurd Effectiveness of Skills.md]]></title><description><![CDATA[this essay explores how we truly learn, by doing, and why that insight matters for the future of AI and knowledge work. As the shift from search engines to answer engines accelerates, a new paradigm emerges: cowork engines powered by &#8220;skills.&#8221; These structured, procedural workflows transform AI from passive responder to active collaborator. Using real-world examples like evolving developer tools, the piece argues that skills enable process stability, context efficiency, and organizational memory, turning AI systems into reliable operators rather than inconsistent assistants. In an era of SaaS disruption and agentic AI, the competitive edge lies not in models alone, but in codified expertise. Skills are the missing layer that bridge reasoning and execution, making AI systems scalable, disciplined, and truly useful.]]></description><link>https://jdsemrau.substack.com/p/the-absurd-effectiveness-of-skillsmd</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/the-absurd-effectiveness-of-skillsmd</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 23 Mar 2026 03:07:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!IqSc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e6195af-e40f-4cce-b796-2831f40c5cb9_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>&#8220;For the things we have to learn before we can do them, we learn by doing them&#8230; we become just by doing just acts, temperate by doing temperate acts, brave by doing brave acts.&#8221;</p></blockquote><p>(<em><a href="https://classics.mit.edu/Aristotle/nicomachaen.2.ii.html">Nicomachean Ethics</a></em><a href="https://classics.mit.edu/Aristotle/nicomachaen.2.ii.html">, Book II</a>)</p><p>It was a cold, bright morning in March, and the clocks were striking seven when the first sunlights of a new dawn woke me up after a sleepless night &#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/the-absurd-effectiveness-of-skillsmd">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Pair-programming Superbill with Codex-5.2 and Claude Sonnet 4.6]]></title><description><![CDATA[The Value of Software Development Is (near) Zero]]></description><link>https://jdsemrau.substack.com/p/pair-programming-superbill-with-codex</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/pair-programming-superbill-with-codex</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 02 Mar 2026 06:53:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!LLY-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3320b3a1-c721-4dda-bb1a-8ff69e7d1b7c_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Let me start by saying something that might be seen as provocative.</p><p>What if the value of writing software has collapsed to zero?</p><p>Not the value of software or SaaS companies. Their death might be greatly exaggerated. They still remain with enormous profit margins and multi-year enterprise contracts. </p><p>But the act of writing it manually might very well be.</p><p>Som&#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/pair-programming-superbill-with-codex">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[OpenClaw - An Agentic Ambient Intelligence Layer]]></title><description><![CDATA[Building the endgame for a non-human digital space]]></description><link>https://jdsemrau.substack.com/p/openclaw-an-agentic-ambient-intelligence</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/openclaw-an-agentic-ambient-intelligence</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Sun, 08 Feb 2026 04:10:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!7Mok!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fafad59-a4db-4bb9-a991-ef6cf7ec3de2_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There has been much frenzied chatter in the agent community about Moltbot / OpenClaw since it was launched a couple of days ago. Only recently being renamed to its final iteration, OpenClaw might be the closest thing we currently have to an agentic front page for the internet. But that in itself is only scratching the surface of what it can do.</p><p>If you wa&#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/openclaw-an-agentic-ambient-intelligence">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Ambition in Agent Systems]]></title><description><![CDATA[Governing ambition with OWASP LLM on Langfuse]]></description><link>https://jdsemrau.substack.com/p/governing-ambition-with-owasp-llm</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/governing-ambition-with-owasp-llm</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Sun, 18 Jan 2026 11:08:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pkyX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc948f588-4ebc-46b8-ab65-8512d7a85cc4_1344x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>&#8220;Joe ain&#8217;t vicious, you understand. He ain&#8217;t like one of these ambitious robots you read about that make up their minds the human race is inefficient and has got to be wiped out an&#8217; replaced by thinkin&#8217; machines. Joe&#8217;s got ambition. If you were a machine, you&#8217;d wanna work right, wouldn&#8217;t you? That&#8217;s Joe. He want to work right. An&#8217; he&#8217;s a logic. An&#8217; logi&#8230;</p></blockquote>
      <p>
          <a href="https://jdsemrau.substack.com/p/governing-ambition-with-owasp-llm">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Conditional Diffusion for Portfolio Management]]></title><description><![CDATA[Diffusion models are a class of probabilistic generative models that learn the dynamics of complex systems by modeling how structured data can be progressively transformed into noise and then reconstructed through a controlled reverse process.]]></description><link>https://jdsemrau.substack.com/p/conditional-diffusion-for-portfolio-management</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/conditional-diffusion-for-portfolio-management</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Thu, 08 Jan 2026 11:08:31 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!P-rp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0998b2a-ee9b-4fd7-a6d2-063f890e5f08_1152x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Happy New Year! I hope you had a great start into 2026. In today&#8217;s post, I will be discussing how an army of cognitive financial agents using conditional diffusion models can perform work in portfolio management. Diffusion models are a class of probabilistic generative models that learn the dynamics of complex systems by modeling how structured data can&#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/conditional-diffusion-for-portfolio-management">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Discovering APIs with Knowledge Graphs]]></title><description><![CDATA[How semantic graphs let agents pick the right finance API]]></description><link>https://jdsemrau.substack.com/p/discovering-apis-with-knowledge-graphs</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/discovering-apis-with-knowledge-graphs</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 01 Dec 2025 12:37:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!vgoH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da6a8c8-b660-4c3e-a6c5-b4a5a2938d8e_1344x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A key challenge when equipping agents with a large number of tools is that the agent often cannot reliably determine <em>which</em> tool to choose, especially when the tool set is large. Protocol&#8209;based layers such as Model Context Protocol (MCP) attempt to standardize tool access, but even for them, there is a natural limit. It&#8217;s less than 50.</p><p>In enterprise setti&#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/discovering-apis-with-knowledge-graphs">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How should Agentic User Experience Work?]]></title><description><![CDATA[Future of Work with OpenAI Atlas, Perplexity Alpha, Claude Skills, and News Explainer]]></description><link>https://jdsemrau.substack.com/p/how-should-agentic-user-experience</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/how-should-agentic-user-experience</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 27 Oct 2025 12:37:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!F_-k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0351a5f6-f32c-456a-aa9d-ff7d508ad1b0_1344x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It always fascinated me how LaForge in Star Trek: TNG could easily recalibrate the Warp Drive using only a selection of standard interfaces, a highly efficient &#8220;<em>computer</em>&#8217;, and a small selection of hand tools. Considering where we are in our current timeline, what if he worked with hyper-efficient AI agents (<a href="https://memory-alpha.fandom.com/wiki/Nanite">nanites 3.0</a>) to support him in his work? </p><p>When &#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/how-should-agentic-user-experience">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Software That Builds Itself]]></title><description><![CDATA[Code as Interfaces. AI Agents transform the Software Development Life Cycle.]]></description><link>https://jdsemrau.substack.com/p/software-that-builds-itself</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/software-that-builds-itself</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Wed, 08 Oct 2025 11:37:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!FuFr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have built a lot of software in my life. </p><p>Some of it more successfully. Some less so. Some of my work was just my own, but some was deployed across several countries in multi-hundred-billion-dollar businesses. </p><p>Over the last weeks and months, gradually but surely, code-generating agents have entered my software life cycle. And I think that once I have fully autonomous agents that act, negotiate, and collaborate through code and APIs, they, again, will bring my work to a whole new level by fundamentally transforming both the speed and quality of my Software Development Life Cycle. </p><p>But not by any means. </p><p>In this post, I aim to give you an overview of my thoughts on some hopefully interesting findings to demonstrate how Agentic AI solutions automate, optimize, and reshape each SDLC stage, and how the paradigm of &#8220;code as interface&#8221; that I wrote before will already enable highly effective agent-to-agent workflows.</p><p>Please like, share, subscribe. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><h4>Introduction</h4><p>If you are building software just for yourself, then obviously, a lot of the steps  in the software development life cycle are done by yourself. In larger organizations, however, these steps are usually distributed across a large number of people covering a mix of in-house and external resources.  </p><p>I won&#8217;t explain the different stages; I think the chart and source article do that reasonably well. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oISo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oISo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 424w, https://substackcdn.com/image/fetch/$s_!oISo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 848w, https://substackcdn.com/image/fetch/$s_!oISo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 1272w, https://substackcdn.com/image/fetch/$s_!oISo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oISo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png" width="925" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:925,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oISo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 424w, https://substackcdn.com/image/fetch/$s_!oISo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 848w, https://substackcdn.com/image/fetch/$s_!oISo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 1272w, https://substackcdn.com/image/fetch/$s_!oISo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68fd4a0d-421c-408d-bb20-de8983f8967f_925x500.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h6><a href="https://medium.productcoalition.com/a-comprehensive-guide-to-the-software-development-life-cycle-sdlc-15b7892e1d44">source</a></h6><p>That said, I have formed the opinion that the complexity and dynamism of modern software delivery will benefit greatly from agentic AI. At least my workflow demands more than incremental automation; it requires a system that can reason which code segments to pick, plan how to adjust them, write test cases (unit-tests, SITs, etc), and then act with minimal human intervention, only changing the pieces that would be affected by the change and iterate on error logs. </p><p>Classical automation doesn&#8217;t cut it anymore. </p><p>Across all steps of the software development, this will influence all steps that rely on automation, like rule-based scripts and CI/CD pipelines that break down in the face of changing requirements, unforeseen dependencies, or the need for continuous adaptation. </p><p>Thus, agentic AI, by acting as a persistent collaborator (Microsoft calls it CoPilot) that communicates via code and machine-readable protocols, introduces the necessary flexibility, resilience, and intelligence for next-generation software engineering.</p><p>But how exactly will that work? </p><p>Here are some of my ideas. </p><p>Requirements engineering has traditionally posed a bottleneck for SDLC efficiency and accuracy. Business people sit together quabbling around how the software should work, but don&#8217;t understand how their ideas fit into the system. If they lack imagination or experience, they miscommunicate intentions and ambiguous specifications, which then frequently lead to costly rewrites. </p><p>But that is the past.</p><h4>Requirements Engineering: Autonomous Clarification and Enrichment </h4><p>Agents should be good enough to now parse natural language stakeholder input like meeting minutes, include legacy documentation (as long as it&#8217;s in digital form), and other documentation like policy requirements reliably to derive actionable software requirements. This helps to properly contextualize and refine requirements. I noticed that it helps if my agent proactively queries back to me to clarify a misunderstanding or patch a missing detail. The biggest impact I see here is that now specs are becoming even more living design documents that are constantly updated as information evolves, ensuring alignment from project inception. This means that the boundaries between living specs and agent context blur, but that also it will be incredibly difficult to control the document, and by extension the context, so it doesn&#8217;t go completely off the rails. </p><p>This problem is amplified by platforms that convert mixed human prompts, living specs, and data artifacts into structured, testable user stories and technical requirements.  The solution here is that we need to maintain a clear goal document, maybe in the form of an agents.md file. </p><p>Manus&#8217;s engineering team has a <a href="https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus">great write-up</a>. </p><h4>Design and Architecture: Automated Blueprints</h4><p>Design is the creative and technical nucleus of modern software, encompassing everything from system architecture to API definitions. Yet, increasingly, automated systems are generating and refining these blueprints in real time, turning design into a dynamic, adaptive process. Examples are GitHub&#8217;s <a href="https://github.com/features/copilot/">Copilot</a> or AWS <a href="https://aws.amazon.com/well-architected-tool/">Well-Architected </a>Tool. I think this shift enables architectures that evolve alongside product requirements, rather than being locked into static early-stage decisions.</p><p>So what does agentic AI bring to the discussion?</p><p>Agentic AI can independently propose architecture patterns, leveraging patterns from large-scale code corpora, industrial best practices, and regulatory requirements. It can also generate, on demand, up-to-date UML diagrams, sequence flows, and modular blueprints from requirements. And it might suggest distributed designs optimized for scalability, security, or compliance&#8212;all grounded in domain-specific contextual understanding.</p><p>Such agents would then not only accelerate the design phase, but they also proactively identify design risks and present alternative architectures for review. In my mind, the iterative process remains, though, as feedback between design agents and human teams allows for faster convergence on robust system blueprints.</p><p>While requirements gathering and design phases will increase in importance and time spent, actual implementation time should decrease, driven by coding agents like Claude Code or OpenAI&#8217;s Codex. </p><h4>Implementation: Autonomous Coding, Refactoring, and Optimization</h4><p>Implementation is still the core task, though.  The core of Agentic AI&#8217;s change is, in my opinion, not entirely limited to autonomous code generation and maintenance. Earlier code-generation tools that simply scaffolded boilerplate, modern development agents have been doing this for a long time already. </p><p>I think the benefit of implementation is also in turning requirements and blueprints directly into code, selecting appropriate frameworks, libraries, and architectural paradigms. Then to write features and full modules with integrated documentation and inline test suites. And finally, being able to refactor legacy code (and that is a moving target) for maintainability, migrate APIs, and address code smells without manual prompting.</p><p>In multi-agent scenarios, specialized performance agents may further scrutinize and optimize database queries, server configurations, and application bottlenecks, traditionally tasks left for more specialized engineers and time-constrained performance reviews.</p><h4>Testing: Unsupervised Assurance and Remediation</h4><p>I never met a person who likes bug-testing. Yet the more the upstream pipeline of the SDLC is automated, the more we rely on proper testing to ensure that the features we have implemented do not wreck the entire code base and we generate a technical debt or, even more importantly, a security hole we can&#8217;t close. What is needed here are, in my opinion, unsupervised verification (in the mathematical sense), and structured and well-defined software testing policies that can be executed well by AI Agents, leading to a more effective quality assurance. </p><p>So, instead of relying solely on manually designed tests, these agents generate comprehensive unit, integration, and vulnerability tests for both new and legacy code. They independently run simulations, load tests, and security scans to uncover hidden edge cases and vulnerabilities long before deployment. When tests fail, repair agents attempt automated bug fixes and remediation, dramatically reducing backlog churn and time-to-resolution. This closes the feedback loop: once a defect is surfaced, it is immediately analyzed, repaired, and re-tested in a continuous cycle until resolved or escalated.</p><p>That does mean we are ushering in an era of self-correcting systems. </p><p>Quite an interesting proposition, and brings up the question of what constitutes a bug. </p><p>The new software begins its life with deployment. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r1ES!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r1ES!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 424w, https://substackcdn.com/image/fetch/$s_!r1ES!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 848w, https://substackcdn.com/image/fetch/$s_!r1ES!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 1272w, https://substackcdn.com/image/fetch/$s_!r1ES!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r1ES!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png" width="1456" height="472" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:472,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:330544,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/175367493?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r1ES!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 424w, https://substackcdn.com/image/fetch/$s_!r1ES!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 848w, https://substackcdn.com/image/fetch/$s_!r1ES!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 1272w, https://substackcdn.com/image/fetch/$s_!r1ES!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0399b9a-ee95-4e57-b28f-09e15f086390_2042x662.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Deployment and Maintenance: Autonomous Orchestration</h4><p>Already now, tools like <a href="https://www.jenkins.io/">Jenkins</a> allow for efficient CI/CD. Post-development, Agentic AI systems would enable continuous and adaptive deployment and maintenance without manual oversight. Here, maybe specialized agents that provision infrastructure (<a href="https://developer.hashicorp.com/terraform">platform as a service</a>), manage cloud deployments and optimize costs, orchestrate containers, and configure environments autonomously could be value drivers. When anomalies occur, self-healing capabilities may detect, diagnose, and remediate incidents, sometimes reverting systems to stable states in seconds. Proactive monitoring agents correlate metrics and detect early warning signals, proposing long-term system improvements and optimizations. </p><p>The outcome could be near-zero downtime, leading to greater operational resilience and the ability to dynamically scale system resources in real time, aligning performance with demand. While that sounds like overkill, think what this means for robotics. </p><p>One bottleneck between the steps of the SDLC is media breaks. Interfaces from requirements to design and from design to implementation, and so forth, are not that straightforward to automate. </p><p>What if these interfaces are also code?</p><h4>Code as Interface: The Architecture of Multi-Agent Collaboration</h4><p>One of the most profound shifts I see when entering the agentic era is the adoption of code as the primary interface. Instead of exchanging vague instructions in natural language, AI agents communicate through well-defined code artifacts, such as standardized scripts, protocol messages, and serialized code objects. Using negotiation and delegation protocols such as Smolagents, Google&#8217;s <strong>Agent2Agent (<a href="https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/">A2A</a>),</strong> or <strong><a href="https://github.com/ag-ui-protocol/ag-ui">AG-UI</a></strong>, they then could dynamically coordinate responsibilities, clarify intents, and divide labor across distributed systems. In my opinion, this transforms the Software Development Life Cycle into a multi-agent ecosystem where each agent understands and builds upon the work of others. The result would pave the trail towards true autonomy &#8594; agents can evolve codebases continuously, combined with security and traceability, as every transaction is logged and auditable. </p><p>This model then also ensures seamless interoperability across human engineers, vendor systems, and in-house automation frameworks. </p><p>The key problem here is then &#8220;<em>reduced</em>&#8221; to orchestration.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sdl_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sdl_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 424w, https://substackcdn.com/image/fetch/$s_!sdl_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 848w, https://substackcdn.com/image/fetch/$s_!sdl_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 1272w, https://substackcdn.com/image/fetch/$s_!sdl_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sdl_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png" width="1420" height="1082" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1082,&quot;width&quot;:1420,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:439914,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/175367493?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sdl_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 424w, https://substackcdn.com/image/fetch/$s_!sdl_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 848w, https://substackcdn.com/image/fetch/$s_!sdl_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 1272w, https://substackcdn.com/image/fetch/$s_!sdl_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5071735e-6e45-43f7-bb39-ac9c28c14ee0_1420x1082.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And I plan to be writing about OpenAI&#8217;s Agentkit, Power Automate, and N8N rather sooner than later.</p><p>However, the key showstopper is still:</p><h4>Compliance, Security, and Auditability</h4><p>As SDLC processes increase in autonomy, oversight, and governance have to take center stage. </p><p>Every agent interaction needs to be logged, auditable, and designed for compliance with stringent industry standards. Security-focused agents continuously monitor for policy violations, anomalous behavior, or non-compliant actions, intervening and documenting their actions in real time. This embedded auditability ensures that agentic systems meet regulatory frameworks such as <strong>GDPR</strong>, <strong>SOX</strong>, and <strong>HIPAA</strong>, making them viable even in highly regulated industries. By merging intelligence with transparency, these systems bring both innovation and accountability to the core of software operations.</p><h4>In Closing</h4><p>The adoption of agentic AI redefines both organizational dynamics and the developer role itself. Developers evolve from coders into supervisors, validators, and collaborators&#8212;guiding digital teammates rather than micromanaging syntax. Organizations benefit from accelerated delivery cycles, shorter release cadences, and fewer manual handoffs across the SDLC. The result is higher-quality software, fewer post-deployment incidents, and systems that continuously adapt to changing requirements, regulations, and market forces. Agentic AI thus doesn&#8217;t just optimize how software is built&#8212;it transforms who builds it, turning software development into a collaborative dialogue between humans and machines.</p><p>Agentic AI has moved beyond theoretical promise to demonstrable value across every SDLC phase. By automating task orchestration, enforcing rigorous testing and remediation, and enabling code-native, protocol-driven collaboration, Agentic AI fundamentally reshapes both the productivity and resilience of software delivery.</p><p>The rise of code as interface means that agents can now negotiate, delegate, and iterate as code-aware collaborators&#8212;a leap forward that promises massive efficiency gains, greater innovation, and secure, compliant software systems that evolve as rapidly as the markets they serve.</p><p>As multi-agent protocols mature and adoption grows, Agentic AI will shift the role of human developers and architects toward higher-order strategic and creative tasks, heralding a new era of intelligent, adaptive, and scalable software development.</p><p><strong>References:</strong></p><ul><li><p>Zencoder.ai: <a href="https://zencoder.ai/blog/agentic-ai-for-full-cycle-software-development-the-ctos-guide">Agentic AI for Full-Cycle Software Development</a></p></li><li><p>AG-UI: <a href="https://docs.ag-ui.com/introduction">the Agent-User Interaction Protocol</a></p></li><li><p>Practical AI Agent Examples (<a href="https://blog.n8n.io/ai-agents-examples/">n8n</a>)</p></li><li><p>Google: Announcing the Agent2Agent Protocol (<a href="https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/">A2A</a>)</p></li><li><p>Agent Protocol (<a href="https://github.com/agi-inc/agent-protocol">agi-inc</a>)</p></li><li><p><a href="https://www.dhiwise.com/post/agentic-ai-for-software-development">DhiWise</a>: Agentic AI Applications in Modern Software Development</p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Encyclopedia Autonomica is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FuFr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FuFr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FuFr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FuFr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FuFr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FuFr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1795821,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/175367493?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FuFr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FuFr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FuFr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FuFr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F884aa1df-c008-478c-bc8b-7c49b2416e4a_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p>]]></content:encoded></item><item><title><![CDATA[On Retrieving Relevant Information ]]></title><description><![CDATA[Strategies for better knowledge mining: From simple Documents to Agentic RAG and what lies ahead.]]></description><link>https://jdsemrau.substack.com/p/on-retrieving-data</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/on-retrieving-data</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 29 Sep 2025 11:37:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bpwK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26867e9e-b4b2-4d3a-8315-78d542346c66_960x540.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have never been quite satisfied with Retrieval-Augmented Generation (RAG).  There is always this lingering doubt in the back of your head that some important detail might have slipped through the chunks. For example, you might read a research paper, but your &#8220;<em>&#949;&#8021;&#961;&#951;&#954;&#945;</em>&#8221; moment might be completely different than mine. Personalized context, as extracted fr&#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/on-retrieving-data">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Modular Financial Agent Systems (II)]]></title><description><![CDATA[Engineering Automated Coordination Cognitive Financial Architectures]]></description><link>https://jdsemrau.substack.com/p/modular-financial-agent-systems-ii</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/modular-financial-agent-systems-ii</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 22 Sep 2025 11:51:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!F77x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019b5357-5b7f-451e-85df-e9c256fcecf8_1344x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Continuing from <a href="https://jdsemrau.substack.com/p/modular-financial-agent-systems-i">Post 1 </a>in my series on modular financial agent systems, I finally found time to work on the second part of the series. Maybe some personal announcement first. Over the last 4 weeks, I have been in Europe advising on Agentic AI for some of the top Banks in the world. Since this kept me really busy, my posts have been tardy, and I apologiz&#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/modular-financial-agent-systems-ii">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Ultimate Guide to Visual Language Action Models (VLAM)]]></title><description><![CDATA[Can AI truly understand the physical world? Physical Reasoning from Video.]]></description><link>https://jdsemrau.substack.com/p/visual-language-action-models</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/visual-language-action-models</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 08 Sep 2025 11:37:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mWVa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9814cd25-3e26-41a6-afb8-15165010cb44_1280x680.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>For the last quarter of a century, we have developed AI solutions for low-risk environments like recommendation engines, content moderation, or ad-targeting. These systems perform well in constrained digital environments, where errors remain contained and carry minimal cost. Deploying in the physical world is substantially more complex, as mistakes propagate into real systems, producing safety, reliability, and operational risks. And if we want to conquer space and the ocean floor, we need to develop this capability for all of humanity. </p><p>Recently, we have seen physical AI models misbehaving when interacting with the real world. </p><ol><li><p>Industrial Humanoid Robot (Unitree H1) <a href="http://google.com/search?q=Unitree+H1)+Goes+Berserk&amp;oq=Unitree+H1)+Goes+Berserk&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIICAEQABgWGB4yCAgCEAAYFhgeMggIAxAAGBYYHjIICAQQABgWGB4yDQgFEAAYhgMYgAQYigUyDQgGEAAYhgMYgAQYigUyDQgHEAAYhgMYgAQYigUyDQgIEAAYhgMYgAQYigUyDQgJEAAYhgMYgAQYigXSAQc2MzJqMGo3qAIAsAIA&amp;sourceid=chrome&amp;ie=UTF-8">Goes Berserk</a> During Testing in China</p></li><li><p>Tesla&#8217;s Robotaxi <a href="https://www.chron.com/culture/article/texas-tesla-robotaxis-austin-20373907.php">Going Rogue </a>in Austin.</p></li><li><p>The US Navy&#8217;s Autonomous Drone program <a href="https://hmintelligence.org/navys-autonomous-drone-fleet-faces-setbacks/">faces setbacks</a>.</p></li></ol><p>As companies like Pony.ai <a href="https://www.prnewswire.co.uk/news-releases/ponyai-mowasalat-karwa-partner-to-launch-autonomous-driving-pilot-in-qatars-doha-302547646.html">expand</a> around the world, and new entrants like <a href="https://www.automotivedive.com/news/tensor-unveils-personal-robocar-robotaxi-vinfast-level4-autonomous-ai/758015/">Tensor</a> Auto start building robot-taxis, the stakes are only ever increasing. The challenge these companies face, teaching artificial intelligence human-like real-world intuition, has long been a barrier in developing and especially scaling robotics and autonomous systems. Training robots has suffered from an inability to generalize for a very long time. And while there has been some progress (<a href="https://jdsemrau.substack.com/p/toyota-ri-lbm-is-for-robot-generalization">TRI</a>, <a href="https://jdsemrau.substack.com/p/x-is-for-deepminds-open-x-embodiment">X-Embodiments</a>), replicating the nuanced understanding we humans have of physical interactions, <a href="https://jdsemrau.substack.com/p/the-importance-of-object-permanence">object permanence</a>, gravity, or friction, remains unmatched.</p><p>But this might all change now. Because NVIDIA&#8217;s Cosmos <a href="https://huggingface.co/nvidia/Cosmos-Reason1-7B">Reason1-7B</a> just topped Huggingface&#8217;s <a href="https://developer.nvidia.com/blog/maximize-robotics-performance-by-post-training-nvidia-cosmos-reason/#:~:text=Cosmos%20Reason%20has%20topped%20Physical,special%20translator%20called%20a%20projector.">physical reasoning leaderboard</a>. Benchmark scores confirm a strong performance: An average score of 65.7 across key robotics and autonomous vehicle tasks. Although we should consume such benchmarks with a pinch of salt.</p><p>Let&#8217;s dive into the fantastic world of Vision-Language-Action models.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/subscribe?"><span>Subscribe now</span></a></p><h4>Table of Contents</h4><ol><li><p>Architectures of Physical AI</p></li><li><p>Challenges of Physical AI</p></li><li><p>Visual Language Action Models in general</p></li><li><p>NVIDIA&#8217;s Cosmos World Foundation Model (WFM)</p></li><li><p>NVIDIA&#8217;s Cosmos-Reason1,</p></li><li><p>Meta&#8217;s Vision Language World Model,</p></li><li><p>Wayvve&#8217;s Lingo-2, and </p></li><li><p>EO Robotics EmbodiedOneVision</p></li></ol><h4>Architectures of Physical AI</h4><p>It&#8217;s nothing new that by now, large language models are really good at processing text. Some even display impressive multi-modal processing capabilities. I.e., you can upload an image into ChatGPT and it will actually &#8220;<em>understand</em>&#8221; it. </p><p>But that does not mean that these models are capable of translating words into physical actions. A more sophisticated architecture is needed for this. </p><p>So, before we dive into VLA models, I will outline more explicitly how the architecture for building Physical AI systems works and what challenges this brings along with it. Then I will dive into the most recent models and papers published. </p><p>We begin, similar to my traditional autonomous agents definition, with sensors.</p><h5><strong>Sensor Layer</strong></h5><p>Sensors form the foundation of this architecture as Physical AI relies on multiple sensor modalities to gather comprehensive environmental data. Multiple cameras provide visual information for object recognition and scene understanding from different angles. Although Tesla got rid of them, I still believe in Radar and LIDAR. Radar offers reliable distance and velocity measurements in various weather conditions, while LiDAR generates 3D point clouds for spatial mapping. Other sensors include GPS provides global positioning data, inertial measurement units, or ultrasonic sensors. This multi-sensor approach unlocks redundancy and delivers robustness in data collection</p><h5><strong>Perception layer</strong></h5><p>In the perception layer, the raw sensor data is processed into meaningful interpretations of the driving environment using specialized perception models and sensor fusion algorithms. </p><p>In traditional autonomous systems, we may deploy the following standard models:</p><p><strong>Specialized perception models</strong> are task-specific algorithms where lane detection uses techniques like Hough transforms or deep learning to identify road boundaries and lane markings, traffic light detection employs convolutional neural networks to recognize signal states and timing, and traffic sign detection interprets regulatory and warning signs through trained classification models. Object detection &amp; tracking identifies and monitors vehicles, pedestrians, and obstacles using models like YOLO or R-CNN variants, providing real-time recognition capabilities. Free space detection determines drivable areas through semantic segmentation or point cloud processing algorithms. </p><p><strong>Sensor fusion models</strong> like Kalman filters and <a href="https://jdsemrau.substack.com/p/cognitive-reasoning-agents-and-the">Extended Information filters</a> combine a variety of sensor data with high-density maps to precisely determine the vehicle's position within the mapped environment, creating a more robust understanding than any single sensor could provide alone.</p><h5><strong>Planning layer</strong></h5><p>But autonomous driving is not only about understanding the &#8220;<em>now</em>&#8221;. Using the interpreted environmental data, we still need to know where we are going. </p><p>Thus, </p><ul><li><p><strong>Route planning </strong>for determining the optimal path to the destination. </p></li><li><p><strong>Prediction algorithms</strong> for forecasting of the future behavior of other road users. </p></li><li><p><strong>Behavior planning</strong> for deciding high-level maneuvers like lane changes or turns. </p><p>and finally</p></li><li><p><strong>Trajectory planning</strong> for calculating the specific path and speed profile the vehicle should follow, considering safety constraints and traffic rules.</p></li></ul><p>And especially, trajectory planning is where VLAMs shine. But I am getting ahead of myself. </p><h5><strong>Control Layer</strong></h5><p>The fourth and final stage translates planned trajectories into actual vehicle motion. PID controllers manage basic control loops for steering, throttle, and braking. Model predictive control provides more sophisticated control algorithms that anticipate future states. Other control systems may include stability control, traction management, or specialized actuator control systems that physically execute the planned maneuvers through the vehicle's mechanical systems.</p><h4>Challenges of Physical AI</h4><p>We don&#8217;t have easily scalable and trainable autonomous vehicles yet. Just an observation. We humans are incredibly good at judging driving situations we have not encountered yet. But that is also a function of age. There is a reason why we don&#8217;t let kids drive (besides their obvious height constraints).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F7cd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F7cd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!F7cd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!F7cd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!F7cd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!F7cd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2572140,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!F7cd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!F7cd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!F7cd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!F7cd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594ecc95-f242-45ce-9143-12e250d7861a_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>Problem 1: Edge cases are incredibly valuable. </h5><p>Data on edge cases is incredibly difficult and expensive to acquire. The more rare the event, the more likely it is that the system might misbehave and cause physical harm. And as we can see with the fleet of Google Street Map cars, physical data is costly to collect, curate, and label.</p><h5>Problem 2: The real world is a spatial and temporal environment bound by the laws of physics.</h5><p>Spatial data is also a hard problem because the environment in a spatial 3D environment has objects have different shapes, sizes, and distances, while the car&#8217;s sensors might perceive them in 2D as the same. They also have to comply with basic rules of physics. Reconciling multi-camera input makes this also more complex. And then a lot of what we observe is constantly moving. Either as we pass along houses or factory floors. Or they move themselves, like pedestrians, vehicles, or drones. Therefore, decisions can&#8217;t be just about &#8220;where things are now&#8221; but &#8220;where they will be in the next second, 5 seconds, or 30 seconds.&#8221; On top, prediction errors compound quickly, making safe planning even more difficult.</p><h5>Problem 3: Output modality needs to be incredibly accurate.</h5><p>Even when perception and predictions are accurate in a volatile environment, the system must translate that understanding into actions. I.e., steering, braking, accelerating, grasping, or rerouting, each with different latency, precision, and safety requirements. The importance of high-quality output modality is as critical as getting the input right.</p><h5>Problem 4: Trust &amp; explainability in decision-making.</h5><p>Humans can explain their decisions with natural language. But to have one human describe the actions of another human leads to no trust in the explanation. There is a reason my moderators at sports events are largely for entertainment. This is known as the back-seat driver problem: when one agent tries to explain the decisions of another, the explanation rarely inspires trust. </p><p>Btw., this also outlines the importance of agency in agentic decision making.</p><h4>Visual Language Action Models</h4><p>Visual Language Action Models (VLAMs) are AI systems that integrate visual perception, natural language understanding, and action planning to enable agents to interpret their environment, follow language instructions, and perform corresponding actions. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-9ZE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-9ZE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 424w, https://substackcdn.com/image/fetch/$s_!-9ZE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 848w, https://substackcdn.com/image/fetch/$s_!-9ZE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 1272w, https://substackcdn.com/image/fetch/$s_!-9ZE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-9ZE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png" width="1456" height="1272" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1272,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:711315,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-9ZE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 424w, https://substackcdn.com/image/fetch/$s_!-9ZE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 848w, https://substackcdn.com/image/fetch/$s_!-9ZE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 1272w, https://substackcdn.com/image/fetch/$s_!-9ZE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b572371-7d5d-4709-8e0d-98adddc5893a_1666x1456.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The benefit of integrating VLAMs into physical AI architectures is that it allows the system to not only perceive its environment but also interpret complex scenarios, make contextual decisions, and potentially communicate its intentions&#8212;capabilities that mirror human-like driving behavior. Cosmos can generate photorealistic, physically based, synthetic data. </p><p>Traditional autonomous systems have relied on sensor fusion and rule-based decision-making. The use-cases for VLAM are different:</p><ol><li><p><strong>Data curation &amp; annotation:</strong> To reduce cost and increase quality, we need to automate high-quality dataset curation and annotation. VLAMs can interpret raw multimodal inputs, generate candidate labels, and validate them against schema constraints, reducing reliance on manual annotation.</p></li><li><p><strong>Robot planning &amp; reasoning:</strong> Planning and reasoning can guide deliberate, methodical decision-making with vision language action (VLA) models. VLAMs unify perception and instruction-following to translate natural language goals into structured action plans that remain robust under real-world uncertainty.</p></li><li><p><strong>Video analytics AI agents:</strong> Extract actionable insights and perform root-cause analysis on massive video datasets. VLAMs integrate visual understanding with temporal reasoning and language-based explanation, enabling both anomaly detection and human-readable causal narratives.</p></li></ol><p>The advancement here lies in the system's ability to understand nuanced real-world situations through language, with the goal of improving how vehicles handle unpredictable real-world conditions. For the transportation &amp; logistics industry, this will be a revolution. But for us normal mortals, it means safer and more reliable autonomous vehicles. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://jdsemrau.substack.com/p/visual-language-action-models?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://jdsemrau.substack.com/p/visual-language-action-models?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><p>We begin with:</p><h4>NVIDIA&#8217;s Cosmos World Foundation Model (WFM)</h4><p>A couple of months ago, right after CES, I already touched on NVIDIA&#8217;s Cosmos World Foundation Model (<a href="https://jdsemrau.substack.com/p/nvidias-jensen-huang-on-agentic-ai">WFM</a>). I hold the belief that synthetic <a href="https://jdsemrau.substack.com/p/paper-review-beyond-a-better-planning">trajectory data</a> is an important step towards the generalization of autonomous movement. WFM builds on this concept by establishing a pre-trained (&#8220;vanilla&#8221;) model, not unlike traditional LLMs, trained on Internet-scale datasets providing broad time-frozen knowledge across many environments and tasks. However, to perform well in a <em>specific</em> real-world application, such as accurately guiding a robot on a factory floor or safely navigating an autonomous vehicle through traffic, general capability is not good enough. We must fine-tune them in post-training on a smaller, targeted dataset collected from their particular environments. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3gOG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3gOG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 424w, https://substackcdn.com/image/fetch/$s_!3gOG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 848w, https://substackcdn.com/image/fetch/$s_!3gOG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!3gOG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3gOG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png" width="1456" height="798" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:798,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:221501,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3gOG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 424w, https://substackcdn.com/image/fetch/$s_!3gOG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 848w, https://substackcdn.com/image/fetch/$s_!3gOG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!3gOG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e13eda0-03e8-4a20-b01e-c889c9d0d697_1934x1060.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This process produces a post-trained, specialized WFM: a model that retains the broad capabilities of its foundation training while being adapted to go deep into a specific Physical AI use-case. WMF in its current (Fall 2025) iteration has evolved into a suite of open, physics-aware generative AI models, including diffusion and autoregressive transformer architectures, designed to simulate and predict future states of virtual environments (via video) from inputs like text, images, or past frames.</p><p>These language models may also augment vehicle-to-infrastructure communication, enabling more efficient traffic management and coordinated mobility systems.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!orA7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!orA7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 424w, https://substackcdn.com/image/fetch/$s_!orA7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 848w, https://substackcdn.com/image/fetch/$s_!orA7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 1272w, https://substackcdn.com/image/fetch/$s_!orA7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!orA7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png" width="1456" height="430" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:430,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!orA7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 424w, https://substackcdn.com/image/fetch/$s_!orA7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 848w, https://substackcdn.com/image/fetch/$s_!orA7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 1272w, https://substackcdn.com/image/fetch/$s_!orA7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4462631d-70a4-4514-813f-6a4586d954fa_1958x578.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Within WMF, there are specialized models. Cosmos-Reason1 is one of them.</p><h4>Cosmos-Reason1: From Physical Common Sense To Embodied Reasoning</h4><p>NVIDIA's <a href="https://huggingface.co/nvidia/Cosmos-Reason1-7B">Cosmos Reason1-7B</a> model aims to be an evolution in the domain of Physical AI through embodied reasoning. Embodied reasoning refers to the ability of an AI or robotic system to ground its reasoning and decision-making in a physical context, using sensory input and interactions with the environment. So, instead of abstract reasoning alone, it integrates perception, action, and feedback to plan and adapt in real-world settings. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r5YA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r5YA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 424w, https://substackcdn.com/image/fetch/$s_!r5YA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 848w, https://substackcdn.com/image/fetch/$s_!r5YA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 1272w, https://substackcdn.com/image/fetch/$s_!r5YA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r5YA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png" width="1456" height="860" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16258118-78d6-43b7-a46f-a3011624e118_1662x982.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:860,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:239641,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!r5YA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 424w, https://substackcdn.com/image/fetch/$s_!r5YA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 848w, https://substackcdn.com/image/fetch/$s_!r5YA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 1272w, https://substackcdn.com/image/fetch/$s_!r5YA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16258118-78d6-43b7-a46f-a3011624e118_1662x982.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Cosmos-Reason1 employs a multimodal decoder-only architecture similar to<a href="https://arxiv.org/abs/2304.08485"> LLaVA</a>, available in two model sizes: Cosmos-Reason1-7B and Cosmos-Reason1-56B. The architecture follows a sequential pipeline where the input video is processed through a vision encoder, then a projector that aligns visual tokens with text embeddings, before being fed into the LLM backbone. The larger 56B model incorporates a hybrid Mamba-MLP-Transformer architecture to improve efficiency in handling long sequences, combining the linear-time complexity benefits of Mamba's selective state space models with Transformer layers for comprehensive long-context modeling.</p><p>On a simple step-by-step workflow basis, Cosmos-Reason1 works like this:</p><ol><li><p>It accepts the video input, </p></li><li><p>It converts video into an understandable format, and then</p></li><li><p>It tries to reason about it through <strong>long chain-of-thought</strong> thinking processes before generating a response in language space.</p></li></ol><p>This response will be returned in natural language and includes both explanatory insights and but also embodied decisions (pose, trajectory, etc). In my opinion, what makes Cosmos Reason1 unique compared with traditional VLMs is its ability to infer and reason using physical common-sense knowledge.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PIki!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PIki!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 424w, https://substackcdn.com/image/fetch/$s_!PIki!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 848w, https://substackcdn.com/image/fetch/$s_!PIki!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 1272w, https://substackcdn.com/image/fetch/$s_!PIki!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PIki!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png" width="1456" height="612" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:612,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126730,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PIki!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 424w, https://substackcdn.com/image/fetch/$s_!PIki!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 848w, https://substackcdn.com/image/fetch/$s_!PIki!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 1272w, https://substackcdn.com/image/fetch/$s_!PIki!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06d7f3f2-87e5-46d5-8baf-c54d557d8561_1670x702.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>So what&#8217;s the magic here?</p><p>Statistical models have no true &#8220;<em>understanding</em>&#8221; of the world they exist in. Humans and animals acquire a physical common sense through passive observation of the world around us. For example, <a href="https://www.sciencedirect.com/science/article/abs/pii/S0010027717301117">infants</a> can understand basic concepts such as <a href="https://jdsemrau.substack.com/p/the-importance-of-object-permanence">object permanence </a>and gravity already in a few months after birth. To develop this understanding computationally, models must be trained on expensive human-annotated datasets that capture object interactions, spatial relationships, and causal dynamics, enabling them to learn predictive patterns about how objects behave in three-dimensional space through labeled examples of physical phenomena. </p><p>However, unlike passive understanding, reasoning in embodied AI must be grounded in action. I.e., reasoning emerges through the coupling of perception and control layers, where the system learns by acting on the environment, observing outcomes, and adjusting its internal models accordingly. </p><p>As the real world is temporal, spatial, and bound by the laws of physics (Problem 2), Reason1&#8217;s &#8220;common sense&#8221; is grounded on an ontology of three main categories. </p><p>As shown in the image below. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s6G0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s6G0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 424w, https://substackcdn.com/image/fetch/$s_!s6G0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 848w, https://substackcdn.com/image/fetch/$s_!s6G0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 1272w, https://substackcdn.com/image/fetch/$s_!s6G0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s6G0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png" width="728" height="386.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:773,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:181335,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!s6G0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 424w, https://substackcdn.com/image/fetch/$s_!s6G0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 848w, https://substackcdn.com/image/fetch/$s_!s6G0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 1272w, https://substackcdn.com/image/fetch/$s_!s6G0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9bc037-5bbc-4f4f-b25e-1a1cd7e9b708_1666x884.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This shall enable the model, and the robots it steers by extension, to not only comprehend what they currently observe but also to plan intelligently ahead. </p><p>But there is more to it. </p><p>Specifically, reasoning in physical space requires the capability to:</p><ul><li><p><strong>Process complex sensory inputs.</strong> Unlike <a href="https://jdsemrau.substack.com/p/grounded-symbolic-reasoning-sense-symbolize-plan-act">symbolic reasoning</a> that relies on clean, structured data, embodied reasoning must parse noisy, partial, and ambiguous multimodal signals to extract reliable patterns for decision-making.</p></li><li><p><strong>Predict action effects.</strong> Every action alters the environment, so embodied reasoning requires an internal model of cause-and-effect. E.g., how objects respond to force, how a robot&#8217;s kinematics interact with terrain, or how vehicle dynamics shift under changing conditions.</p></li><li><p><strong>Respect physical constraints.</strong> Beyond abstract optimization, embodied reasoning must respect real-world physics, inertia, friction, and material limits while producing long-horizon plans that are both safe and efficient in execution.</p></li><li><p><strong>Learn from interaction.</strong> Actions generate feedback loops, and embodied reasoning depends on integrating this feedback to refine policies over time, enabling continuous improvement and dynamic adaptation to changing environments.</p></li></ul><p>Here are some examples from the paper. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NWDK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NWDK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 424w, https://substackcdn.com/image/fetch/$s_!NWDK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 848w, https://substackcdn.com/image/fetch/$s_!NWDK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 1272w, https://substackcdn.com/image/fetch/$s_!NWDK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NWDK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png" width="1456" height="689" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/31255be4-4a81-4207-b281-5007289f3360_1686x798.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:689,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:261364,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!NWDK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 424w, https://substackcdn.com/image/fetch/$s_!NWDK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 848w, https://substackcdn.com/image/fetch/$s_!NWDK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 1272w, https://substackcdn.com/image/fetch/$s_!NWDK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31255be4-4a81-4207-b281-5007289f3360_1686x798.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Cosmos-Reason1 introduces several key innovations for the advancement of physical AI reasoning capabilities. The system establishes hierarchical physical reasoning ontologies that systematically organize capabilities across space, time, and fundamental physics domains, providing a structured framework for understanding and evaluating physical common sense. </p><p>It incorporates self-supervised intuitive physics tasks such as spatial puzzles, arrow-of-time detection, and object permanence testing that are both scalable to generate and verifiable through rule-based rewards. The framework enables cross-embodiment reasoning by applying unified reasoning principles across diverse physical agents, including humans, robotic arms, humanoid robots, and autonomous vehicles. </p><p>And finally, the system features a novel asynchronous reinforcement learning infrastructure with fault tolerance and dynamic scaling capabilities, achieving approximately 160% improvement in training efficiency compared to traditional colocated frameworks while maintaining robustness through automated recovery and resource management.</p><h4>Meta&#8217;s Vision Language World Model</h4><p>Meta&#8217;s Vision Language World Model (VLWM) is designed to enable AI agents to plan and reason about actions using natural video inputs. &#8220;<em>World model</em>&#8221; facilitates this by allowing agents to internally optimize action plans, reducing the reliance on exhaustive trial-and-error in real environments.</p><p>Given a video, VLWM aims to extract a structured language representation consisting of two key components:</p><ol><li><p><strong>Goal</strong>: A description and interpretation of the desired outcome.</p></li><li><p><strong>Procedural Plan</strong>: An action-state sequence outlining the steps to achieve the goal.</p></li></ol><p>For such a video-to-text extraction task, a straightforward approach might involve providing a Vision-Language Model (VLM) with the full video and prompting it to extract these language representations. However, this approach encounters the "impossible triangle": achieving high spatial resolution for fine-grained perception, maintaining a long temporal horizon that spans many procedural steps, and utilizing a large and intelligent VLM capable of following complex instructions.</p><p>To address this challenge, VLWM employs a two-stage strategy:</p><p><strong>1. Compression into a Dense Tree of Captions</strong>: The input video is compressed into a dense Tree of Captions, significantly reducing data volume while preserving essential semantic information.</p><p><strong>2. Extraction of Structured Goal-Plan Representations</strong>: Structured goal-plan representations are extracted from these captions using large language models (LLMs). Since this stage operates purely on text, it enables efficient processing with large LLMs and allows for iterative quality refinement through Self-Refine techniques.</p><p>This approach enhances the efficiency of video understanding and sets a new standard in AI's capability to plan and reason based on visual data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!etm4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!etm4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 424w, https://substackcdn.com/image/fetch/$s_!etm4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 848w, https://substackcdn.com/image/fetch/$s_!etm4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 1272w, https://substackcdn.com/image/fetch/$s_!etm4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!etm4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png" width="1456" height="674" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:674,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:442363,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!etm4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 424w, https://substackcdn.com/image/fetch/$s_!etm4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 848w, https://substackcdn.com/image/fetch/$s_!etm4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 1272w, https://substackcdn.com/image/fetch/$s_!etm4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f03acf7-cc79-4678-801a-5ad561751deb_1892x876.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>What makes VLWM unique is its dual-mode planning system that mirrors the psychological distinction between fast, intuitive thinking and slow, deliberative reasoning. Reminds me of <a href="https://jdsemrau.substack.com/p/hierarchical-reasoning-model">HRM</a>. </p><p><strong>System-1 Planning</strong> operates as the model's reactive mode, generating plans through direct autoregressive text completion. When presented with visual context and a goal description, VLWM first interprets the goal by predicting both the initial world state ("Now, the kitchen is set up with necessary ingredients...") and the expected final state needed for achievement ("To achieve the goal, the eggs need to be cooked and mixed with tomatoes..."). The model then generates an interleaved sequence of actions and world state changes in a single forward pass, where each action, like "<em>Crack eggs into a bowl and whisk them together,</em>" is immediately followed by detailed descriptions of environmental transformations. These world state descriptions function as internal reasoning chains that help track task progress, but the autoregressive nature creates a critical limitation&#8212;once an action token is generated, it becomes irreversible, potentially leading to error accumulation in complex scenarios.</p><p><strong>System-2 Planning</strong> addresses these limitations by introducing reflective reasoning through internal trial-and-error with the learned world model. Instead of committing to a single action sequence, System-2 generates multiple candidate plans and uses VLWM to simulate their effects, predicting the resulting world states for each possibility. A separately trained critic module&#8212;a 1B parameter language model&#8212;evaluates the semantic distance between these predicted outcomes and the desired goal state, assigning costs that reflect how well each candidate plan advances toward the objective. The system then selects the action sequence with the lowest predicted cost, effectively performing reasoning by searching through the space of possible futures. This critic is trained through self-supervised learning using <a href="https://arxiv.org/abs/2307.04923">ranking constraints</a> that teach it to assign lower costs to meaningful progress and higher costs to irrelevant or procedurally incorrect actions, enabling the model to optimize plans without requiring explicit reward annotations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rCeG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rCeG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 424w, https://substackcdn.com/image/fetch/$s_!rCeG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 848w, https://substackcdn.com/image/fetch/$s_!rCeG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 1272w, https://substackcdn.com/image/fetch/$s_!rCeG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rCeG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png" width="1456" height="380" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:380,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:350683,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rCeG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 424w, https://substackcdn.com/image/fetch/$s_!rCeG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 848w, https://substackcdn.com/image/fetch/$s_!rCeG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 1272w, https://substackcdn.com/image/fetch/$s_!rCeG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdadf43c9-32a8-4116-b835-126cdd098a6c_2266x592.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>First, it constructs training samples by taking base partial trajectories and appending either valid next steps from coherent task continuations or distractor steps sampled from unrelated tasks, training the model to satisfy ranking constraints where valid continuations receive lower costs than irrelevant additions. Second, it generates negative samples by randomly shuffling steps in base trajectories, teaching the critic to assign higher costs to procedurally incorrect sequences and ensuring sensitivity to temporal coherence. This dual approach enables the critic to distinguish meaningful progress from both irrelevant distractors and temporally disordered actions. The architecture benefits from VLWM's video-text formulation, which allows initialization from pretrained vision-language models like PerceptionLM-8B, inheriting strong visual perception capabilities along with language understanding and commonsense knowledge from large language models, while the language-based world state representation provides computational efficiency and interpretability compared to pixel-based generative approaches.</p><h4>Wayvve&#8217;s Lingo-2 - A closed-loop Vision-Language-Action-Mode</h4><p>Wayve's LINGO-2 is a closed-loop Vision-Language-Action Model (VLAM) that integrates visual perception, natural language processing, and driving control to provide real-time explanations of autonomous driving decisions. Unlike its predecessor, LINGO-1, which operated as an open-loop system offering commentary without influencing vehicle behavior, LINGO-2 combines vision and language inputs to generate both driving actions and explanatory text. This integration allows the model to adapt its behavior based on natural language prompts and provide continuous commentary on its decision-making process, enhancing transparency and trust in autonomous driving systems.</p><p>The architecture of LINGO-2 comprises two primary components: a vision model and an auto-regressive language model. The vision model processes sequences of camera images into tokens, which, along with additional contextual information such as route, speed, and speed limits, are fed into the language model. The language model then predicts both a driving trajectory and corresponding commentary text. The vehicle's controller executes the predicted trajectory, enabling real-time interaction and adaptation to dynamic driving scenarios.</p><p>A distinctive feature of LINGO-2 is its ability to respond to natural language instructions and queries during operation. For instance, passengers can ask the system about traffic light statuses or request specific maneuvers, and LINGO-2 will adjust its actions accordingly while providing explanations for its decisions. This closed-loop interaction between vision, language, and action represents a significant advancement in autonomous driving technology, offering a more intuitive and interpretable interface for users.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i-rm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i-rm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 424w, https://substackcdn.com/image/fetch/$s_!i-rm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 848w, https://substackcdn.com/image/fetch/$s_!i-rm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 1272w, https://substackcdn.com/image/fetch/$s_!i-rm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i-rm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png" width="1456" height="711" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:711,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:243430,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i-rm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 424w, https://substackcdn.com/image/fetch/$s_!i-rm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 848w, https://substackcdn.com/image/fetch/$s_!i-rm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 1272w, https://substackcdn.com/image/fetch/$s_!i-rm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b94a02-8d66-4ee0-b28c-75fe4018f20f_1536x750.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>How does LINGO-2 work?</em></p><p>LINGO-2 &#8220;<a href="https://wayve.ai/thinking/lingo-2-driving-with-language/">Driving with language</a>&#8221; integrates vision, language, and action into a unified framework. It comprises two primary modules: a vision model that processes camera images of consecutive timestamps into a sequence of tokens, and an auto-regressive language model that predicts a driving trajectory and generates commentary text. These components work in tandem to enable real-time interaction between the vehicle and its environment, facilitating both driving behavior and explanatory dialogue.</p><p>The integration of language and driving behavior in LINGO-2 introduces several capabilities that enhance human-vehicle interaction and trust in autonomous systems. Passengers may, in the future, issue natural language commands, such as "turn right" or "find a parking spot," prompting the vehicle to adapt its behavior accordingly. Although the latter example is more likely than the former. Additionally, the system can provide real-time debugging explanations of its driving decisions, answering questions like "Why did you slow down?" or "What is the current speed limit?". This is incredibly important if you need to understand how these systems make decisions.</p><p>This approach enables easier testing in synthetic environments where identical scenarios can be evaluated with different linguistic instructions, providing unprecedented insights into AI behavior and decision-making processes</p><h4>EO Robotics EmbodiedOneVision</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Uf9-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Uf9-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 424w, https://substackcdn.com/image/fetch/$s_!Uf9-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 848w, https://substackcdn.com/image/fetch/$s_!Uf9-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!Uf9-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Uf9-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png" width="1456" height="723" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:723,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1724868,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Uf9-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 424w, https://substackcdn.com/image/fetch/$s_!Uf9-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 848w, https://substackcdn.com/image/fetch/$s_!Uf9-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!Uf9-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93a4734a-1658-484e-a32d-457a4f6d4137_2188x1086.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>EmbodiedOneVision (EO-1), a unified embodied foundation model paired with the large-scale EO-Data1.5M dataset. Together, they represent a significant step toward building generalist embodied agents capable of understanding, reasoning, and acting across diverse environments. Unlike prior work that treats perception, reasoning, and control as loosely connected modules, EO-1 is also designed as a closed-loop system where vision, language, and action are interleaved during pretraining. This approach enables the model to predict actions in context, respond to language prompts, and reason about spatial and temporal dynamics within real-world tasks.</p><p>The system is motivated by advances in multimodal foundation models, which have shown that joint training across modalities yields superior generalization and reasoning. EO-Robotics extends these ideas into the embodied domain, emphasizing how robots can learn not only from static vision&#8211;language corpora but also from temporally grounded interaction data. With its unified model architecture, carefully curated dataset, and principled evaluation benchmark, EO-Robotics provides a foundation for the next generation of embodied intelligence research.</p><h5>Architecture</h5><p>At the core of EO-Robotics lies <strong>EO-1</strong>, a decoder-only transformer with approximately three billion parameters. The model integrates multiple modalities into a <strong>single shared representation space</strong>, handling images, video frames, text, and robotic actions without requiring separate specialized modules. This design departs from earlier Vision-Language-Action (VLA) model approaches that introduce action-specific heads or auxiliary training objectives.</p><p>EO-1 employs two complementary training mechanisms:</p><ul><li><p><strong>Auto-regressive decoding</strong> for discrete modalities such as text and symbolic tokens.</p></li><li><p><strong>Flow-matching denoising</strong> for continuous robotic action trajectories.</p></li></ul><p>Both mechanisms are unified through causal attention over the entire multimodal sequence, enabling EO-1 to capture dependencies between perception, reasoning, and action. The architecture is initialized with a pre-trained vision&#8211;language backbone, giving it broad perceptual and linguistic priors, and then adapted to the embodied domain by training on EO-Data1.5M.</p><p>To bridge action and non-action modalities, EO-1 incorporates lightweight multilayer perceptrons (MLPs) that encode and decode continuous motor actions into the tokenized sequence. This avoids retraining large action-specific modules from scratch, improving efficiency and enhancing cross-modal transfer. By aligning text, vision, and action tokens in the same autoregressive stream, EO-1 treats reasoning and acting as a single process rather than separate stages, resulting in more coherent robotic control.</p><h5>Capabilities</h5><p>EO-1&#8217;s abilities stem from both its architectural design and its large-scale training data. <strong>EO-Data1.5M</strong> provides over 1.5 million multimodal samples, interleaving vision, text, and robot actions. The dataset combines two key sources:</p><ol><li><p><strong>Web-based vision&#8211;language corpora</strong>, which provide general visual-linguistic grounding.</p></li><li><p><strong>Real-world robot episodes</strong> supply action-level continuity, spatial grounding, and temporal structure.</p></li></ol><p>A custom data pipeline ensures diversity, quality, and task coverage. Robot videos are filtered and clustered to reduce redundancy, split into subtasks, and captioned by both pretrained vision&#8211;language models (VLMs) and human annotators. From these subtasks, question&#8211;answer pairs are generated to probe temporal and spatial reasoning. Human annotators refine answers to ensure correctness, and the resulting interleaved sequences integrate visual tokens, linguistic reasoning, and motor actions.</p><p>Through this training regime, EO-1 acquires capabilities in several areas:</p><ul><li><p><strong>Spatial understanding</strong>: object localization, multi-view correspondence, and trajectory reasoning.</p></li><li><p><strong>Task reasoning</strong>: planning sequences of actions and evaluating task progress.</p></li><li><p><strong>Physical commonsense</strong>: reasoning about forces, constraints, and counterfactual outcomes.</p></li><li><p><strong>State estimation</strong>: assessing object states such as open/closed or full/empty, and predicting the results of actions.</p></li></ul><p>Performance is measured through <strong>EO-Bench</strong>, a benchmark constructed to avoid the pitfalls of conflated evaluation tasks. EO-Bench includes 648 QA pairs across four categories&#8212;spatial understanding, physical commonsense, task reasoning, and state estimation&#8212;allowing precise measurement of strengths and weaknesses. Unlike other benchmarks that mix multiple reasoning aspects in a single query, EO-Bench ensures that each question isolates a specific embodied reasoning skill, making evaluations interpretable and reliable.</p><h5>Charming points</h5><p>EO-Robotics distinguishes itself from prior embodied AI frameworks through three defining elements:</p><ol><li><p><strong>Unified Multimodal Transformer</strong><br>EO-1 processes text, vision, and actions in a single stream rather than through disjointed modules. This unified design improves alignment across modalities and enables coherent reasoning-to-action pipelines.</p></li><li><p><strong>Interleaved Embodied Dataset</strong><br>EO-Data1.5M structures multimodal episodes in temporal order, linking perception, reasoning, and action. The inclusion of flexible interleaved QA pairs with robot actions enriches cross-modal grounding and provides the model with nuanced spatial&#8211;temporal reasoning skills.</p></li><li><p><strong>Principled Benchmarking with EO-Bench</strong><br>EO-Bench introduces a structured evaluation suite that disentangles reasoning categories. This not only allows researchers to identify bottlenecks in embodied intelligence&#8212;such as spatial reasoning, which is emphasized in the benchmark&#8212;but also sets a standard for transparent and interpretable comparisons.</p></li></ol><p>Together, these design choices create a toolchain that goes beyond conventional VLAM approaches. EO-1 does not merely predict actions from observations; it integrates reasoning, perception, and control into a single generative process. This positions EO-Robotics as a platform for <strong>generalist embodied intelligence</strong>, where robots can flexibly adapt across tasks, environments, and modalities without requiring task-specific retraining.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kHi_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kHi_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 424w, https://substackcdn.com/image/fetch/$s_!kHi_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 848w, https://substackcdn.com/image/fetch/$s_!kHi_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 1272w, https://substackcdn.com/image/fetch/$s_!kHi_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kHi_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png" width="1456" height="422" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:422,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:307258,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://jdsemrau.substack.com/i/172400916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kHi_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 424w, https://substackcdn.com/image/fetch/$s_!kHi_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 848w, https://substackcdn.com/image/fetch/$s_!kHi_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 1272w, https://substackcdn.com/image/fetch/$s_!kHi_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3b030fc-125d-4b62-a127-cd1f4d9cba95_2358x684.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>EO-1 is my final example of how embodied foundation models are moving beyond narrow perception or control, toward systems that unify vision, language, and action into generalist frameworks for reasoning and robotics.</p><h4>In Closing</h4>
      <p>
          <a href="https://jdsemrau.substack.com/p/visual-language-action-models">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Multi-Agents for Optimal Equity Portfolio Construction]]></title><description><![CDATA[Behavioural Finance, LLM Debates, Drama and Adaptive Quantitative Methods]]></description><link>https://jdsemrau.substack.com/p/multi-agents-for-optimal-equity-portfolio-construction</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/multi-agents-for-optimal-equity-portfolio-construction</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 25 Aug 2025 19:41:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!qxwU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d3d443c-b693-40d5-a3bd-1b794bebf9cc_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We all know <a href="https://jdsemrau.substack.com/p/becoming-super-agent-bill-ackman">Superbill</a> can always be improved. One of those aspects is portfolio construction, i.e., the act of balancing return, risk, and market realities in the face of uncertainty. And I don&#8217;t mean Markowitz&#8217;s mean-variance optimization, that&#8217;s the easy part. Per Nvidia&#8217;s <a href="https://www.nvidia.com/en-us/industries/finance/ai-financial-services-report/">2025 </a><strong><a href="https://www.nvidia.com/en-us/industries/finance/ai-financial-services-report/">State of AI in Financial Services Report</a>, </strong>25%  of respondents reported tha&#8230;</p>
      <p>
          <a href="https://jdsemrau.substack.com/p/multi-agents-for-optimal-equity-portfolio-construction">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Hierarchical Reasoning Model]]></title><description><![CDATA[Is it a new paradigm to think about thinking?]]></description><link>https://jdsemrau.substack.com/p/hierarchical-reasoning-model</link><guid isPermaLink="false">https://jdsemrau.substack.com/p/hierarchical-reasoning-model</guid><dc:creator><![CDATA[Jan Daniel Semrau (MFin, CAIO)]]></dc:creator><pubDate>Mon, 18 Aug 2025 11:37:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Hypw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3424442-8f69-4c73-9a0b-7104958aadac_1344x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You might have noticed that GPT-5 sometimes thinks for a very long time. Reasoning as a concept sometimes still feels like an infinite loop to nowhere. As a result, most &#8220;thinking&#8221; models have very high latency and are expensive in everyday usage. </p><p>Maybe the whole concept of language-based reasoning is wrong? </p><p>China and Singapore-based  Research Lab <a href="https://www.sapient.inc/models">Sapie&#8230;</a></p>
      <p>
          <a href="https://jdsemrau.substack.com/p/hierarchical-reasoning-model">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>