lidraughts.org

Lidraughts Bot

How to make a Lidraughts Bot and where i can find the engine

1) Install “Python”: www.python.org/downloads/

2) Check whether your computer is 32-bit or 64-bit (so that you know whether to download & install “Notepad++” and “7-Zip” .

3) Install “Notepad++” (32-bit or 64-bit, depending on your computer): notepad-plus-plus.org/download

4) Install 7-Zip (32-bit or 64-bit, depending on your computer): www.7-zip.org/

5) Go to github.com/AttackingOrDefending/lidraughts-bot
- Click on “Code” and then click “Download ZIP”
- Extract that file with “7-Zip” and put that extracted folder on your Desktop (and rename it if you want – I renamed mine into Libot)

6) Download “scan” from here: github.com/rhalbersma/scan

7) Put scan engine into “engines” folder and rename it to “scan”.

8) All the other files scan.ini, src and data folders have to be in common directory (Where the lidraughts bot.py files are have).

9) Create new account on lidraughts (this will be your BOT ACCOUNT, and you can NOT play any games on that account, otherwise you won’t be able to create your BOT!)
- Here’s a link for registration: lidraughts.org/signup

10) Once you created new account, you’ll receive an E-mail to Verify your account, so go verify your account!
- After that, go here: lidraughts.org/account/oauth/token
- Write “Bot token” + Check all boxes

11) Copy your “token number” and paste it into “config.yml.default file”

12) Set everything you want in your config.yml.default file (engines name, time controls to play/not play, etc.)

13) Save as “config.yml” (remove ‘default’)

14) Open CMD (Command Prompt) + Copy-paste all these commands below (one by one).
- In order to paste the command into CMD , you need to press Ctrl + V on your keyboard and then you press Enter on your keyboard.
- These are the commands:

python -m pip install --upgrade pip
cd (your bot folder's path)
pip install virtualenv
python -m venv .venv
.\.venv\Scripts\activate.bat
pip install -r requirements.txt
python lidraughts-bot.py -u

15) Whenever you want to play with your BOT, you need to open CMD and copy-paste these 3 commands (all at once, or one by one, doesn’t matter) and then you press Enter on your keyboard.
- In my case that looks like this (in your case, only the first command will be different):
cd C:\Users\Libot\Desktop\Libot\lidraughts-bot-master
.\.venv\Scripts\activate
python lidraughts-bot.py -u

how to make a bot on lidraughts using Heroku

How to setup bot on heroku:
Place your engine(s) in the engine.dir directory
Copy config.yml.default to config.yml
Create an account for your bot on Lidraughts.org
NOTE: If you have previously played games on an existing account, you will not be able to use it as a bot account
Once your account has been created and you are logged in, create a personal OAuth2 token with the "Play as a bot" selected and add a description
A token e.g. xxxxxxxxxx will be displayed. Store this in config.yml as the token field
NOTE: You won't see this token again on Lidraughts.
Move all the files from ./heroku to . (replace the files in . with the files from ./heroku in case of a conflict)
In config.yml, enter the binary name as the engine.name field (the engine should be for Linux)
In startbot.sh, delete chmod +x ./engines/engine_name if you are using a homemade engine else replace engine_name with the binary name at line chmod +x ./engines/engine_name
Edit the variants: supported_variants and time controls: supported_tc from the config.yml as necessary
Create a new heroku app.
Follow the steps on Deploy using Heroku Git
Once it has been deployed, go to Resources tab on heroku and enable worker (bash startbot.sh) dynos. (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.)

ok but when i make a lichess there i just fork github.com/OIVAS7572/lichess-bot and made a heroku app and connect to github and deploy branch it is done
so in lidraughts also this way can be done?? or i have to fork othere github repo

This topic has been archived and can no longer be replied to.

Reconnecting