DilemmaForge Inspiration
Reddit is one of the largest real-world laboratories of human behavior ever created. Every day, millions of people coordinate, argue, trust, betray, meme, and self-organize.
We asked a simple question:
What if we turned Reddit itself into a living game-theory experiment?
Classic daily games like Wordle hook users through routine and anticipation. But they are solitary. Reddit thrives on collective behavior. We wanted to build something that captures that collective tension — the psychological tug-of-war between short-term self-interest and long-term cooperation.
The foundation is the Iterated Prisoner’s Dilemma, a core concept in game theory:
T>R>P>S T>R>P>S
Where:
T T = Temptation to defect
R R = Reward for mutual cooperation
P P = Punishment for mutual defection
S S = Sucker’s payoff
In repeated play, cooperation can outperform betrayal — but only if trust emerges.
DilemmaForge brings that dynamic to Reddit.
What it does
DilemmaForge is a daily Reddit-native Prisoner’s Dilemma game.
Each day:
Every user chooses:
🟢 Cooperate
🔴 Defect
Votes are anonymous and locked for the day.
At midnight UTC, the community’s collective outcome is revealed.
Payoffs:
≥70% Cooperate → everyone earns +3
≥70% Defect → everyone earns +1
Mixed → defectors earn +5, cooperators earn 0
Users build:
Total score
Streaks
Personal vote history
Shareable emoji grids (Wordle-style)
Over time, the subreddit evolves its own strategy culture:
Do we trust?
Do we punish defectors?
Do we coordinate in comments?
It’s not just a game — it’s a daily social experiment.
How we built it
DilemmaForge is built using:
Reddit Devvit for Interactive Posts
TypeScript for backend logic
Redis for vote persistence and aggregate storage
WebView UI for a mobile-first swipe interface
Architecture Overview
- Vote Layer
Per-user, per-post, per-UTC-day vote keys
Idempotent vote submission
Locked state after submission
- Aggregation Engine
Real-time vote counts
Midnight UTC finalization
Deterministic payout calculation
Idempotent “finalizeDay” logic
- State Engine
User score tracking
Streak calculation
Longest streak persistence
Emoji grid generation
- Reveal System
Outcome classification (Cooperate / Mixed / Defect)
Visual state transitions
Community percentage display
We prioritized:
Clean, deterministic backend logic
Mobile-first interaction
Clear daily loop mechanics
Simplicity over feature sprawl
Challenges we ran into
- UTC Day Boundaries
Ensuring one vote per user per day sounds simple — until you handle:
Timezones
Midnight rollovers
Late reveal states
Idempotent finalization
We implemented strict UTC-based day keys and safe finalize logic to prevent race conditions.
- Idempotent Reveal Logic
If multiple users open the post after midnight, the reveal must:
Trigger once
Never double-apply payouts
Return consistent results
We built a deterministic, idempotent finalize system to solve this.
- Balancing Strategy vs Simplicity
Too complex → confusing. Too simple → boring.
We tuned the payoff structure to maintain:
Short-term temptation
Long-term cooperation incentives
Community-driven meta behavior
- Mobile UX Constraints
Reddit usage is heavily mobile. We built:
Swipe-first interaction
Large tap targets
Locked states
Clear reveal transitions
The experience had to feel immediate and tactile.
Accomplishments that we're proud of
Turning abstract game theory into a playable, daily Reddit-native experience
Designing a deterministic aggregation engine with safe finalization
Building a system that encourages emergent community strategy
Creating a shareable emoji grid for viral discussion
Delivering a polished interactive post rather than a prototype
Most importantly, we built something that feels native to Reddit culture.
What we learned
Game theory becomes powerful when social. The Prisoner’s Dilemma is far more compelling when thousands participate.
Iteration changes behavior. In repeated play, cooperation can emerge — even in anonymous systems.
Constraints drive clarity. Limiting scope (one vote per day) made the experience stronger.
Idempotency is critical in distributed social systems. Handling race conditions and time boundaries properly is essential.
Reddit is uniquely suited for emergent coordination. The comments become part of the game.
What’s next for DilemmaForge
This is just the beginning.
Planned expansions:
Subreddit vs subreddit tournaments
Adaptive payoff matrices
Strategy analytics dashboards
Cooperative streak bonuses
Evolution tracking graphs
Themed daily dilemmas
Long-term reputation systems
Long term, DilemmaForge can become:
A persistent, Reddit-wide trust simulation.
A living dataset of collective behavior. A sandbox for cooperation experiments. A daily ritual that turns Reddit into a strategic ecosystem.
Built With
- css
- devvit
- html5
- javascript
- node.js
- npm
- redis
- typescript
- webview
Log in or sign up for Devpost to join the conversation.