Skip to content

Chapter 25 · agent-neuron · Lab

A world of neurons

An endless world where every mind and every authority is a neuron: families, land, goods, work, animals and a council, each run by the engine, and a page that only draws what the stream tells it.

The world

A world begins as open land and forest, a camp with a fire, and two people. Then they fall in love and a child is born, a newcomer walks in from the trees, someone fells a tree and someone else picks berries, and a hut goes up on a plot that’s now somebody’s, with a stranger paying rent for it. Wolves come out at night, a theft is seen, and at six a council meets to choose who will judge it. All of that happens in the engine.

The page draws all of that. It decides none of it. It’s the body and the world, walking people where their minds send them and reporting what happened to them. Every mind, every place, every family, the land, the goods, the titles, the animals and the council run as neurons in a network the engine checks before it runs it, and the page learns that network only from the traffic it sees on the stream.

This chapter looks at the whole of it the way the engine sees it: what a neuron is, what a link is, what a source is, and which neuron is the one authority on which fact. Then comes what the runs turned up when the engine was asked to carry a small society, not a single decision.

A world, before a mind

The world is endless, and nobody holds all of it. It’s cut into square regions. Each one is made, the first time something asks about it, from the seed and its own place in the world, never from the order regions happened to be made in. The page, the server and every mind program build the same region from the same seed, so they agree about a tree they’ve never told each other about.

That matters to the engine in a quiet way. A place’s id names its region, a site’s id names its kind and its tile, and a herd’s id names its animal and its spot. Handed an id, a neuron can check it against its own copy of the world, so no payload can name a tree that isn’t there or a bakery that was never built. The id is data, and the world it points into is a function anyone can run.

The ground has hills, lakes in the valleys, and mountain ranges with bare rock and snow on their tops. Ore shows in the mountains’ rock. Deer and elk keep to the woods, rabbits to the grass, and wolves, with now and then a bear, to the deep forest. The city is the other kind of world: endless too, its streets meeting at every region’s edge, its towers thinning out away from the middle.

The endless wild from above: forest over rolling hills, a mountain range with bare grey rock and white snow along its ridges, and blue lakes in the valleys beside it.
The wild well away from the camp: hills, a mountain range with rock and snow, lakes in the valleys. The world is generated from a seed; nothing in it is a real place, it is invented.

A mind, in two shapes

A person’s mind is ten drives and a will. Hunger, tiredness, loneliness, anger, resentment, fear, happiness, desire, love and want each rise and fall with what the world reports. Each one tells the others only what it chooses to report along a link, and a drive never reads another drive’s level. The will hears every report and says what the person means to do, and how they answer someone who comes up to them.

That rule lets a mind take two shapes. Most of the crowd lives as rows inside a few crowd neurons, every row stepped by the same functions. Follow someone and the server writes them a network of their own, a neuron for each drive and one for the will, then checks it, runs it and moves their state into it; stop following and the parts come back to the row. A test holds that a row and a network fed the same senses end in the same mind.

For many cheap minds, the engine’s shape is the crowd. For one mind worth watching, it’s the followed network. Nothing in the rules knows which shape it’s running in.

One man selected by the campfire, and his mind in the panel beside the world: what he carries, whom he loves, what he means to do and why, and his ten drives as bars from hunger to want.
One mind open in the panel: what he carries, whom he loves, what he means to do and which drive says so, and the ten drives as the engine last reported them. He is generated from a seed, and invented.

One authority for each fact

The design that grew, chapter by chapter of the world’s own history, is one neuron as the authority on each kind of fact. Kin decides who exists. Nobody’s mind decides a child is born; kin hears two minds’ bonds and their nights at home, and says so. The land says what each site has left and what has grown back, goods says who holds what and who owns which house (it’s where deals, sales, wages, rent and theft are found), the registry holds title to the land, the herds say how many animals each herd has and whether a hunt takes one, and the council says who leads and what was ruled.

Each of them is a small program over pure rules, with its own state, answering what it hears. None of them reads another’s state. The registry allows a hut but doesn’t build it: it says so, and goods, the authority on the wood and the stone, spends them and writes the deed. The council finds a thief guilty but doesn’t move the berries back: it passes the sentence on, and goods carries it out as far as the thief can pay.

The places are neurons too. There’s one per kind of place: every bakery is a row in the bakery neuron, every home a row in the home neuron, which also keeps each home’s fire burning down by the hour. When someone knocks, a place answers with let in or turned away, how long the visit takes, and what being there does to the visitor’s mind.

The economy screen: a diagram of the sources and authorities (gathering, using, claims, hunting, assembly, land, goods, registry, herds, council, ledger, home) with what each link carries a second, and panels below for what goods asks for each good, what everyone holds, the huts, titles and fields, work and wages, and the council.
The economy screen: the economy’s own neurons as the stream shows them, and what they have said. Every person, hut, title and wage on it is invented.

Most of the world’s plumbing is links, carried by the engine without anyone writing a line to do it: what the land gave someone goes along a link to goods, never from the page, and an animal taken goes from the herds to goods. A field tilled goes from the registry to the land, which only then grows grain there, and a hut allowed goes from the registry to goods. A log burned goes from goods to the home neuron, which stokes the fire. A sentence goes from the council to goods.

Whatever the server forwards itself is a fact it alone holds about the world: a love drive’s bond to kin, a want drive’s report to goods, who’s standing near a wolf pack to the herds. That settled into a rule of thumb. If one authority’s answer is another’s input, it’s a link. If only the world can know the input, it’s the server.

In the network file, the neurons that answer a list, one item per thing to say, are marked as such. So the engine sends each item on as its own signal, and no answer is ever cut to a preview on the stream. That has a consequence. The runs found it the hard way, below.

senses-0 ──▶ crowd-0 ──▶ town-0          (and as many crowds as the population needs)
visits-home ──▶ home    visits-park ──▶ park
family ──▶ kin ──▶ register
gathering ──▶ land ──▶ goods ──▶ ledger
using ──▶ goods ──▶ home
claims ──▶ registry ──▶ goods, land
hunting ──▶ herds ──▶ goods
assembly ──▶ council ──▶ goods
NetworkThe wild’s network as the server writes it from the seed and the engine checks it before running it: the sources on the left, where the server injects what the world reports, and the authorities they reach. Following someone adds a network of their own beside it.

The page is a body

The page draws the world and walks the people. Once a second it reports where everyone stands, who’s near whom, who’s at home and who’s near a wolf pack, and the server’s clock carries that to the minds. It finds the nearest bush with berries on it for a mind that means to eat, and a clear spot on that person’s own land for one that means to build. When someone comes up to someone else, the page says so and lets the other mind answer.

Everything the page used to decide has moved into the engine, one piece at a time: whether a greeting is welcome, when places open, how long a meal takes, sending people home at night, whom someone votes for, whether a leader finds the accused guilty, whether a desperate person takes what isn’t theirs. Each move followed the same rule. The page is the body and the world, and it decides nothing about a mind.

What the page sends is data. Before any mind reads it, it’s rebuilt field by field, its names are checked against the world’s own people and places, and it’s kept short enough to read off the stream whole. A payload is never a script.

A morning around the camp: people walking out to the forest and the huts, two of them with speech bubbles saying what they mean to do, one about to make something and one going to work.
A morning: the page walks each person where their mind sends them and says what they mean to do; it decides none of it. The people and their lines are invented.

The stream is the only map

The page never reads a network file. It learns the network’s shape from the live stream, where a neuron appears when it first carries something and a link when a signal first travels it. The network view draws what it has seen so far in layers from the sources, every box with a minute of history and every link with what it carries a second. Select someone, and the way their mind is reached lights up.

The economy screen points the same idea at the economy’s neurons alone: gathering, using, claims, hunting and the assembly where the server injects, and the land, goods, the registry, the herds, the council, the ledger and the homes they reach. Beside the diagram sit what goods asks for each good, everything held by everyone, the houses and who lives in them, titles and fields, work and wages, the council and the last things said. All of it is read from the stream.

Pulses put the same traffic into the world. When the engine changes someone’s mind, a ring shows over their head: gold for a new intention, blue for a drive, red when an animal goes for them.

The network view: the world’s sources on the left (assembly, the senses for each crowd, using, hunting, the visits, family, gathering), the neurons they reach beside them (the council, the crowds, goods, herds, home, kin, land), and their records on the right, each box with its calls a second and a minute of history.
The network view, learned from the stream: twenty-seven neurons and twenty-two links, each box with its calls a second and the last minute. The people whose minds these are are invented.

An economy nobody runs

Want is a drive like the others. It’s the most pressing of what someone is short of: food first, then wood for the fire, rent, land, what a hut takes, fields and coin. The will turns it into gathering by day, building, claiming a plot, tilling, planting trees, making planks and blocks and iron, or going to work for someone.

Goods hears every want report and knows everything everyone holds, so that’s where a deal is found. If two people each have spare what the other lacks, they’re offered a swap; if only one does, the other pays in coin at what goods asks for it, and that rises with how many want a good against how many have it spare. Someone short of coin is offered work by whoever has work to give and the coin to pay: building their house, bringing in their grain, keeping their fire. Each piece is paid as it’s done.

Land is claimed from the registry, one plot each, and a hut stands only on its builder’s own land, with a house of planks, dressed stone, iron and furs to follow it. Two who love each other move in together, and the hut one of them leaves is let to someone with no roof, who pays the owner each morning and buys it once they have enough put by. None of this is scripted. Each step is one authority answering one request, and the arc from a camp to a street of huts with fields behind them is what those answers add up to.

A settlement in the forest: two small huts side by side on their owners’ plots, fields of golden grain beside them, a third hut further off, and people at work among the trees.
A settlement some days in: huts on their builders’ own plots, fields of grain beside them, and people at work among the trees. All of it, and everyone in it, is invented.

Wrongs, and a council

Someone confronted while angry fights back, and both get hurt. When someone is desperate, with no deal or work to be had, goods tells them who has spare what they lack. An honest mind lets it go; a dishonest one goes and takes some, and the one robbed notices more often than not. Both become disputes for the council.

Each evening at six, if there’s a leader to choose or a dispute waiting, everyone grown is called to the camp. In a vote for leader, each mind votes from its own feelings: the one it loves, else its friend, never someone it holds a grudge against. The votes are counted at seven. Then the leader’s mind hears the disputes one at a time and judges them, fairly or not: a friend may walk free, and someone the leader resents is guilty whatever happened.

The council neuron asks, counts and records, and decides nothing a person would decide. It’s the same line the page holds, drawn one level up. An authority over a fact isn’t an authority over a mind.

What the runs found

A neuron that answers a list only sends its items on when it has a link onward. Goods answered correctly from the first run. Nothing it said ever reached the server, though, because nothing listened to it. Giving it a record to tell, the way kin tells the register, made every holding appear at once: the fix was a neuron, not a line of code.

A council that never closed its meeting announced the same leader every evening from the same old votes. A feud between two people piled up dispute after dispute, faster than any leader could hear them. Both were fixed in the council’s own rules, with a test each. The page didn’t need to know about either.

Some of what the runs found was the world’s balance, not its plumbing. People claimed plots of dense forest and could never build on them, a crowd around a campfire was pushed just far enough from it that nobody counted as home and nobody rested, and people were so short of food they never got round to farming. The engine made each easy to see. That’s because every fact had one authority, and every change was on the stream.

The rule it rests on

The whole world is one network file. It’s written from the seed and checked by the engine before it runs, then run live with its inputs on standard in and its events on the stream (the engine’s decision record on streaming runs). Sources are where the server injects, served neurons are small programs speaking the engine’s line protocol, and links carry an answer from one neuron to the next.

A neuron with a lot to say answers a list, one item per thing, so nothing that has to be read off the stream gets cut to a preview, and no payload that has to be read runs longer than the stream will show. The engine is the authority on the network. The page is never told its shape, and a followed person’s network is written, checked and run the same way as the world’s.

Run it

npm run city     # the network written from the seed, checked, and run live
npm run dev      # the page: the world drawn, and what the stream shows
CommandThe two steps, in the agent-neuron-life repo, which is private: the server writes the world’s network and runs it in the engine, and the page draws it. Nothing on this page is a live run.

What it is not

Not a model talking. No language model is asked anything. Every mind is rules, every authority is rules, and the lines people say come from a table. The engine isn’t carrying a few costly decisions here. It carries many small, cheap ones.

Not a finished world. The balance is first guesses, food is too scarce for a crowd, nobody dies, coin is only what the first people brought, and a server restart loses everything. The people, their names and everything they do are invented, generated from a seed, and the repo is private.

overfocus/agent-neuron