Using USI Engines with gShogi

Page Last Updated: 24th March 2011

This page is part of the gShogi project.

To use a USI engine you need to download it, install it, check it and then add it to gShogi.
Here are some examples.

Lesserkai - An Example of Adding a USI Engine to gShogi

Lesserkai is an engine that comes with Shogidokoro. Shogidokoro is an excellent Shogi program for windows.
The engine comes as source code that builds OK on Linux.

To use the Lesserkai engine use these commands to download, extract and build it:

cd LesserkaiSrc/Lesserkai

Note that if you download the zip with a browser it may be corrupted. Use wget to download it and it should work OK.

Now test it works.

First start the engine:


It will wait for input.

Enter the command 'usi' and the engine should respond:

id name Lesserkai 1.3.3
id author Program Writer
option name BookFile type string default public.bin
option name UseBook type check default true

The 'usiok' response means the engine is working and should be OK to use with gshogi.

Now quit the engine by entering 'quit'.

Next add the engine to gShogi:

    Start gShogi. It's best to start it from a terminal so you can see the output.
    Select options, then engines.
    click on the 'Add' button.
    Navigate to the Lesserkai executable with the path LesserkaiSrc/Lesserkai/Lesserkai
    click the open button

The Engine should now appear in your list of engines.

gshogi engines screenshot

Click OK

Now configure it:

    Click on Options, then players in the menu bar.
    Set the white player to Lesserkai 1.3.3 and click OK.
    Click on Options, then configure engine 1.
    You should see the options that you can set for Lesserkai

gshogi configure screenshot

Note that these options are specific to the Lesserkai engine and will be different for a different USI engine.

Set the options, click OK, then you can start playing the game against the engine.

To add other USI engines you can follow a similar procedure.

gse - gShogi USI Engine

gse is a USI version of the gShogi builtin engine.
It is basically the engine from GNU shogi with a USI wrapper.
It runs on Linux and windows.

Download it from here.

To build it:

cd gse/src

Then add the engine into gShogi the same way as for Lesserkai (navigate to gse/src/ when adding the engine).


GPSshogi was written by students of the University of Tokyo and won the World Computer Shogi Championships in 2009.

Here are instructions to compile it on Fedora 12. These are based on these instructions.

First download osl from
click on download gnu tarball and save the file.
The file is called osl.tar.gz (3.1MB).

Next download GPSshogi from
click on download gnu tarball and save the file.
The file is called gpsshogi.tar.gz (23.3MB).

Now build it:

yum install boost boost-devel

tar xfvz osl.tar.gz
tar xfvz gpsshogi.tar.gz
cd osl/lib/third_party/tcmalloc-0.93
cd -
cd osl/release

cd -
cd gpsshogi/release
export BOOST_POSTFIX_MT=-mt 

cd -
mv gpsshogi/data osl/

When adding it into gShogi you need to navigate to gpsshogi/release/gpsusi.

TJShogi - An Example of Adding a Windows USI Engine to gShogi Using Wine

Most USI engines are for Windows. Some of them will run in gShogi using Wine.
Here I will use TJShogi as an example.

First install Wine:

yum install wine

Next download the TJShogi engine:


After extracting you should have a file called TJshogi.exe.
Now set up a shell script called to run the program using Wine.
It should be placed in the same directory as the TJshogi.exe program and should contain these lines:


# - run TJshogi under wine

# change the working directory to the one the program is in
BASEDIR=`dirname $0`

# run the program with wine
/usr/bin/wine TJshogi.exe

Note that the command to get the script directory uses backticks (not quotes).
Now make it executable:

chmod a+x

Test it works by running the shell script.
Type in the 'usi' command.
You should see:

id name TJshogi 0.03
id author Tony Hecker
option name USI_Hash type spin default 32 min 4 max 512
option name USI_Ponder type check default true

Enter 'quit' to quit the program.

Now add the engine into gShogi the same way as for Lesserkai except that when you add the engine you need to navigate to the shell script.

Other Engines

Other Windows USI engines that you can use using Wine are Laramie, Blunder and Bonanza.

To use Blunder and Bonanza under wine you will need to install the windows version of mono.

To do this download mono from

Then install it using wine:

wine mono-2.6.7-gtksharp-2.12.10-win32-2.exe

NB. You should install version 2.6.7 long term supported version and not the latest stable version 2.10.1.
This works with both Blunder and Bonanza whereas 2.10.1 does not work with Bonanza (when tested on Fedora 14 64 bit).


Download the file from


Download the file from
Note that later versions don't work with Wine.


Bonanza is not a USI engine but can be converted to USI using the U2B program.
Download the file from
Then download the file from
you need to copy u2b.exe into the same folder as bonanza.exe and point your Wine shell script at u2b.exe.

Valid XHTML 1.1   Valid CSS!

Copyright © 2008-2017 John Cheetham
Hosted by GitHub