Play Codenames alone!
Codenames is a popular board game designed by Vlaada Chvátil which usually requires teammates to play. In this project, a simple transformer-based language model is used so you can play alone.
The user can play as both Spymaster (give clues, AI guesses), or as Agent (AI gives clues, user guesses).
The game mechanica are written in Rust, with the language model being handled by HuggingFace models
in Python. Rust calls the Python interpreter during runtime using PyO3
.
The easiest way to run Codenames-AI is through Docker:
docker build -t codenames docker
docker run -it codenames
To run in Linux or Mac, you must have Python 3 and Rust+Cargo installed on your computer.
It is highly recommended to create a virtual environment first to install your Python libraries:
python3 -m venv venv
source venv/bin/activate
Finally, install Codenames-AI:
pip install .
cargo run