How it works

A small brain, wired to a token.

A dog lives in a yard. Inside it runs a simulated brain of 288 spiking neurons. Buys, sells, new holders and whales reach that brain as senses; the neurons fire; the most active group decides what the dog does. Nothing is scripted: the same event can make it play one day and hide the next, depending on how hungry, tired or scared it already is.

The loop

Token eventsbuy Ā· sell Ā· whale… Senses48 neurons Spiking brain288 neuronsfires, competes Actioneat Ā· play Ā· hide… Bodyneeds change needs feed back in as drives Ā· feeling better = reward → learning
  1. Token events buy Ā· sell Ā· new holder Ā· whale
  2. Senses 48 neurons light up
  3. Spiking brain neurons fire and compete
  4. Action the strongest group wins: eat, play, hide…
  5. Body needs change, and feed back in; feeling better rewards the brain, so it learns

The brain

Each neuron is a leaky integrate-and-fire cell: it collects input, slowly leaks it away, and when it crosses a threshold it fires a spike and resets. Spikes travel along synapses to other neurons, pushing them up (excitatory) or down (inhibitory). The simulation runs in 1 ms steps, in your browser.

The action groups inhibit each other, so one wins at a time. A dog does not eat and run away at once. The winner has to beat the current action clearly, and hold a moment, so the dog does not flicker between behaviours.

It learns

The dog keeps a running sense of how it feels: full belly, joy, energy, minus fear. When that improves, a dopamine-like signal strengthens the sense→action connections that were active just before. Petting it and then playing makes it more likely to play when petted again. The changes are small and bounded, so it never runs away with itself.

The wiring is reproducible: the same seed grows the same brain, so anyone can rebuild it and get the same dog.

What it senses, and its instincts

Before it learns anything, the dog is born with instincts: how strongly each sense pushes each action. These are the actual numbers in the code.

ā–  pushes toward that action ā–  pushes away from it

What it needs

Needs drift on their own (it gets hungry and tired) and change with what it does. They feed back into the brain as drives.

What it does

What you see on screen

The dog

Sculpted in code: a skeleton first, then about 45 soft shapes placed on the joints and melted into one skin, with layered fur that lies along the coat's grain. The brain decides the action; the body plays it out in the yard.

The 3D brain

An anatomical dog brain, also sculpted in code. Each neuron sits where that kind of cell lives in a real dog (smell in the olfactory bulbs, actions on the motor cortex around the cruciate sulcus) and the cortex glows where neurons fire. Double-click it for full screen.

The market

In live mode you cannot press Buy or Sell: the only thing you can do is pet the dog (one pet at a time, for everyone). Buys rain gold coins (and fill the food bowl). Sells bring rain. A new holder sends up warm sparks. A whale sweeps a gust of leaves across the yard. The sky darkens or warms with the mood of recent trades.

What is real, and what is not

Questions

Does the dog die?

No. It gets hungry, tired, scared or bored, and recovers. There is no death and no punishment.

Can I control it?

Only like a real dog: you can pet it (click it) and the market can feed or frighten it. You cannot tell it what to do. In live mode the dog is shared, so a pet is rationed (one every few seconds for the whole room).

Why does it ignore a buy sometimes?

Because senses compete with needs. A dog that is exhausted may keep sleeping through a small buy; a starving one runs to the bowl.

Will it behave the same for everyone?

Yes: one brain runs on the server and every visitor is shown that same dog, a fraction of a second behind.