Quick start(under investigation)

modern shogi provides quick starter kit to enjoy computer Shogi.

You need evaluation function, search engine and GUI tool

To start computer Shogi on your computer, you need evaluation function, search engine and GUI tool

This article show you how to install elmo / apery-qhapaq(aperypaq) (used as benchmark of AlphaZero) and NNUE-type functions (current state of the art)

Install elmo / aperypaq

Download elmo / aperypaq evaluation functions

You can download evaluation functions here (elmo, aperypaq)

elmo and aperypaq functions belong to KPPT function which consists of KPP_synthesized.bin, KKP_synthesized.bin and KK_synthesized.bin.

Install YaneuraOu (search engine)

YaneuraOu is one of the strongest search engines. You can download latest YaneuraOu on github.

for windows

You can download latest YaneuraOu binary for windows here

If your CPU supports SSE, you can use YaneuraOu2018KPPT_sse42.exe as search engine, and if your CPU supperts AVX, you can use YaneuraOu2018KPPT_avx2.exe.

for ubuntu (compile by your own)

You can download source code using git.

git clone https://github.com/yaneurao/YaneuraOu.git

If you want to compile YaneuraOu binary by gcc, you need to modify Makefile

# uncomment g++ compiler and comment clang compiler
COMPILER = g++
# COMPILER = clang++

Then you can compile binary by

make sse42

If your CPU supports AVX, you can compile binary by

make avx2

Compiler will generate YaneuraOu-by-gcc as search engine.

Operation check

You need to put both search engine and evaluation function at the same directory. Here is an example

shogi
 ┣ YaneuraOu (YaneuraOu-by-gcc or YaneuraOu2018KPPT_xx.exe)
 ┣ elmo (rename the folder)
 │    ┣ KK_synthesized.bin
 │    ┣ KKP_synthesized.bin
 │    ┣ KPP_synthesized.bin
 ┣ aperypaq (rename the folder)
     ┣ KK_synthesized.bin
     ┣ KKP_synthesized.bin
     ┣ KPP_synthesized.bin

Then, boot the search engine (double click exe or boot on the shell). If YaneuraOu boots successfully, send the following commands.

setoption name EvalDir value elmo
bench

If it works without error, installation is finished congratulations !!

Run YaneuraOu using CUI

YaneuraOu supports USI protocol, please see the link for detail.

GUI engine to watch

You need GUI engine to visualize Shogi game. Shogidokoro provides you GUI interface to watch and analyse Shogi game.

You can download Shogidokoro here.

Shogidokoro supports only Windows. If you want to boot Shogidokoro on ubuntu, you need mono.

# install mono-devel is recommended.
# Shogidokoro sometimes crashes on ubuntu and booting via mono is thought to be the best stable
sudo apt-get install mono-devel
mono ./Shogidokoro.exe

You can see how to use Shogidokoro on youtube video

Install NNUE functions

Current state of the art of evaluation function uses NNUE function which is fast and shallow neural network. 2018 Dec's state of the art's wining rate to elmo is over 90% which is as strong as AlphaZero

Download orqha / nnuekai evaluation functions

orqha and nnuekai is one of the strongest NNUE functions whose rating is close to AlphaZero. You can download evaluation function here orqha nnuekai7

Install YaneuraOu (search engine)

YaneuraOu is one of the strongest search engines. You can download latest YaneuraOu on github.

for windows

You can download latest YaneuraOu binary for windows here

If your CPU supports SSE, you can use YaneuraOu2018NNUE_sse42.exe as search engine, and if your CPU supperts AVX, you can use YaneuraOu2018NNUE_avx2.exe.

for ubuntu (compile by your own)

You can download source code using git.

git clone https://github.com/yaneurao/YaneuraOu.git

If you want to use YaneuraOu for NNUE function, you need to modify Makefile

# comment
#YANEURAOU_EDITION = YANEURAOU_2018_OTAFUKU_ENGINE
#YANEURAOU_EDITION = HELP_MATE_ENGINE
#YANEURAOU_EDITION = MATE_ENGINE
#YANEURAOU_EDITION = YANEURAOU_2018_GOKU_ENGINE
# uncomment
YANEURAOU_EDITION = YANEURAOU_2018_TNK_ENGINE

// .....

# uncomment g++ compiler and comment clang compiler optional
COMPILER = g++
# COMPILER = clang++

Then you can compile binary by

make sse42

If your CPU supports AVX, you can compile binary by

make avx2

Compiler will generate YaneuraOu-by-gcc as search engine.

Operation check

You need to put both search engine and evaluation function at the same directory. Here is an example

shogi
 ┣ YaneuraOu (YaneuraOu-by-gcc or YaneuraOu2018NNUE_xx.exe)
 ┣ orqha (rename the folder)
 │    ┣ nn.bin
 ┣ nnuekai7 (rename the folder)
     ┣ nn.bin

Then, boot the search engine (double click exe or boot on the shell). If YaneuraOu boots successfully, send the following commands.

setoption name EvalDir value orqha
bench

If it works without error, installation is finished congratulations !!

GUI engine to watch (same to KPPT)

You need GUI engine to visualize Shogi game. Shogidokoro provides you GUI interface to watch and analyse Shogi game.

You can download Shogidokoro here.

Shogidokoro supports only Windows. If you want to boot Shogidokoro on ubuntu, you need mono.

# install mono-devel is recommended.
# Shogidokoro sometimes crashes on ubuntu and booting via mono is thought to be the best stable
sudo apt-get install mono-devel
mono ./Shogidokoro.exe

You can see how to use Shogidokoro on youtube video

Link

Installation guide by uuunuuun