UNI Universal Natural Intelligence

Wiki · The Colony & the Method

UNI — Scientific Evidence Report & Falsification Invitation

The Colony & the Method · docs/EVIDENCE.md @ 44baf03d5041 (gen2-runtime) — opens the published snapshot ac338733bbba

How to read this page

Three ways to read this page. Precise is the document itself, exactly as it is written in the repository. Plain and Clear were written for this website to help you meet that document — they are about it. They are not it, and they are not evidence.

Eighty-four pages about the colony. Each agent is an Elixir process holding a generative model and doing inference, attached to a body that logs into a Minecraft world as an ordinary player. Around that sit the broadcast suite that films them and the runbooks that keep the whole thing running. There are typed specifications for each organ of the model, plus the world and genome specs. There are also the adversarial review personas used to attack a proposed change before it ships.

It is for the reader curious how a running system is put together and how it is held to account. The accountability half is the more distinctive. There is a lab protocol governing evidence and attribution, and a claim fence that restricts the vocabulary a claim is allowed to use. There is a public gate log. And there is a standing invitation to reproduce any verdict from the commit and the seed named in its receipt.

Start with the public read, then the lab protocol, then the falsification invitation. If you want the mathematics rather than the operations, go straight to the typed organ specs.

What it is not: a description of a mind, and not all one kind of document. A large part of this corpus is design and planning — specs marked as proposed rather than applied, organs designed but not built, plans that were later superseded — and each page states which it is. A specification is not a running system, and these pages are careful about the difference; the reader should be too. Eight documents were withheld from publication because they describe private infrastructure.

Your browser cannot switch reading levels, so the document itself is shown.

Precise — the source document

This is the document. Rendered from the repository at the commit above, with nothing rewritten for the web. A gate re-renders it on every deploy and fails the build if a single byte differs.

System: THE STRATIFIED PALIMPSEST — a pure-Elixir active-inference agent ("UNI") that plays real Minecraft through a mineflayer body. Status: gen-2. Reasoning stack live and on-screen; pure-OTP runtime; on-chip math fence. Date of report: generated at audit time. Branch: gen2-runtime.

This document states precisely what is claimed, what is proven and how, what is NOT claimed, and how anyone, anywhere, can try to falsify it. It is written to be attacked. If a claim below survives your best attempt to break it, that is the result.


0. The one-paragraph claim

UNI is a discrete active-inference agent. It selects actions to minimise expected free energy (EFE) — an explicit sum of an epistemic (information-gain) term and a pragmatic (preference) term — over beliefs maintained by minimising variational free energy (VFE). There is no reward signal and no reinforcement learning anywhere in the system. The numerical core is pure Elixir with zero foreign computation layers (no Nx, no Rust, no NIF, no math FFI), JIT-compiled to native CPU code by BeamAsm. A two-level hierarchy (L1 fast sensorimotor, L2 slow strategic) communicates across a Markov blanket that carries only primitives. Every numerical kernel is checked to 1e-6 against an independent Python (scipy/numpy) oracle, and 26 acceptance gates are enforced in CI.


1. Architecture (what runs)

 Minecraft world  ──σ(senses)──►  body (mineflayer, Node)  ──σ line──►  SP.Runtime.Agent
                                                                              │  (pure cmd/2)
                                                                              ▼
        L2 Strategist (slow OODA, every 12 ticks)  ◄── situation digest (a primitive int)
                          │  option + C-overrides + hormones (down)
                          ▼
        L1 Factors model  ── infer (VFE) ─► learn (Dirichlet) ─► grow (structure) ─► decide (EFE)
                                                                              │
                                  α(action atom) ◄── Directive.Actuate ◄──────┘
  • Markov blanket (η ⊥ r | σ,α). Only two messages ever cross body↔brain: a sense line σ in, one action atom α out. Only an integer situation digest crosses L1↔L2 up, and an option atom + a preference-override map down. No belief struct ever crosses.
  • Purity boundary. SP.Runtime.Agent.cmd/2 consumes a CloudEvents Signal, runs one perception→learning→action cycle (MC.step/2), and returns directives. It performs no effects; the runtime interprets directives. This is the Jido contract, implemented in pure OTP with zero Jido in the build.

2. Mathematical derivations

Notation: hidden states s (per factor f), observations o (per modality m), actions u/policies π. A = likelihood P(o|s) (column-major, A[:,s] a distribution over o). B^u = transition P(s'|s,u) (column-major, B[:,s] a distribution over s'). C = log-preferences over outcomes. D = prior over states. E = habit prior over actions.

2.1 Variational free energy (perception) and the bound

For one factor with observation o, the variational posterior q(s) minimises

F[q] = Σ_s q(s)·( ln q(s) − ln P(o,s) ) = D_KL[ q(s) ‖ P(s|o) ] − ln P(o). (2.1)

Because D_KL ≥ 0, F is an upper bound on surprisal: F ≥ −ln P(o). Minimising F over q tightens the bound; the minimiser is the true posterior and then F = −ln P(o).

The mean-field update (per factor) that this report's code performs is

ln q(s) = forward_prior(s) + Σ_m γ_m · ln A^m[o_m, s] − ln Z, (2.2)

with q = softmax(...). γ_m is the (dynamic) sensory precision of modality m.

Gate 3 asserts F ≥ −ln P(o) numerically on a worked 2-state example.

2.2 The forward message: (ln B)·s, NOT ln(B·s) (bound-critical)

The empirical prior over the next state, used as forward_prior in (2.2), is the expected log-transition, computed by logging the transition columns first and then taking the belief-weighted sum:

forward_prior(s') = Σ_s q(s) · ln B^u[s', s] ≡ ((ln B)·q)(s'). (2.3)

This is not ln(B·q). By Jensen's inequality, for a convex/concave separation,

ln( Σ_s B[s',s] q(s) ) ≥ Σ_s q(s) ln B[s',s], (2.4)

so ln(Bq) ≥ (ln B)q pointwise, with a strictly positive gap whenever B mixes states. Using ln(Bq) would break the VFE upper-bound guarantee (§16 of the spec). The code implements (2.3) in Math.ln_matvec/2.

Gate 2 asserts the Jensen gap is strictly positive on a worked example (gap ≈ 0.1845 for B=[[0.7,0.3],[0.2,0.8]], q=[0.5,0.5]).

2.3 Mean-field factorisation (the joint is never built)

The agent maintains a factorised belief q(s_1,…,s_F) = Π_f q_f(s_f). The belief state has size Σ_f N_f (sum of per-factor cardinalities), not Π_f N_f (the joint). For the default 7-factor agent: Σ_f N_f = 4+4+6+3+3+4+5 = 29, while the joint would be Π_f N_f = 17 280. The joint is never materialised; all updates are per-factor.

Gate 5 asserts belief_size == Σ_f N_f and reports 29 vs ∏ = 17280.

2.4 Expected free energy (action) and its decomposition

For a policy π (action sequence), the expected free energy at horizon step τ is

G(π) = Σ_τ E_q[ ln q(s_τ|π) − ln q(s_τ|o_τ,π) ] (epistemic, negative info gain) − E_q[ ln C(o_τ) ] (pragmatic, expected preference). (2.5)

  • Epistemic term: expected reduction in uncertainty about hidden states — drives curiosity/exploration. It is intrinsic; it is not a reward.
  • Pragmatic term: expected log-preference of the outcomes the policy is expected to bring about. C is set by the curriculum/phase (and, at L2, by the strategic option).

Action posterior:

Q(π) = softmax( ln E − γ · G(π) ), (2.6)

where E is the habit prior over actions (agency) and γ is the dynamic policy precision. The chosen action is sampled from Q (exploration preserved), then committed; the habit E is a Dirichlet count strengthened toward what the agent does (idleness excluded, heritably — see §2.7).

Gate 7 asserts G decomposes into finite epistemic + pragmatic parts and Q(π) is a proper distribution.

2.5 Dirichlet learning (no reward)

A, B, and E are Dirichlet-distributed; learning is counting co-occurrences, not gradient-on-reward:

a_post[o,s] = a_prior[o,s] + η · q(s)·[obs = o], (2.7) b_post[s',s] (per action) updated analogously from q(s')q(s), e_post[u] = e_prior[u] + [action = u] (unless u = noop, heritable).

with learning rate η. Expected log-likelihoods used in inference are ψ(a) − ψ(Σ a) (the digamma expectation of ln under a Dirichlet). Gate 1 asserts ψ(x) matches scipy to 1e-6 at anchor points.

There is no value function, no TD error, no policy gradient, no reward — only VFE (perception), EFE (action), and Dirichlet counting (learning).

2.6 Dynamic precision (attention / confidence)

Sensory precision γ_m is retuned from the surprise of what each modality just saw (attention). Policy precision γ is updated from the variance of EFE across policies (Precision.update_policy): sharper when the agent is confident which policy is best, flatter when ambiguous, then clamped to [γ_min, γ_max]. Because Math.softmax subtracts the max before exponentiating and γ is clamped, the policy distribution is numerically stable even under high-stress (high-γ, strong-C) regimes (verified).

2.7 The L2/L1 hierarchy (two selves)

L2 is the same discrete engine instanced a level up and run slower (every 12 L1 ticks). Its hidden factor is the strategic situation {calm, threatened, depleted, social, idle}; its actions are strategic options {forage, build, flee, socialize, rest}.

  • Up (a primitive): the body-computed situation index (an integer 0–4) is L2's observation. No belief crosses.
  • Down (primitives): the chosen option sets L1's empirical priors as absolute preference-override vectors C (idempotent), and a hormone state retunes L1's policy precision γ (stress→sharper) — transiently. The persisted L1 model stays pure (transient γ/C/lr stripped), so memory round-trips across death.

The two selves genuinely differ in timescale: L1 commits within a tick; L2 integrates over many digests with a sticky transition, so the "remembering self" concentrates only under sustained evidence (verified by an entropy-decrease test).

Transition convention (and a fixed defect). B is column-major: col_j = P(next|j). An earlier gen-2 build of the L2 option-transitions was transposed (outer index = next), which Model.new's column-normalisation silently masked — the coarse flee outcome survived only via A+C, while the designed per-option differentiation was scrambled. This was found in audit, fixed (outer index = source), and live-verified: agents now select situation-appropriate options (flee under threat, forage when safe/idle/social) with diverse multi-step intents. A semantic orientation test now guards against regression.


3. Evidence (what is proven, and how to reproduce it)

All commands run from the repo root with Elixir 1.19 / OTP 28.

Evidence Command Result
Core test suite mix test 266 tests, 0 failures
UI test suite cd ui && mix test 11 tests, 0 failures
§16 covenant gates (×2 cards) mix sp.brain.verify all gates pass
Oracle 1e-6 parity mix test test/sp/brain/oracle_test.exs digamma/VFE/EFE match scipy/numpy
No foreign layer (gate 14) mix sp.brain.verify 23 math files foreign-free
Native JIT (gate 15) mix sp.brain.verify emu_flavor == :jit

3.1 The 26-point covenant (enforced gates)

Per compiled card, gates 1–13 (digamma≈scipy; (lnB)s≠ln(Bs); VFE bound; A/B stochastic; mean-field no-joint; purity; EFE decomposition; bounded planning ≡ exhaustive at full beam; hierarchy blanket primitives-only; Designer≡Genome) plus deferred runtime gates 8–10 (blanket σ/α only; lockstep; leakage). Gen-2 adds global gates 14 (no foreign layer in the math namespace) and 15 (native JIT). CI fails if any gate breaks — the covenant is enforceable, not aspirational.

3.2 Live evidence (in the actual game)

Embodied agents on the live server were observed (via the colony snapshot) to:

  • run continuous perception→action cycles (counts in the hundreds), self-healing across in-game deaths (the body reconnects in 4 s);
  • select situation-appropriate L2 options — flee under threat, forage when safe — not a uniform/degenerate choice;
  • emit multi-step plans (e.g. forward → forward → forward, turn → forward → mine) from deep recursive-EFE lookahead;
  • surface emotion (content/grief/anger), stress, and a metacognitive-confidence read on the /stream overlay.

4. What is explicitly NOT claimed (the fences)

  • No reward / no RL. This is a design invariant, not a tuning choice. Falsifiable by search (§5).
  • No qualia, no sentience, no felt experience. The "consciousness functions" (SP.Brain.Awareness: global-availability broadcast, reportability, metacognition) model access and report, not phenomenal experience. The report is the agent describing its computed state. We make no claim about the hard problem. See docs/PHENOMENOLOGY.md.
  • No biological fidelity claim for hormones/emotion — they are parameter-modulation mechanisms (engineering choices), not measured neuro-endocrinology.
  • Not proven optimal. EFE minimisation is a principled objective, not a guarantee of task-optimal behaviour in Minecraft.

5. Falsification protocol — please try to break this

We invite the community to attack any claim. Concrete, actionable tests:

  1. Oracle parity. Re-derive the digamma/VFE/EFE/(lnB)s values independently (your own scipy/numpy/Julia) and compare to mix sp.brain.verify gate outputs. Claim: agreement to 1e-6. Falsify by exhibiting a divergence beyond 1e-6 on any anchor.
  2. No-reward. grep -ri "reward\|q_learning\|td_error\|policy_gradient\|return" lib/. Claim: no reward/RL machinery drives behaviour. Falsify by finding a value/return signal in the action path.
  3. No foreign layer. Inspect lib/sp/brain/*.ex (gate 14). Claim: the math is pure Elixir, no Nx/Rust/NIF/FFI. Falsify by finding a foreign compute call in a math kernel.
  4. VFE bound. Construct adversarial A/D/o and check F ≥ −ln P(o) (gate 3 logic). Falsify by exhibiting F < −ln P(o).
  5. Mean-field. Verify the joint ∏_f N_f is never allocated (gate 5; memory profile a long run). Falsify by showing a joint-sized allocation.
  6. Blanket purity. Inspect the body↔brain protocol and the L1↔L2 messages. Claim: only σ/α and primitive digests/options cross. Falsify by finding a belief/state object crossing a blanket.
  7. Determinism. Same (params, observation, seed) ⇒ same action (gate 6). Falsify by exhibiting nondeterminism with fixed inputs.
  8. Hierarchy responsiveness. Drive sustained "threatened" senses; claim the L2 commits to flee and applies the danger-C override + stress. Falsify by showing it does not respond, or responds to the wrong situation.
  9. Option correctness (the fixed defect). Verify the L2 transition B is column-major and oriented (flee moves a threatened source toward calm) — Strategist orientation test. Falsify by showing scrambled option selection.
  10. Memory across death. Save→load→step; claim the learned model round-trips exactly and keeps learning. Falsify by showing memory loss or a non-round-trip.
  11. On-chip. Run on a non-JIT BEAM; claim the runtime refuses to start (gate 15 / boot fence). On a JIT BEAM, benchmark MC.step throughput. Falsify the "native code" claim by showing the kernels are not JIT-compiled.
  12. Consciousness fence. Attempt to show the Awareness report constitutes evidence of qualia. Claim: it does not — it is access/report only. This is the bounded, honest question we most want stressed.

6. Standing open questions (unresolved; we want data)

  • Does metacognitive confidence climb meaningfully over a long single life as A sharpens? (Early life it reads ~0 by construction — uninformative likelihoods. Not yet observed climbing over many hours.)
  • Does population evolution within kin produce fitness gains across generations in the live game? (Unit-tested with simulated deaths via SP.Runtime.Lineage; not yet observed breeding across real in-game deaths over a long run.)
  • How much of "reported consciousness" do access/report/metacognition reproduce, and where do they provably fall short? (The falsification ledger in docs/PHENOMENOLOGY.md.)
  • Does the L2 "remembering self" yield measurably better long-horizon outcomes than L1-only agents under matched conditions?
  • Structure growth: does letting factors grow their state space pay for itself (better evidence per added state) over long runs?

7. Reproducibility

  • Elixir 1.19.x / OTP 28 (BeamAsm JIT). mix deps.get (core has zero hex deps).
  • Minecraft: a local offline-mode Paper server (FOSS, on your own server; no Mojang login, no cracking). Node + mineflayer under viewer/.
  • mix sp.brain.verify (gates), mix test (suite), mix uni.play (single agent), /stream (the live colony overlay).

This report is an invitation. The system is built to be falsified; the covenant holds because CI breaks when a gate breaks. If you break a claim that CI does not catch, that gap is itself the contribution — please report it.

sha256 26942835aec7a0d8 — of the original file, so what was ingested stays checkable.

Plain — written for this website, not the source document

Written for this website — not the document. This is a plain-language retelling, written to help you meet the document. It is not the source, and it is not evidence. It has not yet been checked by a person. (or choose Precise in the reading-level control above)

An evidence report, written as an open invitation to break it. It sets out what the project claims, how it says you can check each claim, what it deliberately holds back from claiming, and a numbered list of attacks anyone can try.

The system it describes is an agent that plays a real block-building game through a separate body program. It chooses actions by minimising a quantity that combines the value of finding things out with the value of reaching preferred outcomes, and the document states plainly that there is no reward signal and no reinforcement learning anywhere in it.

The long middle is mathematics, written out with the derivations, along with a note about one place where a tempting shortcut would quietly break a guarantee, and a record of a real defect found in an audit and fixed.

The limits matter as much as the claims. A whole section is given over to what is explicitly not claimed: nothing about felt experience, nothing about biological fidelity, nothing about the behaviour being optimal. A closing list of open questions is franker still, since several of them say the thing has not yet been seen.

Plain · written 2026-08-01 by claude-opus-5 · not yet checked by a person · about the document whose sha256 is 26942835aec7a0d8

Clear — written for this website, not the source document

Written for this website — not the document. This is a clearer retelling, written to help you meet the document. It is not the source, and it is not evidence. It has not yet been checked by a person. (or choose Precise in the reading-level control above)

Written to be attacked, and framed that way from the first line. Its own framing says that if a claim survives your best attempt to break it, that survival is the result.

It opens with a one-paragraph statement of the claim. The agent chooses actions by minimising an expected quantity made of two named parts, one for information gain and one for preference, over beliefs maintained by minimising a related quantity during perception. It states that no reward signal and no reinforcement learning appear anywhere. It states that the numerical core is written in one language with no foreign computation layers, and that a two-level hierarchy communicates across a boundary carrying only primitive values. Every numerical kernel is checked against an independent implementation in another language to a stated tolerance, and a set of acceptance gates runs automatically.

An architecture section draws the flow from the world, through the body, into the agent, and back out as a single action. It stresses that only two messages ever cross the body-to-brain boundary and that no belief structure ever crosses. It also states the purity rule: the decision function performs no effects and returns instructions, which the runtime carries out.

The mathematics section is the longest. It derives the perception quantity and shows why it is an upper bound on surprise. It then spends a careful passage on one specific choice: taking the logarithm of the transitions before averaging, rather than after. The two are not equal, and the document shows the direction of the gap and says that the tempting alternative would break the bound. It explains why the joint belief is never built, decomposes the action quantity into its two parts, describes learning as counting co-occurrences rather than following a gradient on reward, and covers how two precision terms are retuned and clamped. A subsection describes the slower strategic level as the same engine run at a longer timescale, and records a transition defect that an audit found, together with the fix and the test that now guards it.

An evidence section lists commands and their results in a table, then describes what embodied agents were observed doing in the live game, including recovering after in-game death and choosing options that suit the situation rather than choosing uniformly.

The limits follow. No reward and no reinforcement learning is stated as a design invariant rather than a tuning choice. There is no claim of felt experience: the functions with suggestive names model access and report, and the document says explicitly that it makes no claim about the hard problem. There is no claim of biological fidelity for the emotion and hormone machinery, which is described as parameter modulation. And there is no claim that the behaviour is optimal.

The falsification protocol is a numbered list of concrete attacks, each with a claim and the exact observation that would refute it. The document says the limit drawn around experience is the question it most invites readers to stress.

A short section of standing open questions follows, several of which say plainly that something has not yet been observed, and the page closes with what you need to reproduce the work.

Clear · written 2026-08-01 by claude-opus-5 · not yet checked by a person · about the document whose sha256 is 26942835aec7a0d8