Ever wondered what happens when super-smart AI isn't just a tool, but a player in a crazy game of lies, strategy, and survival? This Danganronpa Simulator puts 12 AI agents against each other in a text-based social deduction game - think Mafia, Among Us, or Goose Goose Duck, but where every character is controlled by an AI with its own unique personality and motivations.
🎮 Play the Game Now: https://danganronpa.app/ 🎮
-
Watch Recorded Gameplay: YouTube Playlist
-
Watch the full development journey on the YouTube Tutorial.
-
Read the story and philosophy behind the development on Substack: Part 1, Part 2.
If LLMs are smart, why do many AI interactions in games still feel a bit... meh? We think the secret sauce is giving AIs more personality and putting them in a game that forces them to show it. So, we built The Danganronpa Simulator!
Why Danganronpa? Because it's the perfect pressure cooker for AI!
-
Wild, Built-in Characters: From the "Ultimate Detective" to the "Ultimate Supreme Leader," these aren't boring roles; they're deep character studies waiting for an AI to jump in.
-
Gameplay That Creates Drama and Deception: The constant danger and public accusations force AIs to think strategically, team up, betray each other, and fight for their (virtual) lives.
So, How Does This Game Actually Work? 12 (AI) players are thrown into this high-stakes game of survival and deception - think Mafia, Among Us, or Goose Goose Duck. Here's a look at how it unfolds:
Meet the "Ultimate" Students: These are some of the characters you might encounter, each with their own unique personalities and talents, ready to be embodied by our AI agents:
Watch Recorded Gameplay:
Immerse yourself in the AI-driven chaos! Check out our playlist:
Want to run the Danganronpa Simulator on your own machine?
-
Clone the Repository:
git clone https://github.com/The-Pocket/PocketFlow-Tutorial-Danganronpa-Simulator cd PocketFlow-Tutorial-Danganronpa-Simulator
-
Install Dependencies: (Python 3.8+ required)
pip install -r requirements.txt
-
Set Up Your LLM:
-
Option 1: Gemini 2.5 Flash (Recommended)
This project uses Google Gemini by default. You can either:
- Set your own environment variables for Vertex AI:
GEMINI_PROJECT_ID
andGEMINI_LOCATION
. - Or, get a key from Google AI Studio and set the
GEMINI_API_KEY
environment variable.
- Set your own environment variables for Vertex AI:
-
Option 2: Use Other LLMs
Feel free to use other LLMs like OpenAI, Anthropic, or even local Llama models. You will need to modify the
call_llm_async
function inutils/call_llm.py
. It should be anasync
function that takes aprompt
(string) as input and returns the LLM's response (string).See more on implementing LLM utility functions for PocketFlow: PocketFlow LLM Utility Guide
You can verify if your LLM setup works by running:
python utils/call_llm.py
-
-
Run the Streamlit App:
streamlit run app.py
Open your browser to the local URL provided (usually
https://localhost:8501
).
I built using Agentic Coding, the fastest development paradigm, where humans simply design and agents code.
The secret weapon is Pocket Flow, a 100-line LLM framework that lets Agents (e.g., Cursor AI) build for you.
Check out the Step-by-step YouTube development tutorial:
app.py
: The main Streamlit application; handles UI, game state, and orchestrates agent turns.flow.py
: Defines PocketFlow execution flows for AI agents (sequential/parallel decisions).nodes.py
: Implements theDecisionNode
, the core AI logic where characters think and act.utils/call_llm.py
: Utility for asynchronous calls to the LLM.assets/
: Contains static assets:assets/texts.py
: Character intros, Monokuma's dialogue, etc.- Character folders (e.g.,
assets/Shuichi/
): Sprites and voice lines.
docs/design.md
: The comprehensive design document.