Explicit and compiled actuator trackers under a fixed memory budget

An exact finite comparison under a contract frozen in advance

B-Theory working note, v0.1, 16 November 2026. AI-assisted research draft. Internal checks only; not external peer review. No novelty or priority is claimed.

Abstract

Five papers in this programme find that an explicitly organized self-model performs exactly as well as a compiled controller given the same evidence, and each adds that this says nothing under different resource limits. Reflective Self-Models, Section 7, proposes the missing test: fix the memory budget and ask whether an explicit actuator model helps across new actuator changes. This note carries out that test in one finite model, under a contract written and approved before any computation.

The model is the pilot's command and residual channel with a polarity that may flip at every step. The budget is K persistent states at every step boundary, K = 2, 3, 4, over 8 steps. The result is no advantage, and also no cost:

Two elementary facts, stated before computing, limit what such a comparison can show at all: an explicit class is a subset of the compiled class at the same budget, so it cannot win on the design regime; and it can win on transfer only by losing on the design regime. The effects that do appear in the tables belong to the number of states and to the free stage index, not to how the memory is organized. Nothing here concerns cognition or consciousness.

1. Status and how to read this note

2. The contract in brief

Model. Polarity θt ∈ {0,1}, t = 0,…,T−1, with θ0 fair and θt+1 = θt ⊕ Dt+1, the D's independent Bernoulli(h). At step t the controller issues a guess ut from its memory Mt; the residual xt = θt ⊕ et arrives, et independent Bernoulli(ε); the action fails when ut ≠ xt; the memory is updated from (Mt, xt). Here 0 < h < 1/2 and 0 < ε < 1/2. This is the pilot's channel (Reflective Self-Models, Section 3) with a recurring hazard and no calibration probes. The loss is the pilot's task loss, J = (1/T)·Σt Pr(ut ≠ xt).

Budget. At most K states of persistent memory at every step boundary, as in D01 Section 7.1 and D07 Section 9. Tables are immutable code and are not charged. Two accountings of the stage index: convention C, the index is public and free and tables may depend on it (the D01 convention, primary); convention H, there is no index and one table is used at every step.

Belief step. For b = Pr(θ = 1): U(b, x) is the Bayes update on residual x, H(b) = (1−h)b + h(1−b) is the hazard, and gx(b) = H(U(b, x)).

Class Convention Definition
G(K) C Every sequence of K-state update and guess tables.
Ecal(K) C Calibrated belief register: each state carries bt(m) = Pr(θt = 1 given Mt = m); after residual x the belief is gx(bt(m)); the 2K updated beliefs are rounded monotonically to at most K states (no other state's belief lies between two beliefs sent to one state; equal beliefs stay together); the guess is the more probable polarity, 0 on a tie.
S(K) H Every single pair of K-state tables, free initial state.
E(K) H Fixed-grid belief register: K levels from {1/50,…,49/50}; from level β and residual x move to the level nearest gx(β); guess 1 above 1/2; start at the level nearest 1/2.
M(K) H Ordered-state automata: the update is monotone in a fixed order of the states, residual 1 never leads lower than residual 0, and the guess is a threshold.
W(K) H History window: the state is the last log2(K) residuals; free guess table. K = 2, 4.

Points. P1: h = 1/10, ε = 1/5 (primary; the D01 tracking point). P2: h = 1/20, ε = 3/10. P0: h = 1/4, ε = 1/10 (the pilot's values; control). Horizon T = 8 for every verdict.

Leg A compares optimal losses on the design regime. Leg B freezes the loss-minimizing controllers of E(K) and S(K) at P1 and evaluates them in four held-out regimes with the same ε: no change; flips at 1/20; flips at 1/5; a single persistent change (probability 1/10 per step until it happens). Headline: advantage if the explicit set does at least as well as the compiled set in every held-out regime and strictly better in one, whichever optimal controllers are compared, for some K and with no reverse case; no advantage if for every K the compiled set dominates, the two are equal, or the explicit optimal set lies inside the compiled one; inconclusive otherwise.


Part I. General claims and proofs

Throughout, λ(θ, u) = Pr(xt ≠ u given θt = θ), that is ε if u = θ and 1−ε otherwise.

Proposition 1 (loss identity)

For every controller and every t, Pr(ut ≠ xt) = ε + (1−2ε)·Pr(ut ≠ θt).

Proof. ut is a function of x0,…,xt−1, and et is independent of (θt, x0,…,xt−1). Since xt = θt ⊕ et, the event ut ≠ xt has probability (1−ε)·Pr(ut ≠ θt) + ε·Pr(ut = θt). ∎

So the task loss is an increasing affine function of the polarity-tracking error, and the best guess is always the more probable polarity given what the memory holds.

Proposition 2 (inclusion; contract S1)

Let C be the set of all controllers of one machine model within one budget, and let E ⊆ C. Then minE J ≥ minC J for every loss J.

Proof. A minimum over a subset is not smaller. ∎

Any explicit class defined by a condition on the machine is such a subset. A strict design-regime advantage of an explicit class over the unrestricted compiled class at the same budget is therefore impossible, whatever the model.

Proposition 3 (nested optimal sets; contract S2)

Let E ⊆ C, let Jd be the design loss, and let AE, AC be the sets of minimizers of Jd in E and in C. If minE Jd = minC Jd, then AE ⊆ AC, and for every other loss L,

minAC L ≤ minAE L ≤ maxAE L ≤ maxAC L.

In particular the contract's "explicit transfer-dominates" requires minE Jd > minC Jd.

Proof. If π ∈ AE then π ∈ C and Jd(π) = minE Jd = minC Jd, so π ∈ AC. The chain of inequalities follows from AE ⊆ AC. Transfer dominance needs maxAE L < minAC L for some held-out loss L, which the chain forbids. ∎

Proposition 4 (inclusions among the classes)

E(K) ⊆ M(K) ⊆ S(K) ⊆ G(K), W(K) ⊆ S(K) and Ecal(K) ⊆ G(K).

Proof. M(K) ⊆ S(K), W(K) ⊆ S(K) and Ecal(K) ⊆ G(K) hold by definition. A homogeneous controller is a clocked one whose tables do not depend on t, after renaming its initial state, so S(K) ⊆ G(K).

For E(K) ⊆ M(K), order the states by their levels. (i) U(·, x) is increasing because both likelihoods are positive, and H is increasing because 1−2h > 0; so gx is increasing. (ii) Nearest-level rounding Q is nondecreasing under any tie rule. Suppose v < v′ but Q(v) = βj > βk = Q(v′). The function φ(w) = |βj − w| − |βk − w| is nonincreasing in w, equals βj − βk > 0 for w ≤ βk and βk − βj < 0 for w ≥ βj, and is strictly decreasing between. Nearness gives φ(v) ≤ 0 ≤ φ(v′), so φ(v) = φ(v′) = 0 with v < v′, which is impossible because φ vanishes only at the midpoint. Hence the update is monotone in the state. (iii) U(b, 1) ≥ U(b, 0) because (1−ε)² ≥ ε², so residual 1 never leads lower than residual 0. (iv) The guess is 1 exactly above 1/2, a threshold. ∎

Lemma 5 (designer's recursion; standard)

For a clocked controller write qt(θ, m) = Pr(θt = θ, Mt = m). For an array q of nonnegative numbers q(θ, m), define the atoms am,x(θ′) = Σθ q(θ, m)·ℓ(x|θ)·p(θ′|θ), with ℓ the residual likelihood and p the flip kernel, and for an assignment σ of atoms to states let qσ(·, m′) be the sum of the atoms assigned to m′. Let Vt(q) be the least expected number of failures from step t to T−1, over all table sequences, when the law at step t is q. Then

Proof. With update table ft the law obeys qt+1 = qtσ for σ = ft, by the law of total probability, and the expected failures at step t with guess table d are Σm Σθ qt(θ, m)·λ(θ, d(m)). No other feature of the past enters later laws or costs. Induction from the last step gives the recursion. For a fixed sequence of tables, every later law is a linear function of q and every stage cost is linear in the law, so the total is linear in q; Vt is a minimum of finitely many linear functions and hence concave. ∎

This is the recursion of D01, Proposition 7.1 and Corollary 7.2, at zero sensing price.

Lemma 6 (a concave objective is minimized by a monotone rounding)

Let a1,…,an be nonzero vectors in R²₊ with beliefs βi = ai(1)/(ai(0) + ai(1)). For an assignment σ : [n] → [K] let qσ(·, k) = Σi : σ(i) = k ai. Let Φ be a concave function of such K-tuples. Then minσ Φ(qσ) is attained by an assignment σ* with the following property: there are no i, j, l with σ*(i) = σ*(l) ≠ σ*(j) and βi ≤ βj ≤ βl.

That property says each cell is an interval of beliefs and equal beliefs are not separated; it is the monotone rounding of the Ecal(K) definition.

Proof. Allow randomized assignments κik ≥ 0 with Σk κik = 1, and put qκ(·, k) = Σi κik·ai. The set Q of all qκ is the image of a polytope under a linear map, so it is a polytope, and it contains every qσ. A concave function on a polytope attains its minimum at a vertex: if q = Σj μj vj is a convex combination of vertices, then Φ(q) ≥ Σj μj Φ(vj) ≥ minj Φ(vj). Let v be such a vertex.

A vertex of a polytope is the unique maximizer of some linear functional L. Write L(q) = Σk ⟨ck, q(·, k)⟩ with ck ∈ R². Then

L(qκ) = Σi (ai(0) + ai(1))·Σk κik·φk(βi), where φk(β) = ck(0)(1−β) + ck(1)β

is affine in β. Let φ*(β) = maxk φk(β) and σ*(i) = the least k with φk(βi) = φ*(βi). Then L(qσ*) ≥ L(qκ) for every κ, so qσ* maximizes L on Q and therefore qσ* = v. Hence Φ(qσ*) = minQ Φ ≤ minσ Φ(qσ), and σ* is itself an assignment, so it attains the minimum.

It remains to check the property. σ*(i) depends on i only through βi. Suppose σ*(i) = σ*(l) = k and σ*(j) = k′ ≠ k with βi ≤ βj ≤ βl. If βj equalled βi or βl we would have σ*(j) = k; so βi < βj < βl. The affine function ψ = φk′ − φk satisfies ψ(βj) ≥ 0, because k′ is maximal at βj, and ψ(βi) ≤ 0, ψ(βl) ≤ 0, because k is maximal there. An affine function that is ≤ 0 at two points and ≥ 0 strictly between them vanishes at all three. So k and k′ are both maximal at βi and at βj. The least-index rule at βi gives k < k′, and at βj gives k′ < k. Contradiction. ∎

This is the two-hypothesis, finite case of the extremal property of likelihood-ratio quantizers (Tsitsiklis 1993). The proof above is self-contained.

Theorem 7 (with a free stage index, monotone rounding loses nothing)

For every K ≥ 1, every horizon T, and all 0 < h < 1/2, 0 < ε < 1/2,

J(Ecal(K)) = J(G(K)).

Proof. Let Vt be as in Lemma 5 and let VEt be the same minimum taken only over continuations in which every update is a monotone rounding of the atoms and every guess is the more probable polarity, 0 on a tie. We show VEt = Vt by backward induction. At t = T−1 both equal c(q), since by Proposition 1 the more probable polarity minimizes each term of c(q). For t < T−1, Lemma 5 gives Vt(q) = c(q) + minσ Vt+1(qσ) with Vt+1 concave. Atoms of unused states are zero and can be dropped; every other atom is nonzero because h and ε lie strictly between 0 and 1/2. By Lemma 6 the minimum is attained at a monotone rounding σ*. By the induction hypothesis Vt+1(qσ*) = VEt+1(qσ*). So Vt(q) = c(q) + VEt+1(qσ*) ≥ VEt(q) ≥ Vt(q).

A controller produced by the restricted recursion belongs to Ecal(K). Its value bt(m) = qt(1, m)/(qt(0, m) + qt(1, m)) is Pr(θt = 1 given Mt = m) by the definition of qt. The belief of atom (m, x) is

[(1−b)ℓ(x|0)h + bℓ(x|1)(1−h)] / [(1−b)ℓ(x|0) + bℓ(x|1)] = H(U(b, x)) = gx(b), with b = bt(m).

Its updates are monotone roundings, its guesses are as required, and it uses at most K states. Together with Ecal(K) ⊆ G(K) this proves the equality. ∎

Remark, not used below. The proof uses that the polarity has two values, so that beliefs lie on a line. It does not use the symmetry of the model, its time-homogeneity or the binary residual.

Proposition 8 (when the budget cannot bind)

If ε ≤ h < 1/2, the two-state controller that guesses the last residual attains the K = ∞ loss at every horizon.

Proof. Let bt = Pr(θt = 1 given x0,…,xt−1). By Proposition 1 the K = ∞ optimum guesses 1 when bt > 1/2 and 0 when bt < 1/2. Now b0 = 1/2 and bt+1 = H(U(bt, xt)) ∈ (h, 1−h), so h < bt < 1−h for all t. If xt = 1, the posterior odds are bt/(1−bt) times (1−ε)/ε, which exceeds [h/(1−h)]·[(1−ε)/ε] ≥ 1 exactly because h ≥ ε. So U(bt, 1) > 1/2, and H(u) − 1/2 = (1−2h)(u − 1/2) keeps the side: bt+1 > 1/2. The case xt = 0 is symmetric. Hence the optimal guess at step t+1 is xt. The first guess is immaterial because b0 = 1/2. ∎

P0 has ε = 1/10 ≤ h = 1/4, so at the pilot's own parameters two states already do everything unbounded memory can do for the task loss. P1 and P2 have ε > h.

Two small facts used by the computation

Proposition 9. For nonnegative numbers, min(a + a′, b + b′) ≥ min(a, b) + min(a′, b′). So at the last step, where only the immediate cost remains, merging two cells never lowers the cost. ∎

Proposition 10 (relation to D01's timing). For every controller, T·J = 1/2 + (T−1)·[ε + (1−2ε)h] + (1−2ε)(1−2h)·Σs=1T−1 Pr(us ≠ θs−1).

Proof. x0 is a fair bit independent of u0, which gives 1/2. For s ≥ 1 use Proposition 1 and Pr(us ≠ θs) = h + (1−2h)·Pr(us ≠ θs−1), which holds because Ds is independent of (us, θs−1). ∎

The last sum is the total error D01 scores, over T−1 stages, for the same memory; this is how D01's published values test the code.


Part II. Exact finite computations

II.1 Method and checks

All arithmetic is in integers over a stated common denominator or in exact fractions. No floating-point number is compared. Decimals in the tables are for reading only; exact values are in results/.

Searches.

Gates, passed before any verdict cell was read.

  1. Nine published D01 zero-price values at P1, through Proposition 10: the two-state totals at D01 horizons 1 to 6 (including 29944419/25000000 at horizon 6), 2943/5000 for three states and 1443/2500 for four states and for full history at horizon 3. All reproduced exactly: the bounded-memory values by the all-merges search and again by the monotone search, the full-history value by the Bayes recursion.
  2. The P0 control: every class with K ≥ 2 has loss 9/25 at T = 8, equal to K = ∞, as Proposition 8 predicts. (Ecal(4), G(3) and G(4) were not searched at P0; they lie between the K = ∞ value and the three-state values, which coincide.)
  3. Every inclusion of Proposition 4 as an inequality between computed optima, and monotonicity in K.

Independent checks.

Not independently re-searched: the minimality of Ecal(3) and Ecal(4) at T = 8. Their values and class membership are re-evaluated; that no monotone rounding does better rests on one exhaustive search.

II.2 Leg A: optimal loss at a fixed budget

P1 (h = 1/10, ε = 1/5), T = 8.

K Clocked: G(K) = Ecal(K) No clock: S(K) = M(K) = E(K) W(K) Value of the stage index
2 23333551859/62500000000 ≈ 0.373337 187/500 = 0.374000 187/500 41448141/62500000000 ≈ 0.000663
3 23084432939/62500000000 ≈ 0.369351 23185010009/62500000000 ≈ 0.370960 — 10057707/6250000000 ≈ 0.001609
4 11433709/31250000 ≈ 0.365879 89982392/244140625 ≈ 0.368568 187/500 10504647/3906250000 ≈ 0.002689

References: K = 1, 1/2. K = ∞, 11417685589/31250000000 ≈ 0.365366. The pilot's two-contradiction rule as a four-state machine, 24450214709/62500000000 ≈ 0.391203.

P2 (h = 1/20, ε = 3/10), T = 8.

K Clocked: G(K) = Ecal(K) No clock: S(K) = M(K) = E(K) W(K) Value of the stage index
2 3446376064177/8000000000000 ≈ 0.430797 437/1000 = 0.437000 437/1000 49623935823/8000000000000 ≈ 0.006203
3 3382302251281/8000000000000 ≈ 0.422788 3441013650877/8000000000000 ≈ 0.430127 — 14677849899/2000000000000 ≈ 0.007339
4 1685324203913/4000000000000 ≈ 0.421331 422087862767/1000000000000 ≈ 0.422088 437/1000 605449431/800000000000 ≈ 0.000757

References: K = ∞, 67346443277/160000000000 ≈ 0.420915. Two-contradiction rule, 3480377233477/8000000000000 ≈ 0.435047.

In all six rows the three no-clock classes have exactly the same optimum, and the two clocked classes have exactly the same optimum.

Horizon check, P1, T = 16, no-clock classes only (no verdict). S(K) = M(K) = E(K) again in every row: 73/200 = 0.365000 at K = 2, ≈ 0.361398 at K = 3, ≈ 0.355656 at K = 4. W(4) = W(2) = 73/200. K = ∞ ≈ 0.353158.

What the optimal controllers are.

Two side observations.

II.3 Leg B: frozen designs in held-out change processes

Design: P1, T = 8. For each K the loss-minimizing set of E(K) and that of S(K) contain the same two behaviours (the counter and its mirror image), so AE(K) = AS(K). The two behaviours have equal loss in every held-out regime, because the regimes are symmetric under exchanging the polarities. Each cell below is therefore a single exact value shared by both classes.

K Design loss No change Flips at 1/20 Flips at 1/5 Single change
2 187/500 = 0.374000 137/400 = 0.342500 1433/4000 = 0.358250 811/2000 = 0.405500 731953279/2000000000 ≈ 0.365977
3 ≈ 0.370960 2016749/6250000 ≈ 0.322680 11137077146023/32000000000000 ≈ 0.348034 1604929679/3906250000 ≈ 0.410862 5661375526733/15625000000000 ≈ 0.362328
4 ≈ 0.368568 1867817/6250000 ≈ 0.298851 1347788728433/4000000000000 ≈ 0.336947 407647073/976562500 ≈ 0.417431 11311290331453/31250000000000 ≈ 0.361961

Reported without a verdict: the design-optimal clocked controllers found by the Ecal(K) search.

K Design loss No change Flips at 1/20 Flips at 1/5 Single change
2 ≈ 0.373337 ≈ 0.322680 ≈ 0.349405 ≈ 0.414309 ≈ 0.365372
3 ≈ 0.369351 ≈ 0.314904 ≈ 0.343905 ≈ 0.411868 ≈ 0.361203
4 ≈ 0.365879 ≈ 0.300740 ≈ 0.336188 ≈ 0.412599 ≈ 0.358917

Description only: more states help when change is rarer than designed for and hurt when it is more frequent. Under flips at 1/5 the frozen four-state counter (0.417) does worse than the two-state one (0.406). This is a property of the number of states, common to both classes.


3. Verdict under the frozen rules

Leg A. Equivalence at the frontier in all twelve cells (P1 and P2; K = 2, 3, 4; conventions C and H).

No cell shows a cost of explicit organization. By Proposition 2 no cell could show an advantage.

Leg B. Transfer-equal for K = 2, 3 and 4: the explicit and compiled design-optimal sets coincide and give the same loss in each of the four held-out regimes.

Headline: no advantage. Sub-result: equivalence at the frontier, in both conventions and at both parameter points.

Against what was written before computing (contract Section 9). Foreseen and confirmed: the two scoping facts; the P0 control; a positive value of the stage index at K = 2; Theorem 7, which was an expectation and is now proved. Not foreseen: that the no-clock optimum is the saturating counter at every K tested; that it lies in the narrow explicit class, so that convention H also shows no cost; and that the two-residual window gains nothing over the last residual.

What does move the loss. The number of states (0.374 to 0.369 at P1 without a clock, against 0.365 with unbounded memory) and the free stage index (0.0007 to 0.0027 at P1, 0.0008 to 0.0073 at P2). The second is an effect of an uncharged resource, bought with time-indexed tables several times larger. Neither is an effect of organizing the memory as a model of the actuator.

4. Which machinery is standard

5. Scope, limits and claims not made

6. Reproduction

Python 3.10, standard library only; no random numbers; no network. From this folder:

Command Produces Time here
python code/gates.py Gates 1 and 2 9 s
python code/conv_c.py --force Ecal(K) searches at T = 8 (ten processes) 105 s
python code/interval_check.py All merges against monotone rounding, 32 instances 64 s
python code/leg_a.py Leg A tables, gate 3, findings 20 s
python code/leg_b.py Leg B tables, findings, headline under 1 s
python code/check.py Independent re-evaluation 20 s
python code/check_optimum.py Independent S(K) search 19 s
python code/show_witnesses.py, python code/witness_grids.py Readable optimal controllers (display only) 13 s

python code/run_all.py runs all of these in order. Every step was run twice from scratch on 16 November 2026 (Windows 10, twelve cores); the second run reproduced results/leg_a.json and results/leg_b.json byte for byte. Outputs and logs are in results/; SHA-256 values of every file are in HASHES.txt.

References

  1. B-Theory. When Does an Explicit Self-Model Help? Calibration and Control under Internal Change in a Finite-State Pilot. Manuscript, 14 October 2026. Sections 1, 3, 4 and 7.
  2. Brian Theory. Acquisition, Forgetting, and Target Change: Information Accounting for Adaptive Systems (D01). Draft, 13 November 2026. Sections 7 to 9.
  3. Brian Theory. Memory–Prediction Tradeoffs for a Shared Binary Mechanism (D07). Draft, 13 November 2026. Sections 9 to 11.
  4. B-Theory. Finite Noisy Audits with Learned Baselines. Technical addendum v1.0, 9 November 2026. Propositions 3 and 4.
  5. J. N. Tsitsiklis. Extremal properties of likelihood-ratio quantizers. IEEE Transactions on Communications 41(4):550–558, 1993. doi:10.1109/26.223779. Record and abstract checked; full text not read.
  6. E. Ordentlich and T. Weissman. On the optimality of symbol-by-symbol filtering and denoising. IEEE Transactions on Information Theory, 2006. doi:10.1109/TIT.2005.860432. Record and abstract checked; full text not read.