An open API service indexing awesome lists of open source software.

https://github.com/chrisgrieser/axelrod-prisoner-dilemma

Recreation of the prisoner's dilemma model from Axelrod's "Evolution of Cooperation" in Python
https://github.com/chrisgrieser/axelrod-prisoner-dilemma

axelrod-model prisoner-dilemma-simulation sociology

Last synced: 20 days ago
JSON representation

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

Awesome Lists containing this project

README

        

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

Usage via command line:

```bash
# install dependencies
make init
```

```bash
# 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):

```conf
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:
- [Citation File Format](./CITATION.cff)
- [BibTeX](./CITATION.bib)