Skip to content

RaviharaV-bot/hyper-stockfish

Repository files navigation

Build Status Python Build

hyper-stockfish

The code template to make a Lichess Bot and deploy it to heroku server easily. This is the code of @hyper-stockfish and similar heroku run bots in lichess.org

Engine communication code taken from https://github.com/ShailChoksi/lichess-bot by ShailChoksi

Chess Engine

Heroku Buildpack

Heroku Stack

  • Container (allowing a maximum hash size of 512 mb)

How to Use

  • Fork this repository.
  • Install Heroku CLI and create a new app in Heroku.
    Do note that in certain operating systems Heroku CLI doesn't get added to path automatically. If that's the case you'll have to add heroku to your path manually.
  • Run this command in cmd or powershell heroku stack:set container -a appname, where appname is replaced with your Heroku app's name.- Create a new heroku app.
  • Open the Settings tab on heroku and insert your API access token with bot:play scopes enabled in the Config vars field in the format LICHESS_BOT_TOKEN:API-ACCESS-TOKEN, where you replace API-ACCESS-TOKEN with your API Access token.
  • Go to the Deploy tab and click Connect to GitHub.
  • Click on search and then select your fork of this repository.
  • Then Enable Automatic Deploys and then select the main branch (which is already done by default usually) and Click Deploy.
  • Once it has been deployed, go to Resources tab on heroku and enable dynos. (Do note that if you don't see any dynos in the Resources tab, then you must wait for about 5 minutes and then refresh your heroku page.)
  • NOTE if your bot stopped playing but online go to heroku and click on more > restart all dynos

You're now connected to lichess and awaiting challenges! Your bot is up and ready!

to change the engine using

this repo has 3 chess engines if you want to change engine you have to change Dockerfile default is multifish.sh multifish is multivariant stockfish but if you want fairy stockfish change it to fairyfish.sh or you want to add orginal stockfish change it to realsf.sh and deploy your bot in heroku again