An modular AI playground where agents are put in a multiple scenarios to compete each other. Automated tournaments are supported, with rankins by score (wins are 1 point and draws are 0.5) and ELO ratings. Agents can be implemented in any language, as long as they are able to parse and generate json payloads and communicate via stdin and stdout.
Currently the project is in an early stage and many things are subject to breaking changes. Nevertheless, it is in an state where it is ready to use and have fun.
- Round robin tournament formats
- Seasons with multiple tournaments
- Open format using json for data representation and stdin / stdout to communicate
- Sample agents
- Python SDK
- Sample games
- Replay visualization tool
- Headless mode
- Website to interact with the automated tournament system
- Register and upload new agents
- Persistent elo ratings
- Download replays or watch them in the browser
- Automated runner to run tournament matches
The project is spread across multiple repositories:
-
Get the source code from github
-
Install
pyenv
:- The recommended way is listed here: https://github.com/pyenv/pyenv#basic-github-checkout
- If you know what you are doing feel free to use another way
-
Install the current python version. Note that this command should be run from inside the git repository.
pyenv install `cat .python-version`
- Ensure that pip is available:
python -m ensurepip
- Install poetry
python -m pip install poetry
- Install the package dependencies
poetry install
- Create a file named
.env
in the project root with the following contents:
API_URL=http://localhost:8000/api/
API_TOKEN=<YOUR_TOKEN_HERE>
- Fetch and run a single match from the queue
poetry run python tournament_online.py
- To run multiple matches add
--loop
to the command
poetry run python tournament.py agents/foo agent/bar agent/qux
runs a tournament with the given agents. The arguments must be a path to the agent executable file.poetry run python skirmish.py agents/foo agent/bar
to run a skirmish with the given agents.
All files in this repository are released under MIT license, unless explicitly noted.