chiralevy / prisoners-dilemma-game

A CLI game simulating the dynamics of a prisoner's dilemma.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prisoner's Dilemma Game

Several years ago, I made a CLI game simulating the dynamics of one of my favorite frameworks in game theory--the prisoner's dilemma. To make this game, I just used Python object-oriented programming and a little creativity. My file is heavily commented such that every function used has a correponding explanation. It also has the following description at the top which succintly introduces the setting and rules of the game:

A great deal of game theory explores how competing people decide when the consequences of their decisions depend of the actions of others. In this program, I simulate a classic example of a game analyzed in game theory known as the prisoner's dilemma. In the game, two criminals (here, you and someone else) are being interrogated and must either confess to a crime or keep quiet. Whether you are freed or imprisoned is contingent upon the actions of the other criminal.

About

A CLI game simulating the dynamics of a prisoner's dilemma.


Languages

Language:Python 100.0%