joshuadanpeterson / prisoners_dilemma

Explore the classic dynamics of trust and self-interest in the Prisoner's Dilemma game.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prisoner's Dilemma Game

Dive into the fascinating world of strategic decision-making with the classic Prisoner's Dilemma game! Challenge your ability to trust, strategize, and understand the dynamics of cooperation and self-interest.

Overview

The Prisoner's Dilemma is a scenario where two players must decide whether to cooperate or defect. Each player's choice affects both their own outcome and the other player's outcome. Depending on the combined choices, different outcomes emerge, illustrating the tension between cooperation and individual gain.

How to Play

  1. Clone or download this repository to your local machine.
  2. Run the game script (prisoner_dilemma.py) using a Python interpreter.
  3. Enter your choices as Player A and Player B when prompted, choosing between 'cooperate' and 'defect'.
  4. Discover the consequences of your choices and the resulting outcome.
  5. Decide whether to play again or end the game.

Features

  • User-friendly text-based interface.
  • Clear explanations of the game and choices at play.
  • Option to replay the game as many times as desired.
  • Explore the classic dilemma and its implications for decision-making.

Requirements

  • Python 3.x

Get Started

  1. Clone the repository:

git clone https://github.com/joshuadanpeterson/prisoners-dilemma-game.git

  1. Navigate to the game directory:

cd prisoners-dilemma-game

  1. Run the game script:

python prisoner_dilemma.py

Play on Replit

Click here to play on Replit

Contribution

Contributions are welcome! If you find any issues or want to enhance the game, feel free to create a pull request.

License

This project is licensed under the MIT License.

Enjoy the game and explore the delicate balance between trust and self-interest in decision-making!

About

Explore the classic dynamics of trust and self-interest in the Prisoner's Dilemma game.

License:MIT License


Languages

Language:Python 100.0%