First time:
# clone repository
git clone --recurse-submodules [email protected]:TDDE19-2021-1/tjack.git
# or `git submodule init && git submodule update` after regular clone
# use virtual environment (optional)
python3 -m venv venv
source venv/bin/activate
# install requirements
pip install -r requirements.txt
# setup build directory
meson build
# to choose non-default compiler like clang, do `CXX=clang++ meson <builddir>`
# to select build type, do `meson <builddir> --buildtype={debug,release}`
# if the build fails with some torch error, try `meson <builddir> -D_GLIBCXX_USE_CXX11_ABI=0
To build:
cd build
ninja
Make sure the machine you are on has the correct versions of g++ and CUDA:
g++ version
# look for 'g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0'
nvidia-smi
# look for 'CUDA Version: 11.2'
olympen1-117.ad.liu.se is known to not satisfy these requirements and will not work.
Ensure that CUDA is available:
./scripts/has_cuda.py
Set up build directory:
meson build -D_GLIBCXX_USE_CXX11_ABI=0
To create an engine, you can copy the example directory and edit the files accordingly. You also have to add the engine to the build script.
Play with bot on lichess via lichess-bot:
# download lichess-bot somewhere
git clone https://github.com/ShailChoksi/lichess-bot.git <path/to/lichess-bot>
# export bot token token
export LICHESS_BOT_TOKEN=<token>
# run engine
cd <engine>
python3 <path/to/lichess-bot>/lichess-bot.py
Then challenge here:
https://lichess.org/?user=tjack-bot#friend
Estimate Elo rating of of engine:
python3 scripts/elo_est.py build/<engine>
- Wiki (for detailed documentation and other resources)