An interactive game theory experiment exploring cooperation, betrayal, and the emergence of trust.
Built with React · TypeScript · Vite
Why do strangers cooperate? Why do friends betray? And what does game theory have to say about it?
The Trust Paradox is an interactive web experience that walks you through the iterated Prisoner's Dilemma — one of the most studied problems in game theory — as a narrative-driven story. Rather than reading equations, you play the game, meet different strategies as characters, watch them compete, and see trust evolve in populations over time.
Inspired by Veritasium's video on the Prisoner's Dilemma and Robert Axelrod's foundational research on cooperation. Read more about the research here Axelrod's The Evolution of Cooperation
| Section | What You'll Do |
|---|---|
| 🏠 The Game | Learn the rules of the Prisoner's Dilemma through hands-on play |
| 👥 Meet the Characters | Play rounds against 7 distinct strategies and see how they think |
| 🏆 The Tournament | Watch all strategies compete in a round-robin tournament |
| 🧬 Evolution | Observe populations evolve over generations — who survives? |
| 🕹️ Sandbox | Freely experiment with any matchup and parameters |
| 📖 Lessons | Discover the key takeaways about trust, cooperation, and game theory |
Each strategy represents a different philosophy on trust:
| Strategy | Color | Behavior |
|---|---|---|
| Copycat (Tit-for-Tat) | 🔵 | Cooperates first, then mirrors your last move — the golden rule |
| Always Cooperate | 🟢 | Unconditional kindness, no matter what |
| Always Cheat | 🔴 | Pure selfishness, exploits everyone |
| Grudger | 🟣 | Cooperates until betrayed once, then cheats forever |
| Detective | 🟡 | Plays C, D, C, C to probe you — then exploits or reciprocates |
| Copykitten | 🩷 | Like Copycat, but forgives a single cheat — only retaliates after two in a row |
| Random | 🟠 | Flips a coin each round — chaos incarnate |
# Clone the repository
git clone https://github.com/smithg09/the-trust-paradox.git
cd the-trust-paradox
# Install dependencies
npm install
# Start the development server
npm run devThe app will be running at http://localhost:5173.
Contributions are welcome! Whether it's a bug fix, new strategy, UI improvement, or documentation update — all help is appreciated.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- What Game Theory Reveals About Life, The Universe, and Everything by Veritasium — the video that inspired this project
- The Evolution of Cooperation by Robert Axelrod — the foundational research
- Prisoner's Dilemma — Wikipedia overview of the game