Inspiration
I wanted to build something that merges Reddit’s native mechanics (comments and upvotes) with structured reasoning and gamified participation. The Puzzle Chain was inspired by the way Redditors naturally “chain” thoughts and theories in threads from AMAs to mystery-solving subs like r/UnresolvedMysteries and r/riddles.
Our goal: transform that natural, chaotic reasoning flow into an actual logic game where players collectively construct a reasoning chain and an AI can keep the puzzles flowing.
What it does
The Puzzle Chain is an AI-powered Reddit community logic game that lets users solve puzzles collaboratively through comment threads.
Here’s how it works:
An AI Puzzle Generator creates a new logic puzzle and posts it to a subreddit via our Reddit bot.
Players reply in comments with reasoning moves each move states a claim and the logic behind it.
Upvotes decide which reasoning chains are valid.
If a move reaches the vote threshold, it becomes part of the “official” puzzle chain.
The Bot monitors the thread, tracks moves, validates structure, and records accepted reasoning chains in a small database.
A Next.js dashboard visualizes puzzles, progress, and links to live Reddit discussions.
Essentially, Redditors are building a crowd-sourced logical proof, one comment at a time turning reasoning into a multiplayer experience.
How we built it
Frontend: Built with Next.js (React) and Tailwind, the UI displays puzzles, links to live Reddit threads, and visualizes accepted reasoning chains. It uses SWR and Axios for real-time fetch and revalidation from the backend Nodejs MongoDB.
Backend / Bot: Developed in Node.js with Express and snoowrap, our Reddit bot:
Posts formatted puzzle threads automatically to a subreddit.
Stores and tracks puzzles in a lightweight lowdb JSON database.
AI Puzzle Generator: Uses a prompt-tuned model (e.g., gpt-4o-mini) to output valid JSON puzzles with clues, description, and solution. The system prompt ensures consistency and safe output validation.
Integration flow:
Admin requests /admin/generate-and-post.
AI returns JSON → Bot posts puzzle to Reddit → Database updates → UI reflects new puzzle.
Challenges we ran into
Parsing AI output safely AI models sometimes returned extra formatting or text. We had to implement regex-based extraction and plan schema validation (using zod) to enforce strict puzzle structures.
Reddit API rate limits Managing multiple submissions and comment scans under Reddit’s strict API quotas was challenging, especially when fetching vote updates frequently.
Vote tracking logic Designing fair thresholds and timing windows (e.g., 12 hours + X upvotes = accepted) while keeping the game dynamic required testing with dummy data.
Synchronizing Reddit ↔ Database ↔ UI We needed a simple but reliable persistence layer. We used lowdb JSON for speed and prototyping — with clear upgrade paths to Postgres later.
Designing puzzles that Reddit loves The puzzles had to be short, engaging, and clear enough to fit in a single post. Balancing complexity with accessibility was a creative and UX challenge.
Accomplishments that we're proud of
Built a fully functional Reddit-integrated bot that automatically posts AI-generated puzzles.
Created a Next.js visual dashboard that links Reddit logic threads in real time.
Designed an AI puzzle schema that outputs valid, parseable JSON — reliably, 90%+ of the time.
Showed how social reasoning can become a structured game — using Reddit’s own upvotes as a game mechanic.
Demonstrated true AI + community + logic synergy: human deduction guided by AI creativity.
What we learned
How to build a moderation-aware Reddit bot using snoowrap and manage post/comment permissions effectively.
The importance of structured prompting and JSON validation for reliable AI workflows.
How to leverage Reddit’s native interaction systems (upvotes/comments) as real-time game inputs.
Deepened our understanding of game design for social platforms — engagement, fairness, and replayability.
Gained experience integrating AI-driven creativity with community-led logic and reasoning.
What's next for The_Puzzle_Chain
We’re excited to push this further. Upcoming plans include:
Real-time comment scanning Bot will track Reddit threads live, marking “accepted” moves and updating visual chains dynamically in the UI.
Leaderboard system Introduce player profiles, points, and achievement badges (e.g., “Logic Architect”, “Puzzle Breaker”).
Community puzzle submissions Let Redditors craft their own puzzles — validated by AI before posting.
AI explanation mode After a puzzle is solved, the bot will post a concise logical walkthrough using the AI model.
Multiplayer tournaments & Discord integration Create team-based puzzle relays and cross-subreddit competitions.
Database & analytics upgrades Move from local lowdb to a hosted PostgreSQL with Prisma ORM for production scalability.
Log in or sign up for Devpost to join the conversation.