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

  1. Parsing unstructured comments
  2. Ran out of gemini and openAI credits while testing and couldn't tell from the logs at first.

  3. Preventing chaos in large threads Reddit threads can become noisy. We used AI summaries to keep gameplay clear and focused.

  4. Fairness & moderation Ensuring the AI narrator stays neutral and enforces rules consistently required careful prompt design and safeguards.

  5. 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

Share this project:

Updates