Enkidu Alive

Geometric attention on S³ — an agent that forages, builds shelter, and survives through algebraic closure alone
Hunger
0.00
Cold
0.00
Drive: rest
Tick: 0 | Meals: 0 | Camps: 0
Pos: (0,0) | σ: 0.00
Env: thriving | Food: 0
Weighs hunger and cold equally.
A mind from geometry alone

The idea

Enkidu begins at home, fed and warm, with every internal measure at zero — a state we call identity. The world disturbs that balance continuously: hunger accumulates with time, and cold accumulates with distance from shelter, so the longer he is out and the further he roams, the larger these two distances from identity grow. Because each distance points back toward the thing that would resolve it — food for hunger, shelter for cold — the environment itself produces a gradient simply by pulling him away from equilibrium. Enkidu does not learn this gradient; he inherits it from the geometry of the space he moves through.

One function, all behavior

His entire decision-making is a comparison: whichever distance is larger determines the target, and he takes the step that most reduces it. When hunger outweighs cold he walks toward food; when cold outweighs hunger he heads for shelter. Applied tick after tick, this single comparison produces the foraging trips, the direct paths home that never retrace the outbound route, the hesitation when both drives are nearly equal, and the quiet rest at identity once both distances fall back to zero.

Tool use changes everything

In Scarce mode, press “Teach him to build shelter” and watch what happens. Whenever Enkidu finds himself too far from any existing shelter he stops and builds one where he stands, creating a new point in the world where cold resets to zero. Over time these camps form a network along his foraging routes, extending the range he can survive — the same strategy an animal uses when it chains dens across a territory.

Scarce mode No shelter With shelter Killer
Cautious 49% 100% hunger (72%)
Balanced 49% 100% cold (81%)
Bold 31% 90% cold (100%)

N=1500 runs, 600 ticks each. Thriving mode: 99% survival. Bold pays a 10% cost for risk-taking even with tools.

Interact

Click the grid to drop food. Help him eat.
Shift+click to place a shelter. Give him warmth.
Or teach him to build his own and watch him survive.

For those familiar with the Free Energy Principle

Generative modelquaternion composition on S³
Prior (expected state)identity element = homeostasis
Free energygeodesic distance from identity (σ)
Variational stepcollapses to geometry: pick the move that most reduces σ
Precision weightinglarger drive selects the active channel
Niche constructionnew shelter = new fixed point in state space

Why this matters

A transformer learns attention through millions of parameters trained on billions of tokens. Friston’s Free Energy Principle describes the same process through variational calculus. Here the algebra of S³ computes both directly: compose, measure distance from identity, act on the largest. The environment writes the gradient by disturbing equilibrium, and the geometry supplies the way home. Everything you see on screen — the foraging, the hesitation, the shelters extending his range — emerges from that single operation applied to a world that refuses to leave him in peace.

Advanced ▾