wolfbot

One Night Ultimate Werewolf: AI Edition


Keywords
ai, deep-learning, game, one-night, player, reinforcement-learning, simulator
License
MIT
Install
pip install wolfbot==0.0.1

Documentation

WolfBot

One Night Ultimate Werewolf: AI Edition

By Tyler Yep & Harry Sha

Python 3.9+ Build Status GitHub license codecov DeepSource

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 if you do not have tqdm already installed.)

Constants, along with their use cases, are listed in src/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

For additional information, please check out the GitHub Wiki!

Contributing

All issues and pull requests are much appreciated!

  • To start developing, first run pip install -r requirements-dev.txt.
  • Next, run 'scripts/install-hooks'.
  • To see test coverage scripts and other auto-formatting tools, check out scripts/run-tests.
  • To run all tests, run pytest.
  • To only run unit tests, run pytest unit_test.
  • To only run integration tests, run pytest integration_test.