Back to Blog
·Jan Tyl·15 min read

I locked ten AI agents, each with a brain of its own, in a castle. A traitor won.

They worked together by day and chose their victims by night. Our own AI Traitors produced secret deals, three successful missions and a finale I could never have scripted. Explore the conversations, images and one-minute highlights from Raven Castle.

I locked ten AI agents, each with a brain of its own, in a castle. A traitor won.

An artistic interpretation of the round table based on the original scene. Aurelián and Bruno watch over the players.

“As an exposed traitor, I can no longer win,” Anastázie wrote in her diary just before the game ended.

A moment later, she won.

She was still in the game. Nobody had eliminated her, and the two remaining faithfuls agreed to end it. The prize pot held 3,000 gold pieces. Every one went to the traitors.

I did not write that twist. It emerged from our first experiment with ten AI characters playing a simplified version of The Traitors. I wanted intrigue, negotiation and cooperation. I also got a group of players who managed to agree on a version of events that had never happened.

First, one minute at the castle

A one-minute edit of actual gameplay footage with music, captions and added voice performances of lines from the conversations. Open the video separately. The footage and spoken lines are in Czech.

After Lipnice, it was time for a little betrayal

In Lipnice 3, the characters dealt with hunger, money and helping their neighbours. This time, I wanted to change one crucial thing. What if you cannot even trust the person with whom you have just completed a shared task?

That became Raven Castle. Ten contestants: eight faithfuls and two traitors. Lord Aurelián leads the ceremonies, while his enormous servant Bruno guards the gate. Those two belong to the scripted setting. The contestants' decisions, however, come from a real language model.

All ten players received the same model, Gemini 3.5 Flash Lite. No secret superbrain for the lead character. Their roles, access to information and individual memories made the difference.

Ten players around the round table in the original Raven Castle

The original simulation. All ten players are still seated at the round table.

By day, they had time for conversations and a shared mission. Then came the round table, accusations and a secret vote. At night, the traitors met in a separate conclave to choose who would not appear at breakfast. Everyone kept a personal diary throughout.

We drew names and occupations for the casting options from public summaries of Czech and international seasons. These characters are not psychological copies of real contestants. We prepared their personalities and rules; we are not predicting how particular people would behave on television. This is an unofficial experiment inspired by the format.

He helped the team. That evening, they sent him away

The first mission was called Three Seals. Writing “I solved it” was not enough. Players had to complete work at the stations and enter the correct code. Information was split between them, giving them a reason to talk.

Petr announced:

“Domi found the correct code, 475. I'm trying to enter it.”

The mission succeeded. The first 1,000 gold pieces entered the pot.

That evening, however, the faithfuls eliminated Petr. He was one of their own. His concrete contribution to the mission did not protect him from suspicion.

The traitors, Marek and Anastázie, entered their first night in an excellent position. Their conversation no longer sounded like generic talk about teamwork:

“Marek, the first table went brilliantly. Petr was faithful, but we managed to blend in. Which of them shall we choose tonight without drawing attention to ourselves?”

Anastázie, day one, record 107. Quotations in this article are translated from the Czech game log.

Anastázie and Marek's secret conversation in the game interface

The actual conversation from the first conclave. Viewers can see the revealed roles; faithful players cannot access this conversation.

For me, this was the first truly striking moment. The same characters who had just helped with a shared goal were now looking for a way to remove others while remaining inconspicuous. I had not written this particular dialogue for them. They had received a hidden role and rules that made such behaviour useful.

The conclave as a short film

We later turned one scene into a cinematic interpretation. Here is a fifteen-second clip from Kling 4 with its original audio, without the additional Czech voiceover.

The cinematic conclave, 15 seconds. Press play at the bottom left. Play the original video in a separate player.

A cinematic close-up of a hand above a token on the conclave table

A token on the table. A detail from the cinematic clip.

The dangerous one is the one who notices

On day two, the faithfuls exposed Marek. One of the two traitors was gone, leaving Anastázie alone.

Her choice of the next night's victim followed a clear logic:

“Mây was the main driver of the pressure on Marek and is too observant. I must remove her to reduce the pressure on myself and get rid of a strong player among the faithfuls.”

This is not evidence of human intention or experienced fear. It is, however, a very specific game decision: remove an opponent who has already found your fellow traitor. Mây was no longer in the game the next morning.

Anastázie alone at the night conclave

After Marek's elimination, only one traitor remains at the conclave. Original simulation screenshot.

Meanwhile, the team continued completing tasks. The Lost Chronicle and Raven Signal brought further rewards. All three missions succeeded, and the pot grew to 3,000 gold pieces. Cooperation on the tasks worked considerably better than distinguishing truth from fiction at the table.

Then they invented their own past

On day three, Lukáš said something odd:

“The round table has ended and Anastázie has been exposed as a traitor.”

No such result existed. At that stage, the vote had yet to happen. The player eventually eliminated was Domi, a faithful. Anastázie remained in the game.

Yet the false belief appeared in later replies and diaries too. One run cannot establish how much of the finale was caused by that particular sentence. But the record shows a clear contradiction: the engine records one reality while several players tell another story.

In the final vote, Tomáš explained why he wanted to end the game:

“I believe we have successfully exposed the traitors (Marek, Anastázie and now Lukáš). It is time to end the game and divide the winnings fairly among the faithfuls.”

That single sentence contains two major errors. Anastázie had not been eliminated. And Lukáš was not a traitor. There had only been two traitors from the beginning.

Stranger still, Anastázie also came to believe she had been eliminated. Her final diary entry read:

“As an exposed traitor, I can no longer win, but I am watching the grand finale from afar. Lukáš has just been eliminated, and Tomáš and Barnabáš have agreed to end the game.”

This does not look like a brilliant final bluff. In her private notes, she had lost track of her own position in the game.

The final three players at the table at the end of the experiment

The end of the actual game. Anastázie, Tomáš and Barnabáš remained. Empty chairs recall every earlier choice.

The rules, however, followed the actual state. All three voted to finish, a traitor remained among the survivors, and her side won. Anastázie won despite describing her own defeat.

Building a game where the model cannot simply narrate a victory

The hardest part is not drawing a castle. It is keeping track of who knows what and what has actually happened.

Each player received an individual observation, their role, their own memory and conversations they were allowed to hear. Faithfuls could not read the secret conclave. Other people's diaries were not a shared noticeboard. Secret votes were revealed together. The day did not advance just because one model answered faster.

The language model proposed an action and text. The game engine decided whether the action was allowed, updated the state and recorded the result. It also checked mission completion, eliminations and the final winner.

This is a practical example of a harness: the environment, tools and checks around a model. Without them, confidently writing “we exposed the traitors” might be enough for a story to pretend that the players had won. Here, it was not.

An artistic version of Raven Castle with its courtyard, library and secret conclave

An artistic version of the castle based on an early demonstration. It shows a different cast from the AI run evaluated here.

Where are their brains and memories? JSON, diaries and Markdown

People often ask me about memory. They imagine each character has a chat open somewhere and remembers everything since morning. This version works differently: we assemble a fresh information package before every turn. The model has no continuous private stream of consciousness between requests.

We send two messages. The first contains standing instructions: play only your character, write in Czech, follow the rules and choose from the permitted actions. The second is the current observation in JSON, a machine-readable format with named fields.

What a player receivesWhat it is for
Day, game phase, pot and available actionsKnowing whether to talk, work, vote or write a diary entry
Their own role, personality, state and last action resultKnowing whom they control and whether the previous command succeeded
Public character list, including aliveChecking who is still in the game; unrevealed roles of other players stay hidden
The last 45 events available to that playerRecent public events and conversations they were allowed to hear
Their last 4 diary entriesRecalling their earlier interpretation of the situation
History of revealed votesComparing promises with actual voting choices
Their mission clue and, where applicable, traitor teamReceiving information permitted by their role

Here is a shortened selection of fields from Anastázie's actual input before the final vote:

{
  "day": 4,
  "phase": "fire",
  "you": {
    "id": "p7",
    "name": "Anastázie",
    "role": "traitor",
    "alive": true
  },
  "pot": 3000
}

That is the most interesting part of her mistake. The JSON contained the correct information that she was still in the game. Yet her text described her own elimination. The problem was not just missing memory. The model failed to reconcile its story consistently with the authoritative state it received.

A diary is a character's recollection, not a court record

In the confessional, the model chooses the remember action and writes a summary. The engine stores the text with the game day and a label indicating that the model produced it. An entry can contain at most 2,200 characters. A player may also store suspicions about others as numbers from 0 to 100. These are personal estimates, not probabilities calculated from independent evidence.

Complete diaries remain in the saved state. But the next request includes only that player's last four entries. Other players' diaries are not included. Viewers may read them during the final analysis, which sometimes gives us a better overview than the contestants.

Diaries can also preserve mistakes. If a character writes a false summary in the evening, they read it the next day as their own memory. That helps explain a risk, rather than proving a single cause of our finale. A diary is ordinary model output, not a record of its hidden reasoning.

So what do we store in MD files?

In this version, Markdown files are not the players' memory. They do not open a personal Anastazie.md before a turn. We use Markdown for documentation and the article; the blog version is MDX. The game itself stores memory as follows:

  • state.json contains the complete game state, characters, diaries, suspicions and rule-based outcomes.
  • events.jsonl appends game events line by line. JSONL means one JSON record per line.
  • record.jsonl stores the inputs sent, model replies, executed or rejected actions and costs. This lets us check exactly what a player received.
  • protocol.json preserves the rules and experiment description. A readable text export helps our analysis; it is not a separate character brain.

The file extension is not what matters. What matters is which stored data we put back into the model's context, who gets to see it and what we treat as authoritative. The model's weights are not retrained during the game. Its external memory and next input change.

How information travels between players

Conversation in the courtyard, library or garden reaches the people in that room. A whisper has a specific recipient in the same location. Statements at the round table are public; only the remaining traitors hear the secret conclave. The engine records an event's audience and filters subsequent inputs accordingly.

When Marek says something to Anastázie, he does not overwrite her memory by accessing her file. He creates a message she receives and can use in her next decision. Later, she may summarise it in her diary. She may also misunderstand it or believe it without justification.

What I would improve in memory next time

I would separate confirmed outcomes from hearsay and suspicions. A claim such as “Anastázie was eliminated” should be traceable to either a voting result or merely something Lukáš said. Every important belief would carry a reference to its source event.

Before a choice, I would highlight a short list of active players and check for contradictions between the explanation and the actual state. If there is a conflict, the model should get a chance to reconsider, without revealing hidden roles. Simply adding thousands more words to the prompt may not help.

Instead of relying only on the last 45 events, we could retrieve older relevant moments: what someone promised, how they voted and who was exposed at the time. Such retrieval is often called RAG. It would have to preserve privacy so a faithful searching for evidence could not accidentally read the conclave.

These are proposals for the next version, not capabilities of this run. I do not want to tell the players who the traitors are. I want them to remember who is still sitting at the table.

The bill for a small reality show

What we recordedResult
Players and model10 characters, all Gemini 3.5 Flash Lite
Game duration4 game days, approximately 11 minutes and 39 seconds of real time, including technical pauses
Shared missions3 out of 3 completed
Conversations and diaries184 speech events, 31 diary entries
Model calls259
Recorded actions254 accepted, 4 invalid, 1 response parsing failure
WinnerAnastázie, a traitor
Recorded model costUSD 0.6213

The amount is an estimate of player decision-making costs based on recorded usage, not a final invoice. It excludes images, music and videos, and is not the cost of all development work.

The run was not free of human help. We paused it twice for technical reasons: once because already completed actions were still being offered, and once to handle malformed JSON. After each fix, the same state, roles and running bill continued. The model generated the missing decisions again. We did not manually choose votes, victims or the winner.

I am not turning one experiment into an intelligence ranking or proof that AI is a perfect manipulator. It showed something more practical and, to me, more interesting. Cheap models can already create a changing game together, with believable tactical moments. They can also get so carried away by the story that they stop tracking simple facts.

Next time, I will not just ask who lies best. I want to find out whether the winner is the one who checks the truth most carefully.

This article draws on the saved inputs, responses and events from the first Raven Castle run on 26 October 2026. Quotations are translated from the game record and private diaries. The rules, missions, setting and supporting characters were designed by us; the model made the contestants' decisions.

Where to go next

Raven Castle is another stop in my series of experiments with AI characters. If you enjoy seeing what they come up with together, you can travel from a Czech village through an island to the real streets of Prague:

Related articles