{"id":17166729,"url":"https://github.com/willf/prisoner","last_synced_at":"2025-03-24T18:15:45.360Z","repository":{"id":4118212,"uuid":"5228855","full_name":"willf/prisoner","owner":"willf","description":"Iterative Prisoners' Dilemma tournament (Clojure)","archived":false,"fork":false,"pushed_at":"2022-02-06T20:34:21.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T12:52:25.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-30T05:57:46.000Z","updated_at":"2022-02-06T02:46:57.000Z","dependencies_parsed_at":"2022-07-21T12:18:00.546Z","dependency_job_id":null,"html_url":"https://github.com/willf/prisoner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2Fprisoner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2Fprisoner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2Fprisoner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2Fprisoner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willf","download_url":"https://codeload.github.com/willf/prisoner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245325221,"owners_count":20596818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T23:06:30.042Z","updated_at":"2025-03-24T18:15:45.334Z","avatar_url":"https://github.com/willf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iterative Prisoners' Dilemma tournament\n\n## Python\n\nFor now:\n\n    $ python prisoner.py -1\n\n```\nusage: prisoner.py [-h] [--rounds ROUNDS] [--random RANDOM] [--titfortat TITFORTAT] [--eviltitfortat EVILTITFORTAT]\n                   [--cooperator COOPERATOR] [--defector DEFECTOR] [--titfortwotats TITFORTWOTATS] [--oneplayer]\n\nPlay a tournament of Prisoners Dilemma\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --rounds ROUNDS       Number of rounds in the tournament\n  --random RANDOM, -r RANDOM\n                        Number of random players to add to the tournament\n  --titfortat TITFORTAT, -t TITFORTAT\n                        Number of titfortat players to add to the tournament\n  --eviltitfortat EVILTITFORTAT, -e EVILTITFORTAT\n                        Number of evil titfortat players to add to the tournament\n  --cooperator COOPERATOR, -c COOPERATOR\n                        Number of cooperator players to add to the tournament\n  --defector DEFECTOR, -d DEFECTOR\n                        Number of defector players to add to the tournament\n  --titfortwotats TITFORTWOTATS, -2 TITFORTWOTATS\n                        Number of titfortwotats players to add to the tournament\n  --oneplayer, -1       Add one player of each type to the tournament\n```\n\nModify the code to create new players, etc.\n\n## Clojure\n\nFor now:\n\n    $ lein repl\n    \u003e (load \"prisoner\")\n    \u003e (tourney 1000 (concat (create-players) (create-players)))\n\nTo create a new player:\n(1) write the code — use tit-for-tat as an example\n(2) add to (create-players) function for ease of access\n\nTODO:\n\n- probably best to fix how deep the history goes back\n- add Press/Dyson players\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillf%2Fprisoner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillf%2Fprisoner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillf%2Fprisoner/lists"}