Playing “Who's the Spy” locally with an LLM

It's Chinese New Year, and everyone is talking about DeepSeek. Ruirui wants to play "Who's the Spy" but can never round up enough people, so I built an AI-powered "Who's the Spy" game bot that calls an LLM to generate character descriptions and voting strategies — but I ran into problems like unstable model output and formatting errors. After tweaking the model and the prompts over and over, I finally got the basic functionality working, and the whole process was full of funny mistakes and challenges.

AI