Skip to content

Recreation of the prisoner's dilemma model from Axelrod's "Evolution of Cooperation" in Python

License

Notifications You must be signed in to change notification settings

chrisgrieser/axelrod-prisoner-dilemma

Repository files navigation

Axelrod Prisoner's Dilemma

Simple Recreation of the prisoner's dilemma model from Axelrod's "Evolution of Cooperation."

Usage via command line:

# install dependencies
make init
# activate virtual environment
source ./.venv/bin/activate

# show API docs
make docs

# Main Usage (Output to terminal):
python3 prisoner_dilemma/main.py "actor1_strategy" "actor2_strategy"

# Battle Royale — every strategy against every strategy (Output to html):
python3 prisoner_dilemma/main.py --all

# Help
python3 prisoner_dilemma/main.py --help

Output

for --all (Battle Royal):

Pasted image 2023-08-28 at 18 26 01@2x

Recommended Citation

Please cite this software project as (APA):

Grieser, C. (2023). Simulation of Axelrod prisoner’s dilemma [Computer
software]. https://github.com/chrisgrieser/axelrod-prisoner-dilemma

For other citation styles, use the following metadata:

About

Recreation of the prisoner's dilemma model from Axelrod's "Evolution of Cooperation" in Python

Topics

Resources

License

Stars

Watchers

Forks