<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Agents from First Principles on Guy Freeman</title><link>https://gfrm.in/series/first-principles/</link><description>Recent content in Agents from First Principles on Guy Freeman</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 26 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://gfrm.in/series/first-principles/index.xml" rel="self" type="application/rss+xml"/><item><title>Three Types and a Funeral for Your Inference Library</title><link>https://gfrm.in/posts/three-types/</link><pubDate>Sun, 26 Apr 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/three-types/</guid><description>&lt;div class="callout callout-note"&gt;
 This is Part 1 of a series on Bayesian decision-theoretic agents.
&lt;/div&gt;

&lt;div class="callout callout-note"&gt;
 This post describes the Credence architecture as it stood in March 2026, when the system used the standard Kolmogorov definition of probability &amp;mdash; measures over sample spaces. Since then, the foundation has been reconstructed around de Finetti&amp;rsquo;s definition, where expectation (the &lt;em&gt;prevision&lt;/em&gt;) is the primitive and probability is derived from it. The three types described here were the right starting point; &lt;a href="https://gfrm.in/#what-came-next-the-funeral-in-the-title"&gt;what came next&lt;/a&gt; is at the end.
&lt;/div&gt;

&lt;p&gt;What would it take to build an agent that genuinely learns and decides &amp;mdash; not one that pattern-matches its way through tool calls, but one whose behaviour is &lt;em&gt;derived&lt;/em&gt; from a few fundamentals the way physics is derived from conservation laws?&lt;/p&gt;</description></item><item><title>The Loop Problem</title><link>https://gfrm.in/posts/loop-problem/</link><pubDate>Tue, 28 Apr 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/loop-problem/</guid><description>&lt;div class="callout callout-note"&gt;
 This is Part 3 of a series. For the axiomatic foundation, see &lt;a href="https://gfrm.in/posts/three-types/"&gt;Part 1: Three Types and a Funeral&lt;/a&gt;. For the VOI-gated text adventure agent, see &lt;a href="https://gfrm.in/posts/teaching-zork/"&gt;Part 2: Teaching Zork to a Bayesian&lt;/a&gt;.
&lt;/div&gt;

&lt;p&gt;Every reinforcement learning agent that has ever played a text adventure has, at some point, tried to take the lantern fifty times in a row.&lt;/p&gt;
&lt;p&gt;Not because it&amp;rsquo;s stupid. Because its state representation makes &amp;ldquo;Shack with book&amp;rdquo; and &amp;ldquo;Shack with lantern&amp;rdquo; look like different states, so the learned futility of &amp;ldquo;take lantern&amp;rdquo; in one state doesn&amp;rsquo;t transfer to the other. The agent is doing exactly what its architecture tells it to do: each state-action pair is independent, and it hasn&amp;rsquo;t yet learned that &lt;em&gt;this particular&lt;/em&gt; pair is useless. It will learn, eventually, after wasting 39 steps per episode on actions it has already tried.&lt;/p&gt;</description></item><item><title>Teaching Zork to a Bayesian</title><link>https://gfrm.in/posts/teaching-zork/</link><pubDate>Tue, 28 Apr 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/teaching-zork/</guid><description>&lt;div class="callout callout-note"&gt;
 This is Part 2 of a series. For the axioms and types underneath, see &lt;a href="https://gfrm.in/posts/three-types/"&gt;Part 1: Three Types and a Funeral&lt;/a&gt;. For the state-representation consequences, see &lt;a href="https://gfrm.in/posts/loop-problem/"&gt;Part 3: The Loop Problem&lt;/a&gt;.
&lt;/div&gt;

&lt;p&gt;Every AI agent demo involves web search, retrieval, or API calls &amp;mdash; tasks where querying everything is merely expensive. A LangChain ReAct agent that hammers all four tools on every question wastes money but still gets answers. The penalty is economic, not existential.&lt;/p&gt;</description></item><item><title>Evolution Discovers How to Think: A Philosophical Journey in Code</title><link>https://gfrm.in/posts/bayesian-agent-part2/</link><pubDate>Sat, 31 Jan 2026 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/bayesian-agent-part2/</guid><description>&lt;p&gt;In &lt;a href="https://gfrm.in/posts/bayesian-agent/"&gt;Part 1&lt;/a&gt;, I built an agent that learns which foods are safe through Bayesian inference. It starts ignorant, observes outcomes, updates its beliefs using exact conjugate mathematics, and eventually acts with something resembling competence. Clean code, sound theory, and those belief distributions converging in real-time remain genuinely satisfying to watch, in the way that all correctly implemented mathematics is satisfying to watch.&lt;/p&gt;
&lt;p&gt;Something has been nagging at me, though.&lt;/p&gt;
&lt;p&gt;The agent learns &lt;em&gt;what&lt;/em&gt; to believe. I designed &lt;em&gt;how&lt;/em&gt; it believes. I chose the variables it perceives. I specified the structure of its world-model. I set the prior hyperparameters. The agent&amp;rsquo;s entire cognitive architecture &amp;mdash; the shape of its epistemic machinery &amp;mdash; came from me, handed down like tablets from a mountain. The agent had no say in the matter. As someone who spent years doing Bayesian statistics, I should know better than to treat the model structure as given. The prior over model structures is the prior that actually matters, and I skipped it entirely.&lt;/p&gt;</description></item><item><title>Building a Bayesian Learning Agent That Teaches Itself to Eat</title><link>https://gfrm.in/posts/bayesian-agent/</link><pubDate>Fri, 26 Dec 2025 00:00:00 +0000</pubDate><guid>https://gfrm.in/posts/bayesian-agent/</guid><description>&lt;p&gt;You&amp;rsquo;re stranded somewhere unfamiliar with twelve types of food scattered around. Some provide energy. Others are toxic. You don&amp;rsquo;t know which is which, you&amp;rsquo;re losing energy with every step, and nobody left a manual. The question is whether you can learn fast enough to survive.&lt;/p&gt;
&lt;p&gt;This is the exploration-exploitation tradeoff, and it&amp;rsquo;s one of those problems that sounds like a thought experiment until you actually have to solve it. Pure exploration &amp;mdash; trying everything at random &amp;mdash; kills you. Pure exploitation &amp;mdash; eating only what you currently believe is best &amp;mdash; starves you when better options exist two metres away. You need something that balances both, and ideally something with a mathematical proof attached.&lt;/p&gt;</description></item></channel></rss>