{"id":22004160,"url":"https://github.com/electric-eloquence/game-of-drones","last_synced_at":"2026-05-18T06:36:58.432Z","repository":{"id":146532993,"uuid":"295999934","full_name":"electric-eloquence/game-of-drones","owner":"electric-eloquence","description":"An Iterated Prisoner's Dilemma simulation","archived":false,"fork":false,"pushed_at":"2020-10-21T17:29:37.000Z","size":7853,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T15:46:48.016Z","etag":null,"topics":["automata","cellular","cellular-automata","game","game-theory","javascript","simulation","theory"],"latest_commit_sha":null,"homepage":"https://electric-eloquence.io/game-of-drones.html","language":"JavaScript","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/electric-eloquence.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-16T10:28:31.000Z","updated_at":"2024-11-30T10:48:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"84004409-71cb-47cb-84e9-a6bb1e2245da","html_url":"https://github.com/electric-eloquence/game-of-drones","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/electric-eloquence/game-of-drones","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Fgame-of-drones","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Fgame-of-drones/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Fgame-of-drones/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Fgame-of-drones/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electric-eloquence","download_url":"https://codeload.github.com/electric-eloquence/game-of-drones/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Fgame-of-drones/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269980994,"owners_count":24507274,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["automata","cellular","cellular-automata","game","game-theory","javascript","simulation","theory"],"created_at":"2024-11-30T00:12:25.821Z","updated_at":"2026-05-18T06:36:53.410Z","avatar_url":"https://github.com/electric-eloquence.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Game of Drones](https://electric-eloquence.io/game-of-drones.html)\n\n## The Donald vs. Karens\n\n[**drone**](https://www.merriam-webster.com/dictionary/drone) \u0026nbsp;noun  \n\\ *ˈdrōn* \\\n\n\u003e one that lives on the labors of others : PARASITE\n\nGame of Drones is a computer simulation of the Prisoner's Dilemma, perhaps the most studied game in Game Theory. The Prisoner's Dilemma presents two players with the decision (dilemma) to cooperate with or defect against the other. (The original premise is that they are prisoners given the option of testifying against the other in exchange for freedom/reduced prison time.) Their decisions are unknown to the other until the time of play. The rewards and penalties in this version are as follows:\n\n* Both cooperate: both gain 1 point\n* One cooperates, one defects: cooperator loses 1 point, defector gains 2 points\n* Both defect: neither gains nor loses anything\n\nWhen the Prisoner's Dilemma is to be played multiple times with no knowledge of how many times, the Tit-for-Tat strategy is widely considered to be the most robust. This strategy is remarkably simple:\n\n* Be nice: cooperate by default; when engaging a stranger, cooperate\n* Be retaliating: if the other player defects, defect on the next engagement with that player\n* Be forgiving: if the formerly defecting player cooperates, cooperate on the next engagement with that player\n\nThere are four teams of players in Game of Drones. Each player starts the game with 10 points. On each turn, the player moves (or stays put) on a matrix and when encountering a neighbor, engages in the Prisoner's Dilemma. The team strategies are as follows:\n\n* Snowflakes: play Tit-for-Tat\n* Karens: always defect\n* Magas: always cooperate with other Magas and the Donald; defect against everyone else\n* the Donald: always defect\n\nGame of Drones adds some aspects beyond the Prisoner's Dilemma: engagement risk and death. Engagement risk threatens a loss of 1 point per player during engagements. The probability is determined by a user-selected percentage figure. Death occurs when points go to 0.\n\nSnowflakes are at a disadvantage early on, as their niceness leads to a much greater initial point loss than for other teams. To give Snowflakes a fighting chance, engagement risk is introduced only after all Snowflakes have acquired a memory of how the other players played.\n\nKarens start out immune to engagement risk. They only suffer risk after all cooperators have died, cooperators being Snowflakes and Magas. This takes the shape of an inverse (perverse) karma where those who produce die so that those who only consume may live.\n\nMagas are alone in incurring ongoing loss to defection. They tend to die off quickly, even with zero engagement risk.\n\nSetting engagement risk low may result in Snowflakes never dying. The simulation will run until it reaches its kill screen.\n\nSetting engagement risk high will almost certainly kill all Snowflakes. After the cooperators have died, the drones' points will wilt away until one or no winner emerges.\n\nThe simulation is deterministic and will use the same set of pseudorandom values to determine moves until the page is refreshed or closed. So long as engagement risk is unchanged, each rerun will play out identically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectric-eloquence%2Fgame-of-drones","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectric-eloquence%2Fgame-of-drones","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectric-eloquence%2Fgame-of-drones/lists"}