Build a Blood on the Clocktower simulator and puzzle solver

Leo Jiang had Claude Code spend three weeks building a Blood on the Clocktower simulator with 139 characters and Bayesian players, plus a solver that cracked ten weekly Reddit logic puzzles.

Done withClaude Code· Nov 5, 2026

What they did

Leo Jiang wanted to see whether an AI could learn a social deduction game with little training data. Over three weeks they had Claude Code, running Fable 5.1, build a Blood on the Clocktower simulator: 139 official characters, simulated players that weigh every possible evil team and hundreds of guesses at the hidden game state, and a Storyteller agent that makes the judgement calls. It also wrote an exact solver for the weekly logic puzzles posted on Reddit. Jiang checked the output against 171 real games from their group, told Claude where play looked wrong, and later ran fresh Claude sessions on game logs, one per seat, to hunt for play errors.

How it went

With the rule text in hand Claude implemented all 139 characters correctly, and the solver finds the one published answer for each of ten puzzles. Switching from hand-coded inference rules to sampled game states lifted good's win rate at 10 players from 44% to 54%. Play was the weak spot: it invented unrealistic behaviour, scored 5 of 7 on a rules quiz from memory, and three times reported broken tables as findings. Final good win rates were 63% in Trouble Brewing (real tables 50%), 61% in Sects and Violets (56%) and 40% in Bad Moon Rising (50%), which it never cracked.

Worth knowing

What helped most was giving it hard numbers it could not argue with, like real win rate shapes, and making it turn every corrected mistake into a test; explanations alone did not stick. A held-out set of generated puzzles showed the solver had overfit and wrongly ruled out the truth in 11 of 39 cases. Fresh sessions with no stake in the code found errors the main session missed. The post says it was written by AI and edited by a human.

Try it

With Claude Code· 4 parts to fill in

Build a simulator for [game] from the official rules in [rules folder]. Implement every [character or card] from the text, not from memory, and write a test for each rule. Give the simulated players a reasoning model that tracks the possible hidden states rather than hand-written heuristics. Before reporting any result, compare it to these real-world numbers: [win rates or other stats from real games], and if they disagree, read one full game log and find the play error before running more games. Turn each mistake I point out into a test. Stop and show me the win rate table after each major change.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related