Making a Lishogi Bot - Linux/Mac

The following will be instructions regarding the installation of a lishogi BOT using a Linux/Mac 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/ . Make sure you download a version supported in Linux/Mac)

- a text/source code editor

- an unzipping tool

Now that we have those installed, let's continue

Visit github.com/TheYoBots/Lishogi-Bot and download the code into your directory. 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 (shogi 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 your Linux terminal where you installed your bot repo directory.

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

Then, navigate to your lishogi-bot directory (‘cd Lishogi-Bot’)

Enter 'pip install virtualenv'.

Next, we must set up our environment. Type 'virtualenv .venv -p python3'. If this doesn’t work, you haven’t added python to path so please do so.

Enter 'source .venv/bin/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 lishogi-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