The mathematics of being aware of others
"Aware of others" is not one thing. The box implements it as three nested levels of belief,
and the depth control above switches the whole population between them so you can watch the
behavior change.
Level 0
Reacts to others
An agent senses a neighbor and responds from its own fixed disposition only. It keeps no
record of who did what. Mathematically it is a function of the present state and nothing else —
awareness in the weakest sense, the kind a thermostat has.
Walkthrough. Aria (cooperativeness 0.80) meets Bram (0.25). Aria cooperates
because 0.80 is her nature — she would cooperate with anyone, and she will cooperate with Bram
again no matter how often he defects, because nothing is recorded. Bram defects on the same
coin-flip of temperament. At Level 0, energy — not learning — decides who survives.
Level 1
Models others
Each agent keeps, for every other agent, a probability P(cooperator) and revises it
with Bayes' rule after each observed action. Decisions are then made against the
model, not the agent: cooperate with the probably-kind, guard against the probably-hostile.
Walkthrough. Same pair, one level up. Bram defects; Aria's belief in Bram runs
through the formula below: 0.50 → 0.17. Next meeting her cooperation chance drops
by 0.34 (belief under 0.35) — she guards. Meanwhile Bram watched Aria cooperate, so his belief in
her rose to 0.77, and his cooperation chance rises by 0.22 (belief over 0.62).
The beliefs, not the temperaments, are now driving the encounter.
Level 2
Models others modeling it
The recursive step. Agent A also maintains BA( BB( A is a cooperator ) ) —
its estimate of B's belief about A. That estimate is a reputation A can protect, repair, or
spend: a trusted deceiver defects precisely because it expects to be believed. Deception and
reputation management only exist at this level.
Walkthrough. At Level 2, Aria also tracks her reputation with Bram — her estimate
of his belief in her, which stands at 0.77 after she cooperated. If Aria were a deceiver
(deceptiveness above 0.35), that 0.77 crosses the exploit threshold of 0.68: she would signal
cooperation and defect, spending the trust for +10 energy. If instead her reputation sagged below
0.35 and she is no deceiver, she cooperates extra (+0.18) to repair it. Reputation becomes
a currency — earned slowly, spent in one move, repaired on purpose.
The belief update (Bayes' rule)
After watching agent B cooperate or defect, agent A revises its belief that B is a
cooperator type. Cooperators cooperate with probability 0.85; defector types still
cooperate 0.25 of the time (camouflage), which is what keeps the inference honest:
P(C | action) = P(action | C) · P(C) ⁄ [ P(action | C) · P(C) + P(action | D) · P(D) ]
Worked example: prior P(C) = 0.50, B cooperates →
0.85 × 0.50 ⁄ (0.85 × 0.50 + 0.25 × 0.50) = 0.77.
One defection from the same prior drops it to 0.17. Bad acts are more
informative than good ones — which is why trust in the box is slow to build and fast to lose,
exactly as the formula dictates.
Chain two observations and the asymmetry compounds: 0.50 → (B cooperates) → 0.77
→ (B defects) → 0.40. The defection more than erases the cooperation, because a
defection is the more informative act — its likelihood ratio is 0.15 ⁄ 0.75 = 0.2, against
0.85 ⁄ 0.25 = 3.4 for cooperation. One bad act outweighs one good one; that is not a mood, it is
the likelihoods. The event log shows this before → after pair on every encounter, so you can
watch individual beliefs move.
The "mean belief error" stat above compares every agent's belief about every other against
that agent's true disposition. Watch it fall as the population learns — and spike when a
deceiver is camouflaging well.
The encounter (a prisoner's dilemma)
When two agents come within range, each first broadcasts a signal of intent, then acts.
With deceptive signaling allowed, a signal can lie. Payoffs are in energy:
| I play \ They play | Cooperate | Defect |
| Cooperate | +6 / +6 | −5 / +10 |
| Defect | +10 / −5 | −2 / −2 |
Defection pays more against a cooperator (+10) than cooperation does (+6) — the classic
temptation. Mutual cooperation is still the best joint outcome, so whether the box settles
into trust or into a suspicion spiral depends on how well the belief models track reality.
The contraction, worked by hand
Pairwise Bayes treats every neighbour as independent evidence. The contraction does not: it
enumerates every joint configuration of a small core of neighbours and weights each one
by all the beliefs and couplings at once. A concrete pass — an agent holds beliefs
X = 0.80, Y = 0.30, Z = 0.60 about three neighbours, and has witnessed X and Y act alike often
enough to earn a coupling κXY = +0.45 (their behaviour correlates). All 23 = 8
configurations, weighted by the product of the unary beliefs times (1 + κ) when X and Y agree,
(1 − κ) when they differ:
| X Y Z | Weight | X Y Z | Weight |
| 1 1 1 | 0.2088 | 0 1 1 | 0.0198 |
| 1 1 0 | 0.1392 | 0 1 0 | 0.0132 |
| 1 0 1 | 0.1848 | 0 0 1 | 0.1218 |
| 1 0 0 | 0.1232 | 0 0 0 | 0.0812 |
The weights sum to 0.8920. Summing the weights of every configuration where a variable is 1 and
dividing gives the joint marginals: X = 0.6560 ⁄ 0.8920 = 0.74,
Y = 0.3810 ⁄ 0.8920 = 0.43, Z = 0.60. Read what happened: Y's
belief rose from 0.30 to 0.43 without Y doing anything — Y is coupled to X, X looks like a
cooperator, so some of X's credit flows along the coupling. Z, coupled to nobody, is untouched at
0.60. The box then blends each marginal in at 55% weight (X stored as 0.76, Y as 0.37), so a single
contraction nudges beliefs instead of whipsawing them. The cost of this pass: 8 configurations ×
(3 unary factors + 1 coupling) = 32 multiply-adds — the same counter the inspector
reports after every real contraction, and the number that grows as 2k when you raise the
depth slider.
Borrowed machinery — four methods from a deterministic DLP proof
In November 2026, Liu, Zhang & Ren published a deterministic, subexponential algorithm for the
discrete logarithm problem, built from four distinctive techniques. Each one has a working analogue
in this box — not as decoration, but as the actual mechanism the controls above switch on.
| Paper technique | What it does in the proof | Its analogue in the box | Control |
| Exact tensor contraction | Evaluates conditional sums over a Boolean tensor network exactly, no sampling | Joint belief marginals over a neighbour core, enumerated over all 2k configurations | Depth slider |
| Method of conditional expectations | Builds the factor basis choice by choice, keeping a potential Φ from rising, until ≥ 7/8 of the group is covered | Seeded, replayable runs; every placement chosen to minimize the arena's staleness potential | Deterministic mode |
| Counterexample separation | Witnesses separate false candidate tables; a nonnegative filter keeps evidence from cancelling | Agents steer into test encounters that can falsify confident beliefs; witness counts only ever rise | Levels 1–2 |
| Terminal-preserving partial contraction | Contracts the low-degree core to bounded depth while Θ(b) boundary terminals stay exact | Core capped at k neighbours, off-core beliefs compressed to a 0.1 grid, reputation boundary kept at full precision | Depth slider |
Method 1 · Tensor contraction
Beliefs inferred jointly, not one at a time
The paper evaluates its conditional sums exactly by contracting a Boolean tensor network
instead of sampling. Here, after each encounter an agent contracts a small factor graph over its
social neighborhood: unary factors are its pairwise beliefs, and pairwise factors are estimated
from encounters it witnessed where two others acted together — behavior in a shared
encounter is not independent evidence, because a defection may have been defensive. The joint
marginals come from enumerating all 2k configurations of the core; the inspector shows
the core members, the configuration count, and the multiply-add cost of the last contraction.
Method 2 · Conditional expectations
Deterministic mode — coverage by construction
The paper builds its factor basis choice by choice, each pick keeping a potential Φ from rising,
until the sumset provably covers at least 7/8 of the group — with zero random bits. Deterministic
mode above does the same to the arena: a seeded generator makes the run replayable, and every
pellet or spawn placement is chosen from seeded candidates to minimize total cell staleness.
Coverage — the share of the arena's 36 cells served recently, shown in the stat strip — is driven
up by the potential instead of being left to uniform chance. Same seed, same box.
Φ(t) = Σ over 36 cells of staleness(cell) — place each pellet in the candidate cell that cuts Φ most
Concretely: every tick, each of the arena's 36 cells ages by one. A pellet resets its cell to
zero. In deterministic mode each spawn draws 10 seeded candidate positions and keeps the one in
the stalest cell — the placement that reduces Φ the most, the exact derandomization move the
paper makes when it fixes each basis element greedily. Coverage in the stat strip is the share of
cells served within the last 900 ticks; watch it climb under deterministic placement and wander
under random placement (Experiment 3 measures the gap).
Method 3 · Counterexample separation
Witnesses that falsify false beliefs
The paper separates false candidate logarithm tables with witnesses, using a nonnegative filter
polynomial so evidence from different witnesses can never cancel out. In the box, a confident
belief is a candidate false table. Agents steer toward its subject to force a test encounter; when
the observed act contradicts the confident belief, a falsifying witness is recorded. Witness
evidence only ever accumulates — the counter never decreases — and a confident belief that stops
being wrong is counted in the stat strip as a false belief eliminated.
Worked case: an agent holds a confident 0.85 belief that Bram is a cooperator, but Bram's true
cooperativeness is 0.30 — a candidate false table. The agent steers toward Bram (the dashed amber
line in the arena) until a test encounter happens. Bram defects. That single act is a falsifying
witness: the witness counter rises by one, and Bayes drags the belief 0.85 → 0.53
in one step — out of the confident zone entirely. Because witness evidence is a count that never
decreases, later camouflage cooperation can rebuild the belief only through the same slow
likelihood climb anyone else faces; the falsification itself is never un-happened.
Method 4 · Terminal-preserving compression
A reasoning budget with an exact boundary
The paper's lookup tensors exceed its contraction degree limit, but only Θ(b) boundary wires
exist — so it contracts the low-degree core to a bounded depth and keeps the boundary terminals
exact. The contraction-depth slider is that budget: the joint core is capped at k neighbors
(2k configurations), beliefs outside the core are compressed onto a coarse 0.1 grid,
and reputation — what an agent estimates others believe about it, the boundary of its network —
is always stored at full precision. The live tradeoff, belief error against average contraction
cost, is printed under the slider.
The depth tradeoff, measured
Raising the contraction depth multiplies the cost of every inference — the configuration count
doubles per step and each configuration carries more factors, so the measured average climbs from
8 multiply-adds at depth 2 to 415 at depth 6 — while the accuracy it buys is an empirical question. This table is not
illustrative: it is the actual outcome of the deterministic run (seed 42, Level 2, deception on,
3,000 ticks) at each depth setting, reproducible from the Guided experiments panel.
| Depth | Core ≤ | Configs 2^k | Avg multiply-adds / contraction | Belief error at tick 3,000 |
| 1 | — (no contraction) | — | 0 | 0.45 |
| 2 | 2 | 4 | 8 | 0.41 |
| 3 | 3 | 8 | 25 | 0.32 |
| 4 | 4 | 16 | 67 | 0.43 |
| 5 | 5 | 32 | 169 | 0.48 |
| 6 | 6 | 64 | 415 | 0.48 |
The honest reading: on this seed the cheapest settings are not the most accurate, and the most
expensive are not either. Depth 3 hits the sweet spot; by depth 6 the contraction is mostly
re-deriving what pairwise Bayes already knew, at 64 configurations a pass — and because beliefs steer
behaviour, the deeper reasoners also change the world they are measuring, which can push error back
up. That is the real accuracy/cost tradeoff of bounded joint inference, and it is why the budget is
a slider rather than a fixed maximum.
Honest limits
Behavioral awareness is not inner experience. The agents
pass every behavioural test this page can set — they model, predict, deceive, and repair reputations —
and none of that settles whether anything is felt inside. The simulation demonstrates the arithmetic
of mutual modeling; it makes no claim about consciousness, and neither should its reader.
Beliefs are scalars. Each agent stores one number per
neighbour — P(cooperator). Real social cognition tracks why someone acted (provoked?
desperate? mistaken?), and this box cannot: a defensive defection and a predatory one enter the
formula identically, which is exactly the bias the coupling factors only partly correct.
Observation is perfect, the world is tiny. Witnesses within
earshot see true actions with no noise, payoffs are fixed and known, and the joint core caps at six
neighbours because 2k is unforgiving. Real deployments of these ideas — fraud detection,
negotiation agents, multi-robot coordination — add learned models, partial observability, and
validation against real data before anyone trusts the output.
Honesty about the source: the paper's headline result is conditional. Its deterministic
DLP algorithm assumes an unrefereed OpenAI preprint claiming the Exponential Time Hypothesis is false;
if that premise falls, the theorem falls with it, and the Lean verification claimed for the proofs has
not been independently checked. The four methods, though, are sound techniques that stand on their own —
which is why they were worth transplanting. This page borrows the machinery and makes no claim about
the paper's conclusion.