Inspiration
Reddit thrives on community-driven storytelling and social interaction. We wanted to bring the classic party game Mafia into Reddit in a way that feels native, scalable, and enhanced by AI. By combining Reddit threads with AI moderation and narration, we saw an opportunity to create a persistent, asynchronous social deduction experience that anyone can join.
What it does
Got it โ youโre filling out a hackathon project submission (likely Devvit/Reddit-related). Below is a clean, ready-to-paste draft you can edit. Iโll assume your project is an AI-powered Mafia game on Reddit.
Inspiration
Reddit thrives on community-driven storytelling and social interaction. We wanted to bring the classic party game Mafia into Reddit in a way that feels native, scalable, and enhanced by AI. By combining Reddit threads with AI moderation and narration, we saw an opportunity to create a persistent, asynchronous social deduction experience that anyone can join.
What it does
Mafia Game is an AI-powered social deduction game that runs inside Reddit using Devvit.
Players join a game thread and are assigned hidden roles such as Mafia, Detective, or Villager. The game progresses through day and night cycles:
๐ Night: Mafia chooses a target, Detective investigates. โ๏ธ Day: Players discuss in comments and vote to eliminate suspects. ๐ค AI Narrator: Summarizes discussions, advances the story, and enforces rules.
The AI helps: Summarize long comment threads Detect valid votes Keep the game moving
Create immersive narrative updates
How we built it
We built Mafia Game using: Devvit to integrate directly with Reddit posts and comments Reddit API for player interaction and voting
AI (LLMs) to: Summarize discussions Generate narrative updates Validate actions and votes
Node.js / TypeScript for game logic and state management
The game engine tracks: Player roles Game phases Win conditions
Challenges we ran into
- Parsing unstructured comments
Ran out of gemini and openAI credits while testing and couldn't tell from the logs at first.
Preventing chaos in large threads Reddit threads can become noisy. We used AI summaries to keep gameplay clear and focused.
Fairness & moderation Ensuring the AI narrator stays neutral and enforces rules consistently required careful prompt design and safeguards.
Async gameplay Unlike real-time Mafia, Reddit is asynchronous. We built timers and phase transitions that work across time zones.
Accomplishments that we're proud of
๐ฎ Fully playable game inside Reddit comments ๐ค AI narrator that enhances immersion instead of replacing players ๐ Automatic vote tracking and phase management ๐ Asynchronous gameplay that works globally ๐งฉ Scalable design that supports many players
What we learned
AI works best as a facilitator, not a replacement for human interaction. Designing for Reddit requires embracing asynchronous, chaotic discussions. Clear system prompts are critical for consistent AI moderation. Social deduction games thrive when players feel agency and mystery.
What's next for Mafia Game
๐ง Smarter AI summaries and deception detection ๐ Persistent stats and leaderboards ๐ Notifications for phase changes ๐งต Multi-thread or cross-subreddit tournaments ๐ก๏ธ Anti-cheating and alt-account detection
Built With
- devvit
- express.js
- gemini
- openai
- react
- redis
- server
- vite
- webview
Log in or sign up for Devpost to join the conversation.