negotiatewithai

AI Negotiation Game

📌 Overview

The AI Negotiation Game is an interactive, text-based negotiation game where players must persuade an AI-controlled villain to agree to a deal. The game is built using Google Gemini AI for dynamic conversations and Reddit’s Devvit API for integration with Reddit’s interactive posts.

🎯 Features

  • AI-Generated Scenarios: Unique negotiation storylines with dynamic villains.
  • Limited Responses: Players can only send 5 messages with a character limit per message.
  • Adaptive AI: The villain responds based on personality, motivations, and player arguments.
  • Final Verdict & Feedback: AI determines if the player won or lost and provides constructive feedback.
  • Reddit Integration: Players can post their negotiation logs on Reddit for community voting.

🛠️ Tech Stack

  • Google Gemini AI – AI-driven responses and decision-making.
  • Reddit Devvit API – Interactive post integration.
  • TypeScript/JavaScript – Backend logic for game processing.

🚀 Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/MurikiSaiSrinivas/negotiatewithai.git
cd negotiatewithai

2️⃣ Install Dependencies

npm install

3️⃣ Set Up Environment Variables

Add the gemini-api-key to the secret storage:

devvit settings set gemini-api-key

4️⃣ Run the Devvit App

devvit playtest negotiatewithai

4️⃣ Open the Devvit App

URL: https://www.reddit.com/r/negotiatewithai/?playtest=negotiatewithai

📜 Game Flow

  1. Start Game → AI generates a scenario, villain profile, and first message.
  2. Player Negotiates → Sends up to 5 messages, villain responds dynamically.
  3. Final Verdict → AI determines if the negotiation was successful and provides feedback.
  4. Share on Reddit → Players can post the conversation to Reddit for community votes.
  5. Restart → Users can start a new negotiation scenario anytime.

🎮 Example Gameplay

Example Scenario (Generated by AI):

The year is 2099. A notorious hacker named Razor has stolen classified government files. You, an intelligence officer, must convince Razor to return the files without leaking them.

Villain: "Well, well, looks like the government finally sent someone who wants to talk. What do you have for me?"

Player Response:

"I can offer you partial immunity if you return the files."

Villain Response:

"Hah! Immunity from what? You think I’m scared of your justice system? Give me something real, or this conversation is over."

Final Verdict:

"Fine. You drive a hard bargain, but I’ll take it. Just make sure I get out of here safely."
Verdict: WIN ✅
Feedback: "You used logic well, but next time, start with a lower offer to have room to negotiate up."

🔥 Future Enhancements

  • Multiplayer Mode – Team-based negotiations.
  • Leaderboards – Ranking system for best negotiators.
  • More Negotiation Styles – Aggressive, passive, logical approaches.

🚀 Ready to negotiate? Start playing now in r/negotiatewithai!

Visit original content creator repository
https://github.com/MurikiSaiSrinivas/negotiatewithai

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *