Lichess bot implementing the https://lichess.org/api#tag/Bot API, written in Rust.
cargo run --release
./rustbot
Set environment as follows:
RUST_BOT_TOKEN={lichess API token with bot scopes}
RUST_BOT_NAME={bot lichess username}
RUST_BOT_NAME=RustBot
RUST_BOT_ENGINE_NAME={engine executable name}
If no engine name is provided, random moves will be played.
RUST_BOT_ENGINE_NAME=./stockfish12
RUST_BOT_ENGINE_NAME=stockfish12.exe
Adds this many centipawns to engine evaluation. Default = -25 .
Engine hash table size in megabytes. Default = 128 .
Time necessary to transmit a move in milliseconds. Default = 500 .
Number of threads to use. Default = 4 .
Logging level. Possible values are info and debug. By default there is no logging and the bot does not print anything to its standard output.
When starting bot with startbot.sh restart bot in every RESTART number of seconds. Default = 1800 .
The bot is configured out of the box to run as a Heroku worker process.
Fork the repo, create a Heroku app, link it to your fork in the Deploy tab, set web dyno to 0, worker dyno to 1 in Resources tab. For configuration use Heroku config vars.