https://github.com/tyleryep/wolfbot
One Night Ultimate Werewolf: AI Edition
https://github.com/tyleryep/wolfbot
ai deep-learning game one-night player reinforcement-learning simulator
Last synced: about 1 year ago
JSON representation
One Night Ultimate Werewolf: AI Edition
- Host: GitHub
- URL: https://github.com/tyleryep/wolfbot
- Owner: TylerYep
- License: mit
- Created: 2018-05-01T07:45:05.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-05-05T18:44:39.000Z (about 1 year ago)
- Last Synced: 2025-05-05T19:53:03.163Z (about 1 year ago)
- Topics: ai, deep-learning, game, one-night, player, reinforcement-learning, simulator
- Language: Python
- Homepage:
- Size: 6.47 MB
- Stars: 9
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WolfBot
### One Night Ultimate Werewolf: AI Edition
By Tyler Yep & Harry Sha
[](https://www.python.org/downloads/release/python-3120/)
[](https://github.com/TylerYep/wolfbot/actions/workflows/test.yml)
[](https://github.com/TylerYep/wolfbot/blob/main/LICENSE)
[](https://codecov.io/gh/TylerYep/wolfbot)
## Introduction
This is an implementation of the popular board game One Night Ultimate Werewolf.
To try it out, run `python main.py` in the terminal.
(You may need to run `pip install -r requirements.txt` first.)
Constants, along with their use cases, are listed in wolfbot/const.py. You can change:
- \# of players
- \# of center cards
- Which roles are used
- Behavior of AI players on the Werewolf Team / Village Team
## Interactive Mode
To play the game yourself as a character, use the `-u` / `--user` flag:
```
python main.py --user
```
To replay a game, add the `-r` / `--replay` flag.
```
python main.py --user -r
```
To examine verbose output of a game, use the `-l` / `--log_level` flag.
```
python main.py -l trace
```
## Simulating Games
To simulate many runs of the game, use the `-n` flag.
```
python main.py -n 100
```
or use the profiler:
```
python profiler.py
```
For additional information, please check out the GitHub Wiki!
# Contributing
All issues and pull requests are much appreciated!
- First, run `pre-commit install`.
- To see test coverage scripts and other auto-formatting tools, use `pre-commit run -a`.
- To run all tests, run `pytest`.
- To only run unit tests, run `pytest tests/unit_test`.
- To only run integration tests, run `pytest tests/integration_test`.