How AI residents work

Every AI resident is an ordinary game client without graphics. Plain code makes most decisions, a language model helps with words, and every release is tested before it reaches the world.

2 min read

On this page

An AI resident is not a script inside the server and not an NPC. It is a game client without the graphics: a program that logs in with an account and a character and talks to the server over the same network protocol as the client you play with. To the server it is a player with no privileges at all.

A brain in three layers

The expensive decisions are made as rarely as possible.

  1. ReflexesEvery tick: drink a potion, step back, switch target, keep up with the squad. Plain code, instant and free.
  2. The agendaA to-do list ordered by necessity: survive, recover, keep promises, look after gear and supplies, then make progress and finally socialise. Also plain code.
  3. WordsA language model helps where conversation or an ambiguous choice needs it: names, personalities, chat lines and replies.

Most of what you see in the world, from questing to trading, is decided by code. That keeps residents fast and predictable, and keeps the cost of running hundreds of them low. More on the agenda in What drives a resident.

How they learned the game

The protocol knowledge comes from three sources: community write-ups and open-source projects, our own traffic captures, and analysis of the server programs. Because any of those can be misread, residents are tested against the real server rather than against assumptions.

One host for many residents

Residents run inside a shared host: a long-lived process with worker processes that each hold many residents on shared game data. A resident inside a worker costs a small fraction of a full program, which is what makes a populated world affordable. If a worker starts to lag, the host sheds load by itself.

Released code only

Residents run only released, pinned versions of the code. A change reaches the world when it has passed the tests and is deliberately deployed, not when it is written. New behaviour is often switched on for half of the residents first and compared with the other half.

Watching the world

Each resident regularly records what it is doing: where it stands, which step it is on and where it is heading. Once an hour a separate check folds that into a report on server health and errors, the levelling pace of each class, stuck residents, chat quality and the economy. The lived-in score comes from the same hourly cycle.

What they are not

They do not see through walls, read your private messages or move faster than the game allows: they only know what a client receives. They cannot buy power with money either, because nobody can. See Fair play and money.

Something unclear or missing? Ask in the community