{"id":22180910,"url":"https://github.com/anwaralameddin/2pg","last_synced_at":"2025-03-24T19:15:59.810Z","repository":{"id":247080096,"uuid":"822517957","full_name":"anwaralameddin/2pg","owner":"anwaralameddin","description":"A testbed for two-player game agents","archived":false,"fork":false,"pushed_at":"2024-07-06T22:12:19.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T23:30:07.768Z","etag":null,"topics":["board-games","strategy","testbed","two-player-game"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anwaralameddin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-07-01T09:54:03.000Z","updated_at":"2024-07-24T18:40:16.000Z","dependencies_parsed_at":"2024-07-24T22:26:55.430Z","dependency_job_id":null,"html_url":"https://github.com/anwaralameddin/2pg","commit_stats":null,"previous_names":["anwaralameddin/2pg"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwaralameddin%2F2pg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwaralameddin%2F2pg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwaralameddin%2F2pg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwaralameddin%2F2pg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anwaralameddin","download_url":"https://codeload.github.com/anwaralameddin/2pg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245334913,"owners_count":20598389,"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":["board-games","strategy","testbed","two-player-game"],"created_at":"2024-12-02T09:20:08.506Z","updated_at":"2025-03-24T19:15:59.784Z","avatar_url":"https://github.com/anwaralameddin.png","language":"Python","readme":"# Two-Player Game (2PG)\n\n[![CI](https://github.com/anwaralameddin/2pg/actions/workflows/ci.yml/badge.svg)](https://github.com/anwaralameddin/2pg/actions/workflows/ci.yml)\n\nA testbed for two-player game agents. It's currently under development and\nis limited to three games: Connect Four, Othello, and Tic Tac Toe.\n\n\n## Usage\n\nIn a \u003ccode\u003ePython 3.11\u003c/code\u003e environment, install the requirements\n```\npip install -r requirements.txt\n```\nand run the package\n```\npython -m two_player_games -m \u003cmodel\u003e -v \u003cview\u003e -a1 \u003cagent1\u003e [-d1 \u003cdepth1\u003e] -a2 \u003cagent2\u003e [-d2 \u003cdepth2\u003e]\n```\n### Supported Games\n\n- [Connect Four](https://en.wikipedia.org/wiki/Connect_Four) (\u003ccode\u003econnect4\u003c/code\u003e)\n- [Othello](https://en.wikipedia.org/wiki/Reversi#Othello) (\u003ccode\u003eothello\u003c/code\u003e)\n- [Tic Tac Toe](https://en.wikipedia.org/wiki/Tic-tac-toe) (\u003ccode\u003etictactoe\u003c/code\u003e)\n\n### Supported Views\n\n- Hidden (\u003ccode\u003ehidden\u003c/code\u003e)\n- [Pygame](https://www.pygame.org/news) (\u003ccode\u003epygame\u003c/code\u003e)\n\n### Supported Agents\n\n- [X] Human (\u003ccode\u003ehuman\u003c/code\u003e)\n- [X] Random (\u003ccode\u003erandom\u003c/code\u003e)\n- [ ] [Maximin](https://en.wikipedia.org/wiki/Minimax)\n    - [X] Naive: (\u003ccode\u003emaximin-naive\u003c/code\u003e)\n    - [X] Defensive: (\u003ccode\u003emaximin-defensive\u003c/code\u003e)\n    - [X] Stochastic: (\u003ccode\u003emaximin-stochastic\u003c/code\u003e)\n    - [X] [Alpha-Beta Pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning): (\u003ccode\u003emaximin-alpha-beta\u003c/code\u003e)\n    - [ ] [Negamax](https://en.wikipedia.org/wiki/Negamax)\n- [ ] [Monte Carlo Tree Search (MCTS)](https://en.wikipedia.org/wiki/Monte_Carlo_tree_search)\n\u003c!-- TODO Consider implementing the following agents --\u003e\n\u003c!-- - [ ] [Deep Learning](https://en.wikipedia.org/wiki/Deep_learning) --\u003e\n\u003c!-- - [ ] [Evolutionary Algorithm](https://en.wikipedia.org/wiki/Evolutionary_algorithm) --\u003e\n\u003c!-- - [ ] [Genetic Algorithm (GA)](https://en.wikipedia.org/wiki/Genetic_algorithm) --\u003e\n\u003c!-- - [ ] [Heuristic](https://en.wikipedia.org/wiki/Heuristic_(computer_science)) --\u003e\n\u003c!-- - [ ] [Iterative Deepening](https://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search) --\u003e\n\u003c!-- - [ ] [Killer Heuristic](https://en.wikipedia.org/wiki/Killer_heuristic) --\u003e\n\u003c!-- - [ ] [Late Move Reduction (LMR)](https://en.wikipedia.org/wiki/Late_move_reduction) --\u003e\n\u003c!-- - [ ] [Null Move Heuristic](https://en.wikipedia.org/wiki/Null-move_heuristic) --\u003e\n\u003c!-- - [ ] [Principal Variation Search (PVS)](https://en.wikipedia.org/wiki/Principal_variation_search) --\u003e\n\u003c!-- - [ ] [Quiescence Search](https://en.wikipedia.org/wiki/Quiescence_search) --\u003e\n\u003c!-- - [ ] [Reinforcement Learning (RL)](https://en.wikipedia.org/wiki/Reinforcement_learning) --\u003e\n\u003c!-- - [ ] [Transposition Table](https://en.wikipedia.org/wiki/Transposition_table) --\u003e\n\n\n### Example\n\n```\npython -m two_player_games -m tictactoe -v pygame -a1 human -a2 maximin-naive -d2 6\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanwaralameddin%2F2pg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanwaralameddin%2F2pg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanwaralameddin%2F2pg/lists"}