Welcome to the Prisoner's Dilemma Simulation Project! This is an open-source, experimental project aimed at exploring various strategies in the classic game theory puzzle known as the Prisoner's Dilemma. The goal is to create a comprehensive simulation environment where multiple strategies can be tested, compared, and evolved over time.
The project is currently under development as a personal experiment.
- Simulation Engine: A Python-based simulation engine that allows for pairwise Prisoner's Dilemma games.
- Strategy Implementation: A variety of predefined strategies.
- Metrics and Analysis: Detailed analytics for each strategy, including total score, cooperation rate, win rate, and more.
- NxN Strategy Simulations: Expand the simulation to accommodate NxN strategy interactions, allowing for more complex and dynamic simulations with multiple players interacting simultaneously, modelling more accurately what happens in the real world.
- Reinforcement Learning Integration: Interest to integrate reinforcement learning, to evolve and optimize strategies based on game outcomes (need help!).
Any contributions welcome! If you have a strategy or an idea you'd like to test, here's how you can contribute:
- Submitting Strategies:
- Current Method: Send a Pull Request (PR) or open a GitHub issue with your proposed strategy.
- Future Method: If any interest is shown, I will move the strategies to a separate, imported folder, making it easier to contribute.
- Code Contributions: Feel free to contribute to the codebase, whether it's improving the simulation engine, adding new features, or fixing bugs.
- Documentation: Help in improving documentation, anything really.
- Clone the Repository: Start by cloning the repo to your local machine.
- Set Up Your Environment: Ensure you have Python installed. It's recommended to use a virtual environment.
- Install Dependencies: Install the required Python packages (e.g.
python3 -m pip install -r requirements.txt
). - Run a Simulation: Run the notebook.
- Experiment: Experiment with existing strategies or contribute your own.
- Discussion and Support: Join our community chat on Discord for discussions, support, and sharing ideas.
This project is open source and available under the MIT License.
Thank you for your interest in the Prisoner's Dilemma Simulation! 🚀🎮