The Compounding Wall: How We Solved the Context-Dependent Transfer Problem

Keywords: Version Space, Bayes-Adaptive Planning, Active Inference, Machine Learning, Artificial General Intelligence, AGI, Cognitive Science, Decision Theory, Project Halo

If you are a cook dropped into a new kitchen, you don’t know where the spices are or what recipe the head chef wants. But you don't start by guessing randomly and eating raw ingredients. Instead, you look at the menu, open a few cupboards, read the labels, and infer the active plan. You gather information first, then you cook.

This is Bayes-adaptive decision making: acting to reduce your uncertainty about the world's hidden rules before exploiting those rules to survive.

In Volume 3, Episode 7, we proved that a learned causal belief could transfer across worlds. But we immediately hit a hard wall when we tried to scale this to a multi-recipe curriculum (--gate13).

We built a world with three resources and three possible recipes: ${0,1}$, ${0,2}$, and ${1,2}$. We trained a "broad" agent by cycling it through all three recipes. We expected it to become competent across the entire curriculum.

Instead, it failed. It would master the first recipe it encountered and then freeze, refusing to explore the other combinations.

Why? Because the agent's mind planned against a point estimate of the world's rules. It had no representation of its own uncertainty. It did not know which recipe was active in the current level, and it had no way to gather information systematically to find out.


The Breakthrough: Planning Against a Version Space

In collaboration with an external AI instance ("Fable"), we reframed the problem: the exploration failure and the context failure were the same problem.

Instead of planning against a single guess, the agent needed to plan against a belief over rules.

Because our gridworld physics were near-deterministic, the agent's belief set could be represented as a version space ($S$): the set of all hypotheses (recipes) that have not yet been falsified by experienced outcomes.

   [Sensory Percepts] ──> [Causal Outcomes] ──> [Falsify Hypotheses]
                                                        │
   [Active Plan] <── [Bayes-Adaptive Planner] <── [Version Space (S)]

At the start of a level, the version space contains all possible recipes: $S = {{0,1}, {0,2}, {1,2}}$.

We built a Bayes-adaptive value iteration planner (brain.py). The planner evaluated actions based on how effectively they would prune the version space. If the agent combined Resource 0 and 1, and the synthesis failed, that recipe was eliminated from $S$, leaving the remaining options.

The value of "information gathering" (probing) emerged naturally from value iteration. The agent did not need a hand-coded exploration constant (like $\epsilon$-greedy). It probed because the planner recognized that collapsing the version space was the fastest path to long-term survival.


The Gated Results: Optimal Probing

We isolated the decision core under a three-recipe reactor environment (--gate14). We measured the average number of probes required to identify the active recipe, and the resulting survival rate:

Agent Configuration Probes to Identification Survival Rate (200 Lives)
Random Baseline $18.58$ $17/200$
Bandit Baseline $8.90$ $89/200$
Version-Space Agent $1.68$ $200/200$ (Perfect)
Information-Theoretic Floor $1.67$

The results were mathematically clean: * Optimal Probing: The version-space agent identified the active recipe in $1.68$ probes, landing directly on the theoretical information floor ($1.67$). * Perfect Survival: It achieved a $100\%$ survival rate ($200/200$), completely dissolving the compounding wall. * Prior Compounding: By accumulating a Dirichlet prior across levels, the agent learned the distribution of recipes. This cut its average probes from $1.60$ down to $1.23$ as experience accumulated. An ablated agent (no prior accumulation) stayed flat at $1.91$.

We had solved context-dependent compounding. The agent could now identify a hidden rule, adapt its behavior, and survive.


The Next Wall: The Navigation Economy

While the decision core worked perfectly in isolation, folding it into the navigating gridworld agent (VSMultiAgent, --gate15) exposed a new, physical wall: navigation economy.

In the reactor, actions were abstract. In the gridworld, the agent had to physically walk to resources, avoid hazards, and navigate corridors. We found that even with perfect cognition, the agent was starving because its greedy, reflex-based navigator was incredibly inefficient, wandering $3\times$ the shortest path.

To survive, the agent needed to plan its movements as well as its decisions. It needed a spatial mapping organ.

In the next chapter, we look at Episode 9: how we integrated the version space with the body navigator and mapped out the hierarchical mind.

← Back to Field Notes