Conscious Agents

An executable model of Hoffman's conscious-agent formalism, in Node.js and Python

Spacetime is not the ground of reality but an interface; the ground is a network of conscious agents.

The conscious-realism thesis (Hoffman & Prakash, 2014), paraphrased

What Makes a Conscious Agent?

(X, G, P, D, A, N)

The Six-Tuple

An experience space, an action space, perception, decision and action kernels, and a counter. FormalConsciousAgent implements the tuple exactly, including the joint dynamics, stationary distribution and mixing.

I

"I" Lock

Learning agents also model their own dynamics: a Markov chain over their own self-observations. The "I" locks when that chain has a stable attractor, never in structureless worlds, and unlocks if the attractor dissolves.

⊗

Combination

Agents combine into higher-order agents. ⊗ is associative and commutative, fuse() inverts it exactly, and the independent product M₁ ⊗ M₂ is available as a prior.

CHSH

Bell Test Through the Headset

Grant a network of agents behind spacetime. The best Bell value an observer can see is exactly 2 + 2·δ(Qᵏ), set by how fast the network mixes. It reaches the PR box (4), passes the quantum limit, and fades to classical. Nothing in the kernels singles out quantum correlations (experiment 13).

dₛ

Spacetime in the Headset

An agent that sees only opaque symbols recovers its world's dimension from experience. Under ⊗, dimensions add exactly; interaction binds them and creates an arrow of time. Geometry is inherited from agent dynamics, not generated (experiment 14).

PS

Time in the Traces, and at Infinity

An observer that sees part of the network experiences exactly its trace chain, with its own clock and its own arrow of time (experiment 15). As n → ∞, an agent's clock converges to Einstein's proper time; every finite network keeps a preferred frame (experiment 18).

σ

Trace Logic & Decorated Permutations

Hoffman's map to the combinatorics behind the amplituhedron matches the paper's own table (14 permutations for 3-state agents, not the stated 17). It discards probabilities and depends on how experiences are numbered. Trace logic is locally Boolean and globally not a lattice (experiment 16).

ψ

Quantum Agents

With quantum channels as kernels, combined agents reach the quantum limit 2√2 exactly, never more, and cannot signal. The quantum structure does this work. Markov agents are the fully decohered case: CHSH drops to exactly 2 (experiment 17).

=

Reproducible, Two Languages

Seeded agents produce identical numbers in Node.js and Python, checked step by step in both test suites. Every experiment has controls, and claims that did not survive are listed openly in the Q&A corrections.

In Code

from conscious_agent import ConsciousAgent
from conscious_agent.worlds import CoinTossWorld

world = CoinTossWorld(n_coins=4)
agent = ConsciousAgent(agent_id="my_agent", seed=1, world=world)
agent.run(2000)
print(agent.ergodic_stats()["lock"])  # lock state and criteria

Available Implementations

Python

v3.0.0. Full implementation on numpy and scipy.

pip install "git+https://github.com/ben42-01/hoffman-agents.git@main#subdirectory=hoffman-agents-python"

Node.js

v3.0.0. No dependencies, and identical results to Python.

npm install github:ben42-01/hoffman-agents

React Native

v1.0.0. Mobile adapter for iOS and Android. It still implements the 2.x math.

npx expo install conscious-agent-react-native

Documentation

    Select a document from the sidebar

    All documentation is rendered directly from the project's markdown files.

    How a conscious agent works

    Hoffman & Prakash define a conscious agent as a six-tuple (X, G, P, D, A, N): an experience space X, an action space G, and three Markov kernels. P maps world and experience to the next experience, D maps experience to action, and A maps action and world to the next world. N counts completed cycles. This page runs one agent step by step. Every number is computed from the matrices shown, with a seeded random number generator.

    1 Perceive P
    2 Decide D
    3 Act A

    Step 1 · Perceive

      Change the agent

      Each slider changes one kernel. The long-run behaviour below is recomputed exactly and the run restarts.

      The long run: one Markov chain on experience × world

      Put the three steps together and the pair (experience, world) evolves as a single Markov chain:

      Q((x, w), (x′, w′)) = P[w](x, x′) · Σg D(x′, g) · A[g](w, w′)

      When Q is ergodic, it has one stationary distribution π = πQ, and the ergodic theorem says the fraction of time spent in each state converges to π. Run cycles above and watch it happen.

      Time in each state (x|w): exact π vs this run
      exact π simulated
      Distance between this run and π (total variation)

      Combining agents: the product ⊗

      Two agents that perceive the same world independently combine into one agent. Its experience space is the product X × X, and its perception kernel is the Kronecker product P ⊗ P: every entry of the first matrix multiplies a full copy of the second. Shown here for w = left, with the current settings.

      P[left]
      ⊗
      P[left]
      =
      P[left] ⊗ P[left] (4 × 4; shading marks the blocks)

      In the library, independent combination adds dimensions exactly: three combined one-dimensional agents form a three-dimensional space (experiment 14). Interaction between agents is what breaks the product structure.

      What this shows, and what it does not

      The six-tuple is exact mathematics. Running it shows what the formalism implies: which long-run behaviour a given set of kernels produces, how quickly it is reached, and how combination composes agents. It does not show that the agent is conscious, which is a question about the theory, not something a simulation can settle. The library's experiments ask sharper questions. Experiment 13 asks which correlations a network of agents behind spacetime can produce; experiment 14 asks where dimension in an observer's experience comes from.