Prisioner’s Dilemma Challenge

Add to wishlistAdded to wishlistRemoved from wishlist 2


Prisioner’s Dilemma Challenge
Prisioner’s Dilemma Challenge




Prisioner’s Dilemma Coding Challenge


One of Practity’s Python projects advanced, is the prisioner’s dilemma simulator where you must test different strategies under several scenarios. The prisoner’s dilemma, one of the most famous game theories, was conceptualized by Merrill Flood and Melvin Dresher in 1950. It was later formalized and named by Canadian mathematician, Albert William Tucker.
The prisoner’s dilemma basically provides a framework for understanding how to strike a balance between cooperation and competition and is a useful tool for strategic decision-making.
You will have to write functions to ensure each player faces off against each other player, calculate the score of each player and determine the outcome of the game based on the player strategies. For example, when all players are cooperators or when some of the them are defectors and the rest are cooperators.
Moreover, there is a guidelines section where Emma breaks down the project in 8 steps and provide hints to complete the challenge. But it is an advanced Python practice project, not a tutorial, so you will have to come up with the final solution.
The project is also a basic OOP challenge since you will you have to create classes and write methods.

Emma Bateman
is a software engineer based in the US. She holds a Bachelor of Science (B.S.), Computer science and a Master of Computational Linguistics.

You will receive an email with a ZIP file. The download is also available on your Practity account.
The ZIP file includes:
1) INSTRUCTIONS: A PDF with the project description. It includes the guidelines section mentioned above to help you complete the challenge step by step.
2) SOLUTIONS: A Jupiter Notebook including detailed explanations and comments about how the code works. The source code provided in the solutions has been written by a senior developer so it is clean and easy to understand. A great way to learn and adopt right habits to create quality software.
IMPORTANT: To see the solutions (Notebook) you need to have Jupyter or the ANACONDA package installed on your machine. If you do not have it,  you may download it here. It is free.

– Ranges.
Classes and methods.
– Lists comprehension
– Conditional statements.
– Loops (for).
Function creation.

Python projects advanced are highly recommended for Python  students who have already finished other projects and python programming exercises successfully. The difficulty of this particular python challenge is to understand the dilemma and code it.

If you need additional information, do not hesitate to contact us.



Python and Excel Projects for practice
Register New Account
Shopping cart