Making a Lishogi Bot - Windows

The following will be instructions regarding the installation of a lishogi BOT using a Windows computer.

Prerequisites (you should have these installed before you get started):

- Python 3, added to PATH (you can download Python from here: www.python.org/downloads/)

- a text/source code editor such as Notepad++ for Windows (download here: notepad-plus-plus.org/downloads/)

- an unzipping tool, such as 7-zip for Windows (download here: www.7-zip.org/download.html)

Now that we have those installed, let's continue

Visit github.com/TheYoBots/Lishogi-Bot and download the code. Un-zip the folder, and rename it "lishogi-bot-folder".

Next, we will obtain a shogi engine executable.

Put the shogi engine executable into the 'engines' folder in 'lishogi-bot-folder'.

Next, we must create an API access token. Using your new account, go to lishogi.org/account/oauth/token and generate a new token. Make sure to only select "Play games with the bot API".

Now, we have our lishogi-bot-folder with an engine, as well as an API token for the BOT.

It is time to edit the config.yml file! First we will add our token and edit the engine parameters:

Line 1: token: "xxxxxxxxxxxxxxxx" (replace the 'xxxxxxxxxxxxxxxx' with your API token - leave the quotation marks!)

Line 6: name: "engine_name" (replace 'engine_name' with the name of the engine executable, which you put into the engines folder, for example, engine_name: "fairystockfish11.exe")

Line 13: Move Overhead: 100 (this value should be about the same value as your lag to lichess)

Line 14: Threads: 2 (number of CPU threads to use)

Line 15: Hash: 256 (chess engine hash size in megabytes)

We will now edit the incoming challenge parameters!

Line 27: concurrency: 1 (number of games the bot can play simultaneously, leave at 1 for best performance)

Line 29: accept_bot: false (set 'true' to accept bot challenges)

Line 31 to 34: Select the Maximum and Minimum increment and byoyomi for incoming challenges

Line 38 to 39: Replace the '#' with a space to enable your bot to play that variant

Line 41 to 46: Replace the '#' with a space to enable your bot to play that time control

Line 48 to 49: Replace the '#' with a space to enable your bot to play that mode

Now, save the edits in the config.yml file.

After saving the config.yml file, we are ready to proceed to the final steps!

Open 'Command Prompt' (The driver suggests using Powershell, but I like CMD better).

Type 'python -m pip install --upgrade pip' to install and upgrade pip.

Then, navigate to your lishogi-bot-folder's location. (For example, cd C:\chess\lichess-bot-folder)

Enter 'pip install virtualenv'.

Next, we must set up our environment. Type 'virtualenv .venv -p python'.

Enter '.\.venv\Scripts\activate'

And finally 'pip install -r requirements.txt', which will install the required dependencies.

Great! We have one final step to do!

(WARNING! Upgrading to BOT is irreversible! Think carefully!)

To upgrade to BOT: 'python lichess-bot.py -u'

And we're finished! Congratulations!

You're now connected to lishogi and awaiting challenges!

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

Reconnecting