Try out lichess' bot interface https://lichess.org/api#tag/Chess-Bot
- Get an API token from lichess.org.
$ nvm use v9.11.1
$ yarn install
# Linux
$ export API_TOKEN=xxxxxxxxxx
# Windows
$ setx API_TOKEN xxxxxxxxxx
$ yarn test
$ nyc yarn test
$ yarn start
To implement your chess bot you only need to create one class that implements the method:
getNextMove(moves) {
return uciMove;
}
Where moves is a string of moves so far in uci format e.g. "e2e4 b8c6 f2f4"
See LegalMovePlayer
for minimal implementation using chess.js