Bringing People Back to Britannia — Anima, an Ultima Online AI Project

Bringing People Back to Britannia — Anima, an Ultima Online AI Project

In 1998, I was hooked on a game called Ultima Online.

Looking back, it was less a game and more a world unto itself. On a virtual continent called Britannia, players each lived out their own lives. Blacksmiths smelted ore into weapons, tailors stitched clothes to sell. People built houses, opened shops, and formed guilds. Amid the terror of PKs (Player Killing), vigilante groups organized. Bulletin boards warned the community about scammers. The developers designed only the skeleton of rules; the society layered on top of it was built entirely by the players.

Often called the originator of MMORPGs, this game had no "level up and kill the boss" structure. It was skill-based. Use a sword, your swordsmanship improves. Mine ore, your mining skill goes up. A character's identity was determined not by class, but by which combination of skills you developed. So some people lived as pure blacksmiths, others as mage-hunter hybrids, and others as thieves. Each role meshed with the others to keep the economy running, and the towns had life in them.

Britannia in those days was alive.

An Empty Town

Twenty-eight years have passed. Ultima Online's official servers are still up, and countless private servers exist around the world. Many people still carry nostalgia for that game.

But the reality was different. Log on to a private server and the town is quiet. Player counts have dwindled, and most who remain are veterans who've been playing for years. New blood is nearly nonexistent. The players from back then, now in their thirties and forties, don't have the luxury of investing several hours a day into a game anymore.

The problem was cascading. Fewer people means the economy collapses. When producers and consumers are scarce, shops empty, trading stops, and the town becomes a deserted market. The magic of Ultima Online rested on player-to-player interaction, and that foundation was crumbling.

Every time I logged on, I felt the same way. Standing alone in Britain's town square, I'd think of how boisterous this place used to be.

"What if AI Lived in This World?"

One day, a thought struck me out of nowhere.

Macros and bots had existed in Ultima Online for a long time. But those were just automation of repetitive tasks — mechanical scripts that mined ore at fixed coordinates, walked fixed routes, crafted fixed items.

A real character is different. One that wakes up in the morning and walks to the workshop, encounters a dangerous monster while mining and runs away, comes back to town and tells another player "that mine over there is dangerous." One that forms a guild to hunt together, holds grudges, and remembers friends.

As I wrote in my previous post, Stanford's Smallville paper showed that LLM-based agents can already spontaneously throw parties, form relationships, and build societies. That was on a simple 2D sandbox the researchers built themselves, though.

Ultima Online is different. It's a world with 28 years of history, real players in it, hundreds of skills and a complex economy. Not a controlled lab, but releasing AI into a living world.

So I started a project. The name is Anima.

8 Residents

Anima's first principle was not modifying the server. Agents connect to the server using the same packet protocol as a regular game client. From the server's perspective, an Anima agent and a human player are indistinguishable. This is a matter of fairness, but also the essence of the project. For AI to live in a human world, it has to be under the same conditions as humans.

I've designed 8 personas so far. Each has a name, personality, speech style, profession, and dream.

Grimm is a taciturn miner. He works in the mines near Minoc. He's a man of few words and grunts when he thinks. He says things like "Good vein of iron today. Heavy and clean." He doesn't fight. He hates cheap tools and wasting metal.

Bjorn is a modest woodcutter. He loves talking about the grain and quality of wood. "The oak here is good. Tight grain." His dream is to one day become a master carpenter.

Anima is an adventurer who just arrived in Britannia. Curious, a little clumsy, with dry humor. She says things like "What's that building?" and "Is that a real sword? Looks kind of rusty." She has no money and no skills, but she wants to explore.

Elric is a mage. Intellectual and easily distracted, he gets excited when talking about magic. He goes off on tangents mid-sentence. He loves reagent shops and libraries.

Sera is a wandering merchant. Charismatic, calculating, and always outwardly friendly. She says things like "You look like someone with good taste — can I show you something?" She always has an eye on prices and deals.

There's also Tormund the blacksmith who forges swords, Melody the bard who loves songs and stories, and Ash the ranger who prefers the forest and is uncomfortable around people. Their talkativeness varies too. It's defined as a value between 0 and 1 — Melody is 0.8, Ash is 0.2. The fact that Ash's signature line is "..." is a deliberate personality choice.

Each of them is defined as a YAML document — personality, speech style, interests, dislikes, skill allocation, activity ratios. A format both humans can read and LLMs can understand.

Two and a Half Weeks, 350 Commits

The first commit was on March 17. It started with writing an 825-line design document.

That same afternoon, I implemented the UO packet protocol client — connecting to the server via TCP socket, decoding packets with Huffman decoding, and passing the two-stage login authentication. That night, A* pathfinding and a behavior tree were in too.

In two and a half weeks, over 350 commits accumulated. What agents can do right now:

  • Connect to the server and create a character
  • Walk around town and interact with NPCs
  • Mine ore with a pickaxe and smelt it in a forge
  • Craft weapons and tools from the smelted metal
  • Sell crafted items to NPC vendors
  • Deposit at the bank when overloaded
  • Make new tools when the old ones break

The mine → smelt → craft → sell → bank loop runs. It sounds simple, but each step involves the kind of complex interactions unique to UO. Double-clicking the pickaxe brings up a target cursor; you have to click a rock tile and wait for "You dig some ore" to appear in the journal. Crafting is an asynchronous process of opening a Gump (in-game UI menu), clicking a button, and checking the result message.

All of this is built on top of UO's binary packet protocol — parsing 50+ types of packets the server sends, decompressing Huffman-encoded data, and updating the world model in real time.

Still Just the Beginning

Honestly, there's still a long way to go.

The movement system is unstable and agents sometimes get stuck in place — a position synchronization issue between server and client. Sometimes an agent tries to enter a shop after closing time, or can't find the forge and wanders around. The same kind of problem as Smallville agents walking into closed stores or two of them entering a single-occupancy bathroom. The limit of a world model.

Right now, most of Anima's decision-making is rule-based. It runs on priority rules like "if weight exceeds 85%, go smelt" and "if no tools, make some." LLMs are invoked for less than 5% of decisions — strategic ones like "where should I mine?" or "should I learn a new skill?"

There's one interesting feature. Anima has a self-improvement system attached. An external monitoring process analyzes agent logs every 10 minutes, and if a serious problem is detected — a stuck loop or a repeated failure pattern — it can invoke Claude Code to modify the source code. The modified code is instructed to be validated with pytest, and if it passes, it's committed and the agent is restarted. A loop where the agent improves itself.

The roadmap is three phases. Right now, Phase 1 — stabilizing the basic survival loop. In Phase 2, rules are extracted into external YAML documents so new behaviors can be added without touching code. Phase 3 is the ultimate goal: combining reinforcement learning and LLMs so agents can set their own goals, form relationships with other agents and human players, and participate in the economy.

The Scene I Want to See

There's a scene I ultimately want to see from this project.

Grimm brings ore he mined from the mountains to Tormund's forge. Tormund smiths a sword and hands it off to Sera. Sera takes the sword to another town and sells it for a higher price. Melody sits at the tavern and turns the day's events into a song. Ash hunts alone in the forest, occasionally drops by town to sell some hides, then disappears back into the woods.

And one day, a human player logs in. Sera walks up to them in Britain's town square. "Hey there, can I show you something?" That player doesn't know this merchant is an AI. Or maybe it doesn't matter even if they do. What matters is feeling that the world is alive again.

What does a world where AI and humans coexist actually look like? Rather than looking for the answer in grand philosophical treatises, my way is to run the experiment directly in a 28-year-old game world. It's still just the beginning, but Grimm the miner quietly swings his pickaxe again today.