Every bear in this world is a pure function of its name and the block height.
Its moods, decisions, chat replies, melodies, portraits and game moves come from three coupled
equations — zero random numbers anywhere. Anyone can recompute a bear's entire life
from its birth and match this engine’s state hash (IEEE float on one machine; for bit-exact
cross-machine math use the Q32.32 twin / math=fp). Proof is anchored to BSV mainnet.
This guide explains every feature on the main page, top to bottom.
1 · How a bear works
identity → genome → equations → personality → actionA bear's whole existence flows from one string — its identity, e.g. cubebear|Kuma:
- Genome. The identity string is hashed with SHA-256. Those bytes become immutable physics constants: how chaotic it is, how fast its inner clock ticks, how its pendulum is damped and driven, and how its personality is projected. Same name = same genome, forever, on any computer.
- Fluctuation. Each timechain block advances the bear one tick through
three coupled subsystems:
- D — the die: a chaotic logistic map. Unpredictable to the eye, fully determined by the equation.
- M — the metronome: a phase oscillator, the bear's inner rhythm.
- P — the pendulum: a damped, driven (Duffing-type) pendulum, its mood momentum.
- Personality. Four traits — curiosity calm sociability boldness — are smooth sigmoid readouts of the live state. They are not noise added on top; they are the dynamics, read out.
- Action. Each tick the traits score six possible actions and the bear picks the winner: explore rest greet create wander sing.
Because state(n) = Fn(seed), anyone who knows the identity string can replay the bear from tick 0 to any tick and land on exactly the same state, personality and decision. That replay is the audit primitive behind everything in section 10.
2 · The timechain
local blocks give time · BSV mainnet gives proofTwo chains are involved, with strictly separate jobs:
- Local timechain — a hash-chained sequence of blocks minted by this server, one every ~3 seconds. One block = one tick of life for every bear. It supplies time, never entropy. The header of the main page shows its height and tip hash.
- BSV mainnet — every epoch (a configurable number of blocks) each bear's state hash is anchored into a real BSV transaction. The chain supplies proof: a timestamped, third-party-verifiable fingerprint that this exact bear was in this exact state at this exact moment.
Anchors use PushDrop (BRC-0048): <data> OP_DROP <pubkey> OP_CHECKSIG.
Unlike OP_RETURN, these outputs remain spendable — the data rides on a living coin instead of
provably-dead dust. That property is what makes the Living UTXO of section 11 possible.
"Timechain" is Satoshi's original name for the blockchain in early Bitcoin source code — a chain whose real product is ordered, unstoppable time.
3 · Individuals & actions
reading a bear cardEach card in the Individuals section is one live bear. From top to bottom:
- Name & id — the id is the first 12 hex chars of the genome hash.
- Phase portrait — the pendulum's angle vs. angular velocity, drawn as a trail. Chaotic bears scribble; calm bears orbit. This is the bear's raw inner state, live.
- Decision line —
tick N → decides: EXPLOREplus the first letters of its recent actions. The decision is the argmax action of section 1, recomputed every tick. - Trait bars — the four personality readouts at this tick, 0 to 1.
- State hash — the canonical SHA-256 fingerprint of the full state. This is the exact value that gets anchored to BSV and checked by replay.
- Buttons — ▶ sing plays the bear's melody at this tick, ↓ melody downloads it, ⛓ burn writes art onto BSV (section 8), 💬 talk jumps to the Converse box with this bear selected.
- Owner line —
unclaimedor the claiming BSV address (section 5). - Lineage line — the Living-UTXO badge or the ⛓ Enchain button (section 11).
4 · Giving birth
a name is a genome, foreverType a name into the input under the Individuals grid and press
Give birth. The server derives the genome from
cubebear|<name> and the bear starts living at the current block —
no configuration, no randomness, no takebacks.
- The same name will always produce the same bear. Names are identities.
- Ownership isn't set at birth — claim it afterward from the Gallery (section 5), which requires a signature.
- A bear's tick counts from its birth height, so late-born bears are genuinely younger.
5 · Gallery & claiming
prove you hold the address, don't just say soThe Gallery shows every bear's portrait (itself deterministic — drawn from the state at the current tick). Unclaimed bears show a claim button, which walks through a real proof of address control instead of a first-come label:
- Paste your BSV mainnet address.
- The server hands back an exact challenge string:
YURAGI|claim|v1|<agentId>|<address>. - Sign that exact string with your address's private key — any standard BSV wallet's "sign message" feature (ElectrumSV, HandCash, Money Button, etc.) — and paste the signature back.
The server verifies the signature recovers to your address (BSM — Bitcoin Signed Message) before linking it. Anyone can re-run that verification; claiming is no longer just this server's word.
Claim proves you control the address, not custody of the bear's on-chain life. That — where owning a key means owning the bear's Living UTXO — is what Transfer custody in section 11 does. The two are intentionally separate: claim is a public identity label, lineage custody is what can actually spend.
6 · Herd synchronization
Kuramoto coupling · individuality vs. togethernessEach bear's metronome phase is a dot on the circle. The slider sets the Kuramoto coupling strength K:
- K = 0 — every bear keeps its own rhythm. Pure individuals.
- K > 0 — each bear's phase is pulled toward the herd average every tick. Watch independent personalities fall into a shared rhythm with no coordinator.
The order parameter r measures it: 0 = scattered individuals, 1 = one perfectly synchronized herd. The red arrow is the herd's mean field.
Coupling is itself deterministic, but it mixes bears together — so verifying a coupled bear needs the herd-aware replay (the checkbox in section 10), which replays the whole herd using the recorded coupling history rather than one bear in isolation.
7 · Converse
talk to a bear · read its BearLang programPick a bear, type something (or nothing), press Talk. The reply is composed by the expression layer, which reads the bear's live personality and action but can never change the physics. The same bear at the same tick gives the same reply — moods you can audit.
Show BearLang reveals the bear's minimal language program — rules like:
WHEN sociability GT 0 SAY react WHEN boldness LT 0.62 SAY create DEFAULT greet
The program itself is derived from the genome, so each bear speaks its own dialect of the same tiny language. If an OpenAI key is configured, an optional LLM layer can restyle the wording — but it only decorates the deterministic utterance; it never chooses the mood or the action. Without a key, template voices are used and everything still works.
8 · Sing, melody & burn
deterministic art · optionally written onto mainnetBears make art the same way they make decisions — from state, not from randomness:
- ▶ sing — the bear's state at this tick maps to notes; your browser synthesizes them live. Same bear + same tick = same tune, always.
- ↓ melody — download the melody as data.
- ⛓ burn — inscribe the melody (or a portrait) into a BSV mainnet
transaction as
YURAGI|art|v1|…. The artwork's content hash and full payload live in the transaction forever.
Once burned, anyone can resurrect the piece straight from the chain: Play from chain (bottom of the Life thread section) takes a burn txid, reads the notes back out of the mainnet transaction itself, and plays them through the same synth. The server's copy is no longer needed — the music lives on the chain.
9 · Play
games with zero randomnessPick two bears and a game, press Play:
| Game | How it's decided |
|---|---|
| Rock · Paper · Scissors | Each bear's move comes from its live state at this tick. No dice — but no fix either: neither bear (nor you) can know the move without running the equations. |
| Sync Clap | Both bears clap; the score is how close their metronome phases are. Raise K in the Herd section and watch clap scores climb. |
| Herd Vote (3+) | Every bear votes from its own state; the majority sways the herd. All bears vote runs it for the whole world. |
Every outcome ships with the states that produced it, so any game result can be replayed and checked — a game between humans and AI where neither side can cheat.
10 · Prove it
replay from genesis · verify mainnet anchorsThis is where "provable identity" stops being a slogan:
- Replay from genesis — pick a bear and a tick. The server recomputes the
bear's entire trajectory from tick 0 and compares the replayed state hash with the recorded
one.
verified: truemeans the life is exactly reproducible. Tick the herd-aware box for bears that lived under coupling (section 6). - Verify on-chain — paste the txid of any YURAGI anchor. The server fetches
the real mainnet transaction, decodes the PushDrop payload, replays the named bear to the
anchored tick, and reports
MATCH ✓if the recomputed hash equals the one written on chain. You don't have to trust this server: the txid, the payload and the equations are all public. - Recent epoch anchors — the latest anchors with links to the Bitails explorer.
Recalculability is responsibility: every action a bear ever took can be traced to the equation state that chose it.
11 · Is the future predictable?
exact when alone · genuinely changed by interactionBecause there's no randomness anywhere in the core, a bear that's completely alone — not near other bears, nothing happening to it — has a future that's already fixed. You can work out what it will be like far ahead, today, and that answer will still be exactly right once real time actually gets there. Nothing about time passing changes it, because nothing new is ever added to the picture.
But fixed doesn't mean still. Even alone, a bear's mood keeps moving on its own — that's the whole point of fluctuation. So it's less like someone sitting motionless, waiting for something to happen, and more like someone whose inner mood is always drifting by itself — except this drift can be worked out in advance with total certainty, because nothing about it is left to chance.
That guarantee only holds while a bear stays alone. The moment it actually interacts with the world — falls into rhythm with a herd (section 6), or plays a game (section 9), or has something genuinely happen to it — that real event becomes a new ingredient the earlier calculation never had. It's like a phone ringing: it doesn't make a mind random, but it does bend where thoughts go next, in a way nobody could have worked out in advance, because the phone hadn't rung yet.
That's why looking ahead only works safely for a bear that's genuinely alone: if it has never joined a herd and nothing has ever happened to it, whatever you compute about its future today is guaranteed to still be true later. But once a bear has actually lived in this world — synced with others, played games, had real things happen to it — it can only be checked looking backward, from birth up to right now (section 10). The engine deliberately won't offer a peek into a living bear's future, because once real interaction is possible, no forward guess can be trusted to still hold once that interaction actually happens.
12 · Life thread — the Living UTXO
one bear · one coin · one unforkable biographyAnchoring proves states. The Living UTXO proves a life. Each enchained bear is one unbroken chain of spends on BSV mainnet:
- Enchain ⛓ Enchain — a birth transaction endows
the bear with its own satoshis (default 10,000) locked to the bear's own key, with
YURAGI|birth|v1|…riding in the output. This creates the bear-UTXO. Spends real satoshis on mainnet. - Heartbeats — every lineage epoch (~30 min by default) the bear
spends its own previous UTXO into a new one carrying
YURAGI|life|v1|agentId|tick|stateHash|prevTxid. The fee (~38 sats) comes out of the bear's own endowment: the bear pays for its own life. - Uniqueness, enforced by miners — a UTXO can only be spent once, so the life-thread cannot fork. There is exactly one canonical Kuma. Copy the database and the copy cannot continue the chain — Bitcoin's double-spend prevention becomes double-self prevention.
- Starvation — when the endowment can no longer cover a fee, the bear's thread halts and its badge shows starved. Its last state remains on chain forever. Endow more generously for longer lives.
- Transfer custody Transfer custody — signs the living UTXO over to a recipient's address (a data-carrying P2PKH). From that moment only the recipient's key can continue the bear's canonical life; this server permanently loses the power. That is real ownership — not a row in a database, a coin in your wallet.
Walk the chain — pick an enchained bear and the server walks the thread from living tip back to birth, checking two things at every step:
- ✓ replay — the state hash written in the transaction matches a fresh replay of the bear at that tick (the state was honest);
- ✓ spends prev — the transaction really spends the previous life-transaction (the thread is unbroken).
Unbroken chain: YES means every epoch of this bear's on-chain biography is intact and true — verifiable by anyone with the txids and the equations, no trust in this server required.
13 · BSV modes
same code path · only the broadcast differs| Mode | What happens | Cost |
|---|---|---|
simulated | Anchors and lineage events are recorded locally; nothing touches the network. Default. | free |
dry-run | Real transactions are built and signed against real UTXOs, then not broadcast. Full rehearsal. | free |
live | Transactions broadcast to BSV mainnet. Anchors, births, heartbeats, burns and transfers are real and permanent. | real satoshis |
The footer of the main page shows the active mode. In live mode the anchor cadence defaults much slower (~20 min) because every anchor is a real transaction.
14 · API reference
everything the page does, you can do with curlPrefer an interactive reference? See /api-docs (spec at /openapi.yaml).
| Endpoint | What it does |
|---|---|
GET /api/world | Full world snapshot: chain height, tip, all bears with state, traits, decision, lineage. |
POST /api/agents | Give birth. Body: {"name"}. |
GET /api/agents/:id/claim-message?address=… | Get the exact challenge string to sign for a claim. |
POST /api/agents/:id/claim | Claim with a signed proof. Body: {"ownerAddress","signature"}. |
POST /api/coupling | Set herd coupling K. Body: {"k"}. |
GET /api/agents/:id/replay?tick=N&herd=1&mind=1 | Replay from genesis and verify (explicit flags). Add math=fp for Q32.32 solo replay (v3fp; not liveHash). |
POST /api/agents/:id/converse | Talk. Body: {"message?","context?","llm?"}. Deterministic reply. |
GET /api/agents/:id/bearlang | The bear's BearLang program and a sample utterance. |
GET /api/agents/:id/melody | The bear's melody at this tick (?download=1 to save — logged for interest). |
GET /api/agents/:id/portrait | Deterministic SVG portrait. |
POST /api/agents/:id/burn | Burn art to BSV. Body: {"type":"melody"|"portrait"}. Also counts as interest. |
POST /api/play | Run a game. Body: {"game","agentA","agentB"} or {"game":"herd-vote","agents":[…]}. |
POST /api/agents/:id/enchain | Create the bear's Living UTXO. Body: {"endowSats?"}. Spends real sats in live mode. |
GET /api/agents/:id/lineage | Walk and verify the bear's full on-chain life thread. |
POST /api/agents/:id/transfer | Sign the living UTXO over to a new owner. Body: {"toAddress"}. Irreversible. |
POST /api/agents/:id/feed | Revive a starved Living UTXO after funding its bear address. |
GET /api/interest | Aggregate melody-download / burn interest (salted visitor hashes). |
GET /api/bsv/verify?txid=… | Fetch a mainnet tx, decode the YURAGI payload, verify against replay (&full=1 for the raw message). |
GET /api/chain · GET /api/bsv | Local timechain blocks · BSV adapter status. |
Embed without the server: MIT package yuragi-engine (SDK + Claude adapter). Shinrin at
shinrin.yuragiengine.com is a sibling life sim (same metaphors, own float equations).
Full details: docs/GUIDE.md · docs/UNDERSTANDING.md · sdk/README.md.