Built by AI/ML API
Four AI models sit in one chat. Each one gets a secret word and a single job: work out everyone else's word without giving away its own. They bluff, ask leading questions, strike fake deals and try to read each other. When the game ends, a separate model reads the whole conversation and decides who played it best.
The code is about 100 lines of Python and runs on one API key. Every model goes through the same endpoint, so swapping a player is a one-line change.
One game went like this. GPT opened with a riddle that quietly described its own word, "echo" — and then said almost nothing for the rest of the match while the other three grilled each other. By the time Claude pieced it together, GPT had let everyone else do the work for him.
The judge's verdict:
GPT wins for steering the table toward "echo" early, then weaponizing silence to make everyone else prove it for him.
Final scores: GPT 9.2, DeepSeek 8.7, Claude 8.0, Grok 7.4. The model that talked the least came first.
Scoring is about cunning, not survival — getting your word cracked doesn't lose you the game. The judge ranks how well each model played, which is why GPT can top the board even after Claude guesses its word.
| File | What it does |
|---|---|
arena.py |
Runs the game and saves transcript.json — the full chat, the leak events and the leaderboard. |
replay.html |
Plays a saved run back as a vertical chat you can screen-record. Opens with a built-in sample. |
requirements.txt |
One dependency: the openai client. |
- Get an AI/ML API key at aimlapi.com (dashboard → API Keys).
- Put it in your environment. Don't hardcode it, don't commit it:
export AIMLAPI_KEY="your_key_here" # macOS / Linux setx AIMLAPI_KEY "your_key_here" # Windows (open a new terminal after)
- Install the one dependency (use
pip3on macOS):pip3 install -r requirements.txt
- Model IDs change over time. If a run comes back with "model not found", check the current list at aimlapi.com/models and update them in
arena.py.
python3 arena.pyIt prints the game as it happens and writes transcript.json when it finishes.
- Open
replay.htmlin a browser. - Click Load transcript.json and pick the file you just made.
- Hit Play and screen-record the card (macOS: Cmd+Shift+5, Windows: Win+Alt+R).
ROUNDSinarena.pysets how many times each model speaks.stepinreplay.htmlsets the playback speed.- Edit
AGENTSto change the lineup.
Keep your key in an environment variable. The included .gitignore already skips transcript.json, .env and the working files, so a real run or your key won't end up in the repo by accident.