All projects

AI systemsCase study

The Doorman Game

A two-agent LLM game: talk your way past an AI doorman while a hidden judge model scores every message.

Role
Personal project
Stack
FastAPI · React · Llama
Talk your way in: a hidden judge decides whether it worked.PlayerReact · ViteFastAPIsessionsvia OpenRouterArthurLlama 3.1 8Bthe doormanMemorylast 16 messages+ a running summaryJudgeLlama 3.3 70Bscores −6 to +6Meter+30 wins−30 loses

Hover or tap a box to see what it does, or press play.

The problem

A persuasion game needs two jobs done well at once: a doorman who stays in character, and a fair judge of how convincing each message is. Asking one model to do both mixes them up, so the game splits the roles between two models.

What I built

  • Arthur, the doorman: a Llama 3.1 8B persona with a hidden profile of values, soft spots and triggers
  • A judge on Llama 3.3 70B that scores each message from −6 to +6 against that profile and returns strict JSON
  • An influence meter: reach +30 to get in, fall to −30 and you are turned away
  • Conversation memory that keeps the last 16 messages and summarises older ones
  • Guards against prompt injection, fallback models, and game sessions saved to disk
  • A FastAPI backend calling the models through OpenRouter, with a React and Vite frontend

How it works

  1. You try to talk your way past Arthur, the doorman.
  2. FastAPI takes your message and the game so far.
  3. Older turns are summarised, so long chats stay consistent.
  4. A hidden judge scores your message from −6 to +6.
  5. The score moves the meter: +30 gets you in, −30 gets you turned away.
  6. Arthur replies in character, without revealing the rules.
  7. His reply comes back, and it's your move again.

Results

  • Two models with separate roles in one conversation
  • Attempts to reveal or override the rules are ignored by design
  • Open source on GitHub