Negotiate With AI – Hack Reddit 2025 Submission
Inspiration
I’ve always been fascinated by how characters navigate high-stakes situations in movies and TV shows. Often, I imagine how I would handle those moments differently. This inspired me to create a game where players test their negotiation skills in intense AI-generated scenarios.
At the same time, I didn’t want a predictable experience where you hear the same scripted dialogues. Instead, I built a dynamic AI-driven system that generates unique scenarios based on 300 different themes, some inspired by movies. This ensures an ever-evolving challenge where no two negotiations are alike—offering endless debates and arguments to tackle.
What It Does
Negotiate With AI is a text-based negotiation game where players must persuade an AI-controlled villain within a limited number of messages. The AI evaluates how well the player negotiates and provides feedback on their persuasion and decision-making skills.
Gameplay Flow:
- Starting a Game:
- AI generates a random negotiation scenario, a unique villain, and an opening message.
- AI generates a random negotiation scenario, a unique villain, and an opening message.
- User Sends Up to 5 Messages:
- Each message has a character limit, adding to the challenge.
- The AI villain dynamically responds (4 times).
- Each message has a character limit, adding to the challenge.
- Final Verdict:
- AI evaluates the negotiation and determines success or failure.
- AI provides feedback on the user’s persuasion skills.
- AI evaluates the negotiation and determines success or failure.
- Sharing on Reddit:
- Players can post their results on Reddit for others to vote on the best strategies.
- Players can post their results on Reddit for others to vote on the best strategies.
How We Built It
Core Technologies:
- Google Gemini AI – Generates scenarios, villain responses, and evaluates negotiation success.
- Reddit’s Devvit API – Handles interactive posts and automation.
- JavaScript/TypeScript – Powers the game logic and AI interactions.
Development Process:
- Set Up Environment – Configured Devvit API, Gemini AI, and defined the storage structure.
- AI Scenario Generation – Created dynamic AI prompts for generating unique scenarios.
- Negotiation Logic – Developed AI villain responses and implemented win/loss conditions.
- Reddit Integration – Automated the posting of game results.
- User Experience Improvements – Added restart functionality, character limits, and adaptable AI responses.
- Testing & Debugging – Fine-tuned AI prompts, optimized response logic, and improved Reddit post formatting.
Challenges We Ran Into
- Devvit Limitations – Learning the constraints of Reddit’s Devvit API took time.
- SVG Issues – Devvit blocks only support SVGs, but embedding them didn’t work as expected.
- Switching to Devvit WebView – Since images weren’t working, I moved the game to Devvit WebView, a framework I had never used before. Fortunately, the documentation helped.
- AI Integration with WebView – Connecting Gemini AI while ensuring secure secret storage was a major challenge.
Accomplishments That We're Proud Of
- Successfully built a fully interactive AI-powered negotiation game in a short timeframe.
- Overcame Devvit WebView challenges and created a smooth player experience.
- Implemented a dynamic scenario system, ensuring infinite replayability.
- Integrated Reddit community engagement, allowing players to share and discuss their negotiation results.
What We Learned
- How to leverage Gemini AI for scenario-based storytelling.
- How to navigate the Devvit API and its limitations.
- The power of WebView for creating more flexible Reddit applications.
- Best practices for handling AI-generated content within interactive experiences.
What's Next for Negotiate With AI
To enhance the game further, I plan to add:
Scenario Sharing & Competitive Mode:
- Players can play each other’s past scenarios and compare their negotiation skills.
- Players can play each other’s past scenarios and compare their negotiation skills.
Daily AI-Generated Scenarios:
- Instead of only posting games played by users, an AI-generated negotiation scenario will be posted daily. This will encourage community-wide discussions and strategy sharing.
- Instead of only posting games played by users, an AI-generated negotiation scenario will be posted daily. This will encourage community-wide discussions and strategy sharing.
Gamification & Leaderboards:
- Players will earn points for successful negotiations and see their ranking on a leaderboard.
- Players will earn points for successful negotiations and see their ranking on a leaderboard.
Multiplayer Mode:
- Users will be able to team up and negotiate together.
- Users will be able to team up and negotiate together.
Role-Based Play:
- Players can switch roles and take on the villain’s perspective, testing their ability to resist persuasion.
- Players can switch roles and take on the villain’s perspective, testing their ability to resist persuasion.
🚀 This is just the beginning! Excited to see where this project goes next. 🎉
🔗 Useful Links:
Reddit Devvit WebView Docs
Built With
- css
- devvit
- gemini
- html5
- typescript
Log in or sign up for Devpost to join the conversation.