Inspiration
So I played this board game recently — it's a hidden-information game where Ghosts give cryptic one-letter-at-a-time clues to Mediums who try to guess a secret word. I kept thinking: how good would an LLM actually be at this? Could it strategize, deduce, bluff?
Then I saw this hackathon and decided to give it a try. But I didn't want to just plug Gemini into a text box and call it a day. I wanted to make it feel like you're actually sitting at a séance — speaking your moves, hearing the spirits respond, feeling the tension build.
What it does
Two teams sit around a table. Each team has a Guide (the one who knows the secret word) and an Analyst (the one desperately trying to figure it out). The Guide answers questions one letter at a time, and here's the catch — everyone can see the answer forming. So the Analyst has to decide: do I keep going and risk the other team figuring it out too, or do I call "Silence!" and cut it short?
Now here's where it gets interesting — any of those seats can be an LLM. You can watch two Gemini-powered teams play against each other in Observer Mode, where you literally see the AI's reasoning pop up in speech bubbles as it agonizes over each letter. "Should I stop here? They might figure out it's 'telescope' if I let one more letter through..." It's weirdly captivating.
Or you can sit down and play against the AI yourself. Your call.
How we built it
The whole board is drawn on a Canvas — no HTML grid, just pixels. It felt right for something that's supposed to feel like a game, not a web app. React handles the UI overlays (menus, reasoning panels, private player hands), and the backend is an Express server that streams game state through Server-Sent Events so everything updates in real time.
For the AI, we built a dual-provider setup: native Gemini Interactions API for Google's models, and OpenRouter for everything else — Claude, Qwen, you name it. The game engine itself is completely deterministic with an immutable event log, which means we get full replays for free. You can scrub through a finished match frame by frame and see exactly what each AI was thinking at every decision point.
Challenges we ran into
Honestly, the biggest one was that LLMs are terrible at following instructions. You ask for a clean JSON response and you get markdown fences, random emoji, half the answer in a different language. We ended up building this whole multi-layer parsing pipeline that tries increasingly desperate strategies to extract a valid decision from whatever the model spits out. It's not pretty, but it works.
Getting the AI to actually play well was another headache. Early on, both teams would just... politely exchange clues forever. Nobody was trying to win. We had to completely rethink the prompts — framing it as a race, injecting urgency, basically telling the AI "you're losing if you're not guessing."
And then there's the hidden information problem. The whole game falls apart if the wrong player sees the wrong thing. We built three separate perspective levels — public, per-seat, and observer — and the engine strictly filters what each view gets. One bug there and there's no game.
Accomplishments that we're proud of
Observer Mode turned out way better than expected. Watching two AI teams play is genuinely entertaining — they strategize, they get cautious, they make bold guesses. The speech bubbles showing their reasoning in real time make it feel like you're eavesdropping on the spirits' inner monologue.
We're also pretty proud that you can throw basically any model at this thing and it'll work. The parsing fallbacks are ugly under the hood, but from the outside, Gemini Flash and Claude Sonnet just... play the game. You can even pit them against each other and see who's the better medium.
What we learned
LLM structured output is more of a polite suggestion than a contract. If your app depends on getting clean JSON back, you need a plan B. And a plan C.
Prompting for game AI is nothing like prompting for chat. You're not asking the model to be helpful — you're asking it to win. That requires encoding strategy, risk assessment, and even a bit of game theory into the prompt. It's a completely different skill.
Also, hidden-information games might be one of the best ways to stress-test LLM reasoning. They need theory of mind ("what does the other team know?"), risk management ("is this letter safe to reveal?"), and deduction under uncertainty. It's a harder problem than it looks.
What's next for Phantom Ink inspired Game with Gemini
We've got AudioContext wired up but not fully connected yet — the dream is voice in, voice out. Say your move, hear the spirit answer. Full séance vibes.
Beyond that: online multiplayer (right now it's local only), a tournament mode where different models compete in brackets, and post-game analytics that break down which clues were brilliant, which silence calls were too early, and which AI is actually the best at reading between the letters.
Inspiration
So I played this board game recently — it's a hidden-information game where Ghosts give cryptic one-letter-at-a-time clues to Mediums who try to guess a secret word. I kept thinking: how good would an LLM actually be at this? Could it strategize, deduce, bluff?
Then I saw this hackathon and decided to give it a try. But I didn't want to just plug Gemini into a text box and call it a day. I wanted to make it feel like you're actually sitting at a séance — speaking your moves, hearing the spirits respond, feeling the tension build.
What it does
Two teams sit around a table. Each team has a Guide (the one who knows the secret word) and an Analyst (the one desperately trying to figure it out). The Guide answers questions one letter at a time, and here's the catch — everyone can see the answer forming. So the Analyst has to decide: do I keep going and risk the other team figuring it out too, or do I call "Silence!" and cut it short?
Now here's where it gets interesting — any of those seats can be an LLM. You can watch two Gemini-powered teams play against each other in Observer Mode, where you literally see the AI's reasoning pop up in speech bubbles as it agonizes over each letter. "Should I stop here? They might figure out it's 'telescope' if I let one more letter through..." It's weirdly captivating.
Or you can sit down and play against the AI yourself. Your call.
How we built it
The whole board is drawn on a Canvas — no HTML grid, just pixels. It felt right for something that's supposed to feel like a game, not a web app. React handles the UI overlays (menus, reasoning panels, private player hands), and the backend is an Express server that streams game state through Server-Sent Events so everything updates in real time.
For the AI, we built a dual-provider setup: native Gemini Interactions API for Google's models, and OpenRouter for everything else — Claude, Qwen, you name it. The game engine itself is completely deterministic with an immutable event log, which means we get full replays for free. You can scrub through a finished match frame by frame and see exactly what each AI was thinking at every decision point.
Challenges we ran into
Honestly, the biggest one was that LLMs are terrible at following instructions. You ask for a clean JSON response and you get markdown fences, random emoji, half the answer in a different language. We ended up building this whole multi-layer parsing pipeline that tries increasingly desperate strategies to extract a valid decision from whatever the model spits out. It's not pretty, but it works.
Getting the AI to actually play well was another headache. Early on, both teams would just... politely exchange clues forever. Nobody was trying to win. We had to completely rethink the prompts — framing it as a race, injecting urgency, basically telling the AI "you're losing if you're not guessing."
And then there's the hidden information problem. The whole game falls apart if the wrong player sees the wrong thing. We built three separate perspective levels — public, per-seat, and observer — and the engine strictly filters what each view gets. One bug there and there's no game.
Accomplishments that we're proud of
Observer Mode turned out way better than expected. Watching two AI teams play is genuinely entertaining — they strategize, they get cautious, they make bold guesses. The speech bubbles showing their reasoning in real time make it feel like you're eavesdropping on the spirits' inner monologue.
We're also pretty proud that you can throw basically any model at this thing and it'll work. The parsing fallbacks are ugly under the hood, but from the outside, Gemini Flash and Claude Sonnet just... play the game. You can even pit them against each other and see who's the better medium.
What we learned
LLM structured output is more of a polite suggestion than a contract. If your app depends on getting clean JSON back, you need a plan B. And a plan C.
Prompting for game AI is nothing like prompting for chat. You're not asking the model to be helpful — you're asking it to win. That requires encoding strategy, risk assessment, and even a bit of game theory into the prompt. It's a completely different skill.
Also, hidden-information games might be one of the best ways to stress-test LLM reasoning. They need theory of mind ("what does the other team know?"), risk management ("is this letter safe to reveal?"), and deduction under uncertainty. It's a harder problem than it looks.
What's next for Phantom Ink inspired Game with Gemini
Online multiplayer is the big one — right now it's local only, and this game really wants to be played with friends in different rooms. Beyond that, a tournament mode where different models compete in brackets, and post-game analytics that break down which clues were brilliant, which silence calls were too early, and which AI is actually the best at reading between the letters.
Log in or sign up for Devpost to join the conversation.