Installing Yaneuraou engine
Let's work on installing one of the best shogi engines available today (as of 2025)
Some context
Installing commercially available all-in-one products such as 激指 (Gekisashi) is a straightforward afair. On the other hand, when getting the latest AI directly from developers, you must gather and install the necessary parts yourself. As explained on the previous page, you need at least one GUI (graphical interface app) and one engine (Shogi AI).
Furthermore, the engine’s main body (search component)
and evaluation function binary (value calculation component)
are often created by different developers, requiring separate acquisition.
For instance, when using YaneuraOu(which we are going to install),
you need to install three types of components:
- GUI application (we assume you have already installed ShogiHome)
- YaneuraOu
- NNUE evaluation function (水匠 (Suisho), tanuki-, etc. we will use Hao for this practice)
Additionally, you may optionally obtain opening books.
While not essential, opening books allows the engine to use pre-researched the best moves and evaluations. Sometimes opening books are included with the engine.
For this exercise, We will use an opening book file from Yanuraou's GitHub page.
The engine we will install is Yaneuraou's GitHub version. The evaluation file we are going to use is Suisho5 and/or Hao. Those files are available for free. Note that there is also a paid "support developer!" version which may yield better performance. For this exercise, we will stick with a no-cost solution.
The source code is available on GitHub. Also, a detailed instruction on how to install the engine (and supporting GUI) is available in Japanese. It should be possible to simply go to that page and have the AI translate it to follow along. So you may not need this guide at all. In this guide, however, I will try to supplement the installation steps where you might have difficulty understanding.
Ok, let's get started!
If your computer is Mac or PC, then you don't need to compile the source code. You can use the binary file bundled in the latest release. If you want to install it on Linux, there is a script folder inside the source code that is written for linux build.
Currently (as of December 2025) the latest release is version 9.0. Go to Release page and download version 9 package.
Assuming you are using windows 64 version, we download yaneuraou-v900-git-win64-all.7z
Next comes the most confusing part. Downloaded YaneuraOu package contains many files for different CPU generations and evaluation function types, making it difficult to know which to use. You only need one file that matches your CPU and eval file that you are going to use.
Section 5 and 6 of the YaneuraOu Wiki explain how to select files appropriate for your environment:
below is a condensed version
When you download this file and "extract all files" from the Windows file manager's context menu, you will see a bunch of files. You only need one file, depending on your evaluation file type. Both Suisho5 and Hao use NNUE_halfkp_256x2_32_32 network architecture. So open that file folder. (This is, in a nutshell, what is discussed in section 5. For a comprehensive list of evaluation files, including bleeding edge ones behind the paywall and its corresponding search engine's nnue type, you need to deep dive into this section.)
Then again, you need to select one executable engine based on your PC's CPU specification. The file that ends with sse42 will work with most cpu. However, this file does not use extended command sets that are implemented in the newer generation of CPUs, and therefore, it is less efficient for a newer set of CPU. You need to find your PC's CPU specification and match it against the table.
In Windows, you can go to settings->system->about to find out your PC's CPU type.
If your CPU is AMD (Ryzen), then refer to the below table
| Development code | Year released | Command set | Select this | |||
|---|---|---|---|---|---|---|
| AVX2 | AVX-VNNI | AVX512 | AVX512-VNNI | |||
| Prior to Zen | - | × | × | × | × | SSE41 SSE42 |
| Zen 1st gen | 2017 | ◯ | × | × | × | ZEN1 |
| Zen 2nd gen | 2019 | ◯ | × | × | × | ZEN2 |
| Zen 3rd gen | 2020 | ◯ | × | × | × | AVX2 |
| Zen 4th gen | 2023 | ◯ | × | ◯ | ◯ | AVX512VNNI |
| Zen 5th gen | 2024 | ◯ | ◯ | ◯ | ◯ | AVX512VNNI |
And here is a table for Intel CPUs. Core i3,i5 or i7. Find your CPU part number and then match it to the code name in the table.
| Development code | Year released | Command set | Select this | |||
|---|---|---|---|---|---|---|
| AVX2 | AVX-VNNI | AVX512 | AVX512-VNNI | |||
| Penryn | 2008 | × | × | × | × | SSE41 |
| Nehalem | 2008 | × | × | × | × | SSE42 |
| Westmere | 2010 | × | × | × | × | SSE42 |
| Sandy Bridge | 2011 | × | × | × | × | SSE42 |
| Ivy Bridge | 2012 | × | × | × | × | SSE42 |
| Haswell | 2013 | ◯ | × | × | × | AVX2 |
| Broadwell | 2014 | ◯ | × | × | × | AVX2 |
| Skylake | 2015 | ◯ | × | × | × | AVX2 |
| Kaby Lake | 2016 | ◯ | × | × | × | AVX2 |
| Coffee Lake | 2017 | ◯ | × | × | × | AVX2 |
| Skylake-X | 2017 | ◯ | × | ◯ | × | AVX512 |
| Whiskey lake | 2018 | ◯ | × | × | × | AVX2 |
| Amber lake | 2018 | ◯ | × | × | × | AVX2 |
| Cannon Lake | 2018 | ◯ | × | ◯ | × | AVX512 |
| Ice Lake | 2019 | ◯ | × | ◯ | ◯ | AVX512VNNI |
| Comet Lake | 2020 | ◯ | × | × | × | AVX2 |
| Tiger Lake | 2020 | ◯ | × | ◯ | ◯ | AVX512VNNI |
| Rocket Lake | 2021 | ◯ | × | ◯ | ◯ | AVX512VNNI |
| Alder Lake | 2021 | ◯ | ◯ | x | × | AVXVNNI |
| Raptor Lake | 2022 | ◯ | ◯ | x | × | AVXVNNI |
| Meteor Lake | 2023 | ◯ | ◯ | x | × | AVXVNNI |
If you are unclear of your CPU type but know your PC is less than 10 years old, AVX2 is a safe choice. This is what is discussed in section 6.
Where to Place Engines
Before installing engines, decide on a location
Create a folder and give it some name, such as “shogi-engines.” You can place it anywhere but avoid the desktop or the download folder.
Create a subfolder under it and name it with engine name, such as “yaneuraou” then place your execution file.
Under the same folder, create an 'eval' folder. Download Suisho5 or hao Package and extract nn.bin, place it under the 'eval' folder.
Let's add another folder and name it as 'book' This folder will store book opening file.
Download new_petabook_20250505c.7z from peta-shock book release and extract petabook1.db. Save it to the "book" folder and Rename the file to "user_book1.db"
The directory structure should now look like this.
shogi-engines\yaneuraou\yaneuraou_NNUE_halfkp_256x2_32_32-V900Git_AVX2.exe]
shogi-engines\yaneuraou\eval\nn.bin
shogi-engines\yaneuraou\book\user_book1.db
Wire up Yaneuraou to ShogiHome
Now open ShogiHome that you have installed earlier and register the engine.
The procedure is straight forward. You can click on "Manage Engines" button on the left side of the screen or use the menu (Settings>manage engines) then click on Add. File open dialog will pop up. You navigate to the file where you stored your engine and click on the executable, then click "Open"
You will see the new engine was added to the list of engines.
Click on the Config button on the engine you have created, and a configuration panel will be
displayed.
You can leave the most option parameters in the default value.
You will want to change the display name to something meaningful, such as "Yaneuraou + Hao + PetaBook"
A good starting point for Threads should be your CPU's physical core count. You can't exceed the
CPUs logical core count.
In most modern computers, you should be able to set USI_Hash size to a larger number. If you
have 16GB RAM, you can set it to 14,000 MB, for instance.
For FV_SCALE, the Default value is 16, but each eval file has its recommended value. Suisho5
author recommends setting it to 24, and Hao author recommends setting it to 20.
So adjust the value accordingly.
Also, for the engine to recognize the opening book, Set BookFile to user_book1.db.
To speed up the initial startup, set BookOnTheFly to ON.
Specific to petaShock db, you also need to set IgnoreBookPly and FlippedBook
to ON.
You may tweak other settings and experiment. For further information on those settings, please see Engine Settings. This page is in Japanese, so use the translation tool of your choice.
If you have properly configured the setting, Click on the "Game" offline button will let you play against the registered engine. You can also click on the Analyze button and analyze your game using the installed engine. Enjoy!
NewThis page was originally created 3 months ago and last updated 1 month, 3 weeks ago