Wednesday 15 January 2014

Stockfish DD in Arena 3.0

I have got Stockfish DD and its opening book working in Arena 3.0. Stockfish DD is currently one of the strongest chess engines on the PC, and could even be the strongest. It is a free open source program. Arena is a free graphical user interface for chess. Arena 3.0 was the latest version of Arena when I downloaded it. Arena 3.5 was released a few days later, but perhaps I am better off with the older version for now. I hit some problems, so I have decided to write an idiots' guide, both for my own future reference, and to help others.

Arena Basics

Arena can be downloaded from:

I did not have any problems installing Arena 3.0, or customising the appearance, so I will not dwell on that. Arena was installed by default in the directory c:/ Program Files (x86) / Arena. The Arena interface looks very attractive:

(You can click on these diagrams to enlarge them.)  You can start a new game with Game → New, and move the pieces by dragging and dropping them. The buttons under the move pane are:

The first four buttons in green advance and take back moves. The cog button instructs the engine to calculate, make a move and continue playing that colour. The Analyse button starts continuous analysis, and the Edit button allows the user to make moves for both sides. (When either of the last two buttons is clicked, it gains gains colour and an outline to indicate that it has been selected. The Demo button causes the engine to play against itself. When it is clicked, the cog button turns into a red X. Clicking this X stops the engine playing against itself.) The options at the bottom of the Game and Position menus allow PGN and FEN to be imported and exported from the clipboard.

Levels → Adjust allows a fixed time per move to be set. Levels → "Limit Playing Strength to Elo" can be used to weaken the Engine. This works for the 32 bit and 64 bit versions of Rybka supplied with Arena, but is greyed out for the other supplied engines, and Stockfish DD. (The time allowed for any engine can be reduced by a percentage, by clicking on Engine → Manage, selecting the Details tab and the Special sub-tab.) The engine can be prevented from thinking on your time by right clicking the mouse in the engine analysis pane at the bottom of the Arena window, and ensuring that Ponder is not ticked.

Installing Stockfish DD

There are no detailed instructions for installing Stockfish, but I got some much needed help from:

Stockfish DD and its opening book can be downloaded from:

The download stockfish-dd-win, contains the directories:


and the files:


The directory Windows contains the files:


The opening book download stockfish-231-book contains the file Book.bin.

The file readme has a .md extension, and I could not read it, but I found this on the web:

I set up a directory called Stockfish Chess in c:/ Program Files (x86) / Stockfish Chess, and copied polyglot, Book.bin and stockfish-dd-64-modern into this directory.

My laptop has an Intel Core i3 processor (which has 2 cores and 4 threads), 3 GB of main memory and runs 64 bit Windows 7 Home Premium. The polyglot file has the default settings Threads = 1, Hash = 128 and OwnBook = false. The advice is to set Threads to the number of processor cores rather than the number of threads. I set Threads = 2. The hash table size is in MB. I set Hash = 1024. I also set OwnBook = true.

To install Stockfish DD in Arena, select Engines → Install New Engine... Set File Name to the path name of the engine program, and click Open.

(N.B. With these settings, I find that, when I run Stockfish DD, the CPU usage is typically 50%, with memory usage at just over 2GB. Arena shows the hash table usage as 0%. However, it also shows the CPU utilisation of the engine as 0%, which is certainly not true.)

Arena Engine Configuration

Right clicking the mouse in the engine analysis pane at the bottom of the Arena window, and clicking Configure Stockfish DD, brings up the dialogue:

I set the number of threads to 2, the hash table size to 1024 and ticked Own Book, mirroring my selections in the polyglot file.

Opening Books with Arena

Arena opening books are stored by default in the directory c:/ Program Files (x86) / Arena / Books. You can select one of them as the current Arena Main Book using Book → Manage, which brings up the dialogue:

You can use the Load button to select the book, and tick the Use Arena Main Book box to activate it.

There is a well hidden tick box for selecting the Arena Main Book rather than Stockfish's own book. Select Engines → Manage. Select the Details tab, click on the line for Stockfish DD, and select the Books sub-tab. This reveals a tick box labelled "Use Arena Main Books with this Engine." When Own Book is ticked, as described above:

* When "Use Arena Main Books with this Engine" is ticked, Stockfish uses the Arena Main Book to make its moves, and Arena also displays it in the move pane when Book/TB is selected.

* When "Use Arena Main Books with this Engine is not ticked, Stockfish uses its own book to make moves. Nonetheless, when the Book/TB tab is selected, the Arena Main Book is displayed. This is confusing, but it is also helpful because the Stockfish book is invisible to the user.

When Own Book is not ticked, but "Use Arena Main Books with this Engine is ticked, Stockfish uses the Arena Main Book, as we would expect. When neither box is ticked, Stockfish does not use a book at all. (The Arena engine configuration appears to override that in the polyglot file.)

Analysing a Game with Arena

I had a problem getting Arena to analyse a game, and generate a graph of the engine's evaluation of the position throughout the game. The key ingredient is to click Engines → Automatic Analysis, select the Output tab, and tick the "Save calculated values in game" box. You can then click the Start button on the Source tab to populate the graph. (Clicking to the right of the Permanent Statistics graph toggles it on and off, and right clicking on the graph itself brings up some options. Left clicking on the graph selects a move.)


Stockfish DD is much faster on my PC than it is on the iPad. I found that Arena 3.0 frequently crashed or otherwise misbehaved, but I did not encounter any show stoppers. Arena mostly worked well, but was not easy to learn. There is no user manual, and the help text is often unclear and difficult to follow. There are a huge number of options; and the interface is not very intuitive, and sometimes does not follow the usual conventions. I persevered with Arena because it is the only interface that will connect to my Novag Citrine. That is however, still a future project. I am still making good use of the Citrine's on-board engine as a sparring partner.

No comments:

Post a Comment