https://github.com/anwaralameddin/2pg
A testbed for two-player game agents
https://github.com/anwaralameddin/2pg
board-games strategy testbed two-player-game
Last synced: 11 months ago
JSON representation
A testbed for two-player game agents
- Host: GitHub
- URL: https://github.com/anwaralameddin/2pg
- Owner: anwaralameddin
- License: mit
- Created: 2024-07-01T09:54:03.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-06T22:12:19.000Z (over 1 year ago)
- Last Synced: 2025-01-29T23:30:07.768Z (about 1 year ago)
- Topics: board-games, strategy, testbed, two-player-game
- Language: Python
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Two-Player Game (2PG)
[](https://github.com/anwaralameddin/2pg/actions/workflows/ci.yml)
A testbed for two-player game agents. It's currently under development and
is limited to three games: Connect Four, Othello, and Tic Tac Toe.
## Usage
In a Python 3.11 environment, install the requirements
```
pip install -r requirements.txt
```
and run the package
```
python -m two_player_games -m -v -a1 [-d1 ] -a2 [-d2 ]
```
### Supported Games
- [Connect Four](https://en.wikipedia.org/wiki/Connect_Four) (connect4)
- [Othello](https://en.wikipedia.org/wiki/Reversi#Othello) (othello)
- [Tic Tac Toe](https://en.wikipedia.org/wiki/Tic-tac-toe) (tictactoe)
### Supported Views
- Hidden (hidden)
- [Pygame](https://www.pygame.org/news) (pygame)
### Supported Agents
- [X] Human (human)
- [X] Random (random)
- [ ] [Maximin](https://en.wikipedia.org/wiki/Minimax)
- [X] Naive: (maximin-naive)
- [X] Defensive: (maximin-defensive)
- [X] Stochastic: (maximin-stochastic)
- [X] [Alpha-Beta Pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning): (maximin-alpha-beta)
- [ ] [Negamax](https://en.wikipedia.org/wiki/Negamax)
- [ ] [Monte Carlo Tree Search (MCTS)](https://en.wikipedia.org/wiki/Monte_Carlo_tree_search)
### Example
```
python -m two_player_games -m tictactoe -v pygame -a1 human -a2 maximin-naive -d2 6
```