2.8 KiB
2.8 KiB
Setup the engine
For all engines
Within the file config.yml:
- Enter the directory containing the engine executable in the
engine: dirfield. - Enter the executable name in the
engine: namefield (In Windows you may need to type a name with ".exe", like "lczero.exe") - If you want the engine to run in a different directory (e.g., if the engine needs to read or write files at a certain location), enter that directory in the
engine: working_dirfield.- If this field is blank or missing, the current directory will be used.
- IMPORTANT NOTE: If this field is used, the running engine will look for files and directories (Syzygy tablebases, for example) relative to this path, not the directory where lichess-bot was launched. Files and folders specified with absolute paths are unaffected.
As an optional convenience, there is a folder named engines within the lichess-bot folder where you can copy your engine and all the files it needs. This is the default executable location in the config.yml.default file.
For Leela Chess Zero
LeelaChessZero: Mac/Linux
- Download the weights for the id you want to play from here.
- Extract the weights from the zip archive and rename it to
latest.txt. - For Mac/Linux, build the lczero binary yourself following LeelaChessZero/lc0/README.
- Copy both the files into the
engine.dirdirectory. - Change the
engine.nameandengine.engine_options.weightskeys inconfig.ymlfile tolczeroandweights.pb.gz. - You can specify the number of
engine.uci_options.threadsin theconfig.ymlfile as well. - To start:
python3 lichess-bot.py.
LeelaChessZero: Windows CPU 2021
- For Windows modern CPUs, download the lczero binary from the latest Lc0 release (e.g.
lc0-v0.27.0-windows-cpu-dnnl.zip). - Unzip the file, it comes with
lc0.exe,dnnl.dll, and a weights file example,703810.pb.gz(amongst other files). - All three main files need to be copied to the
enginesdirectory. - The
lc0.exeshould be doubleclicked and the windows safesearch warning about it being unsigned should be cleared (be careful and be sure you have the genuine file). - Change the
engine.namekey in theconfig.ymlfile tolc0.exe, no need to edit theconfig.ymlfile concerning the weights file as thelc0.exewill use whatever*.pb.gzis in the same folder (have only one*pb.gzfile in theenginesdirectory). - To start:
python3 lichess-bot.py.
Next step: Configure lichess-bot
Previous step: Upgrade to a BOT accout