Your trusted source for computer chess information!

Computer-Chess Wiki

Basic Setup Guide for UCI engines in Winboard

Introduction

This is a basic guide for setting up Winboard to use UCI chess engines via the Polyglot adapter. In the following examples Winboard_X and the free UCI chess engine Rybka 2.2n2 are being used.

Necessary downloads for this guide:

  • PolyGlot
    • There are several versions of PolyGlot that can be used. All of them should be equivalent.
  • Free Rybka chess engine
    • Any UCI chess engine may be used, but you must vary a bit from the instructions below.
  • Winboard_X
    • Although I am using Winboard_X in the examples, Winboard 4.3.14 should work fine. If you use Winboard 4.3.14, it is quite possible that the example Winboard menus might vary from the ones shown.



Winboard_X Setup

First download Winboard_X or Winboard 4.3.14.


Here is my Program Files folder. I have made a folder named Winboard_X and downloaded the Winboard_X zip file to it.
01.jpg



I have extracted the zip file contents to the same folder. The readme file contained in the zip file has information on the modifications that were done to the GUI.
02.jpg



Double-click the Winboard_X executable file and select 'Just view or edit game files' and click 'OK'.
03.jpg



Close all of the windows that opened. What is happening here is that we are allowing Winboard_X to create its winboard.ini file (shown in the graphic below). We will come back to the Winboard GUI in a moment.
04.jpg



In the Winboard_X folder I have made two additional folders. One named 'Polyglot' and one named 'Chess Engines'. In my personal set up I keep the Polyglot and Chess Engines folders in different locations but for ease of explanation I am putting them in the Winboard_X folder.
05.jpg


PolyGlot Setup

Go to - http://wbec-ridderkerk.nl/html/download.htm - and on the left-hand side of the page click the 'PolyGlot (UCI2WB)' link. On the page that opens, download the original version 'PolyGlot 1.4' zip file and the 'Cygwin1.dll' rar file to a temporary place on your computer.
06.jpg

and extract the files contents to the temporary place.
07.jpg

Note: Polyglot 1.4 needs the cygwin1.dll file to work. But this modified version of PolyGlot does not require it. It is by Fonzy Bluemers and functions on its own without the need of the cygwin1.dll file. So, if you want, you can use the Fonzy Bluemers modified Polyglot version instead.

Alternatively you could use the Jaap Weidemann modified version of Polyglot. Jaap Weidemann's version of Polyglot does require the cygwin1.dll file. Jaap Weidemann's website in no longer on the Internet so I uploaded to the Computer-Chess Wiki. It is a legal download and can be gotten here legally. This is the Polyglot version I use - polyglot_14_x_070325_win.zip - but you can use whichever version you want. Jaap Weidemann's Polyglot download zip file also includes a cygwin1.dll file with it. On my Windows ME computer I use the Polyglot exe file included in the zip file download, but I have to use the cygwin1.dll file that is on the download page for the original version of Polyglot.

In the example, we have downloaded the original version of Polyglot and the cygwin1.dll file to a temporary folder, and have extracted both of the downloaded files to the same folder.

In the Cygwin1.dll folder, that is now in the temporary folder, move the cygwin1.dll file that is in the folder to the Polyglot folder that is located in the Winboard_X folder, and in the polyglot_14 folder move the polyglot exe file, and if you want the readme text file, to the Polyglot folder, too.

Below is what is now in Polyglot folder that is in the Winboard_X folder. (The remaining contents still in the temporary folder can be deleted, if desired.)
08.jpg


Rybka Setup

For an example chess engine to use, go to http://www.rybkachess.com/index.php?auswahl=Demo+version and download the free Rybka 2.2n2 zip file.

Download the file and extract its contents to the 'Chess Engines' folder that is located in the Winboard_X folder.
09.jpg



Depending on which kind of operating system you have would determine which of the Rybka engines you use. I have a 32 bit operating system so I delete everything from the folder except the 32 bit version of Rybka.
10.jpg


Also of note is that this is a multi-processor version of Rybka. I have a single processor computer but no worries, the engine will run just fine in it too. Rybka does not come with an opening book so we will look at that later.

In the Chess Engines folder that is located in the Winboard_X folder I have now made a folder called 'Rybka 2.2n2'.
11.jpg

and I have moved the chess engine I am using in this example (Rybka 2.2n2) from the Chess Engines folder to that newly made 'Rybka 2.2n2' folder.
12.jpg


If you want you can also rename the Rybka exe file to a shorter name as I have done.
13.jpg


PolyGlot Configuration and Opening Books

Now it is time to make a polyglot.ini file for the polyglot.exe file to use.

Go to the How to Make a Polyglot ini File - Page to see how the making of an polyglot.ini file is accomplished.

Move this newly made polyglot.ini file to the Polyglot folder that is in the Winboard_X folder.
14.jpg



At this point I make another folder called Rybka 2.2n2 inside the Polyglot folder, and I move the polyglot.exe file, the polyglot.ini file, and since it is being used, the cygwin1.dll file to this Rybka 2.2n2 folder. This is being done so that in the future if it is wished to add other UCI engines for use with the Winboard GUI, each engine can have its own folder in the Polyglot folder. Each chess engine would need to use its own separate polyglot.ini file.

PolyGlot folder:
15.jpg

Rybka folder:
16.jpg

Since Rybka 2.2n2 does not come with an opening book we will download one and put it in the Rybka 2.2n2 folder where the chess engine is. The book could be saved to anywhere you want but for the example we will put it in the folder with the chess engine.
Go to http://wbec-ridderkerk.nl/html/download.htm and on the page will be seen:

“Some PolyGlot books made by: Marc Lacrosse!”

For the example we will download the performance.bin rar file and extract its contents to the Rybka 2.2n2 folder.

This is what is in the Rybka 2.2n2 chess engine folder now.
17.jpg

A note on the opening books used with Polyglot. The opening books to be used with Polyglot have a bin extension. These are the only opening books that Polyglot can use. Polyglot has the capability to make opening books and it can only use opening books that were made by it. Some UCI engines have their own opening books and do not require that a Polyglot book be used with them. Since Rybka in this example does not have the capability to use its own opening book you have to use a Polyglot book if using Rybka in conjunction with Polyglot - and if you want to use an opening book at all.

Another place on the Internet where Polyglot books can be downloaded is Guenther Simon's website here:

We now have a downloaded opening book in Rybka's engine folder. So now we go to the Polyglot folder, and to its Rybka 2.2n2 folder, and open the polyglot.ini file with a text editor - opening it with notepad is fine.

In the below graphic the important part to show is that the path to the Polyglot book has been manually changed to point to the performance.bin opening book file that was put into the Rybka 2.2n2 folder. Notice the path points to the actual file itself and that the Book= entry above the BookFile= entry has been set to - true. If we were not using a Polyglot book we would set it as Book=false. Also notice in the EngineDir= entry that the path only leads to the 'folder' that the Rybka 2.2n2 engine file is in, and not the engine file itself.
18.jpg


Winboard Configuration

Now go to the Winboard_X folder and open the winboard.ini file with a text editor.

Find the below entry shown in the graphic in the winboard.ini file. What is shown is the area where the path to the chess engine is set so that the Winboard GUI can communicate with the chess engine. Since Winboard cannot communicate with UCI engines we are using the Polyglot adapter to do the exchanging of communication between the chess engine and the Winboard GUI. The Polyglot exe file in turn uses the polyglot.ini file to know what command options to receive and send. So in this example case, instead of inputting the data for the chess engine's path as would be done for a normal Winboard chess engine. We input the data for the path to the Polyglot exe file.

19.jpg



This is the winboard.ini file with the data entered for pointing to the Rybka 2.2n2 chess engine. The Rybka data is actually one line, but I have word wrap selected in notepad.

20.jpg



This is the entry shown in the above graphic displayed as text:

/firstChessProgramNames={“Rybka 2.2n2” /fd=“C:\Program Files\Winboard_X\Polyglot\Rybka 2.2n2”
/fcp='polyglot'
}
/secondChessProgramNames={GNUChess
“GNUChes5 xboard”
}



A word about the above path entry structure that is shown in the above code and graphic. Winboard only understands certain syntax; I guess syntax is the correct word to use. Anyway the

“Rybka 2.2n2” /fd=“C:\Program Files\Winboard_X\Polyglot\Rybka 2.2n2” /fcp='polyglot'

line has to be structured in a way that the Winboard GUI will understand, or it will not work. I figured out how to structure it by trial and error from what I read in the Winboard help file. Even though I structure it this way and it works for me, I have seen examples where other people structure some things differently than I do and I can only assume that the way they do it works for them. I do not have an explanation for this except maybe in cases where some things appear different, we are all still following certain guidelines that are established for Winboard.

Winboard_X does not come with a Winboard help file. To get a help file I had to download the original Winboard 4.2.7 from Tim Mann's website, install it and then copy, or move, the help file to my Winboard_X folder. Even though the 4.2.7 help file is not updated to the Winboard_X GUI, the information in it is still relevant.

These are the actual currently used chess engine entries for my winboard.ini file -

/firstChessProgramNames={
“Delfi 5.3b - 1000 Elo” /fd=“C:\Program Files\Chess\Chess Engines\Delfi\Delfi 5.3b” /fcp='DelfiT'
“Delfi 5.4 - 1500 Elo” /fd=“C:\Program Files\Chess\Chess Engines\Delfi\Delfi 5.4” /fcp='DelfiT'
“Hiarcs 10 - 1250 Elo” /fd=“C:\Program Files\Chess\Polyglot\Hiarcs\Hiarcs 10” /fcp='polyglot'
“Hiarcs 11.1 - 1500 Elo” /fd=“C:\Program Files\Chess\Polyglot\Hiarcs\Hiarcs 11.1” /fcp='polyglot'
“ProDeo 1.6 UCI - Absolute Novice Player” /fd=“C:\Program Files\Chess\Polyglot\ProDeo 1.6\Absolute Novice Player” /fcp='polyglot'
“ProDeo 1.6 UCI - Average Club Player” /fd=“C:\Program Files\Chess\Polyglot\ProDeo 1.6\Average Club Player” /fcp='polyglot'
“ProDeo 1.6 UCI - Strong Club Player” /fd=“C:\Program Files\Chess\Polyglot\ProDeo 1.6\Strong Club Player” /fcp='polyglot'
“Rybka 1.2f - 1500 Elo” /fd=“C:\Program Files\Chess\Polyglot\Rybkas\Rybka 1.2f” /fcp='polyglot'
“Rybka 2.3.2a - 1500 Elo” /fd=“C:\Program Files\Chess\Polyglot\Rybkas\Rybka 2.3.2a” /fcp='polyglot'
“Ufim 8.02 - 1500 Elo” /fd=“C:\Program Files\Chess\Polyglot\Ufim 8.02” /fcp='polyglot'
}
/secondChessProgramNames={GNUChess
“GNUChes5 xboard”
}

Notice that the /secondChessProgramNames= field is left at the default entries in my winboard.ini file. In other words I have left the /secondChessProgramNames= section blank. That is because I don't play many chess engine versus chess engine games. If I do play any engine vs. engine matches then I would fill in the secondChessProgramNames= fields. If you want to play engine vs. engine matches with Winboard then you would fill in this area. Just it would use /sd and /scp where required instead of /fd and /fcp.

There are too many things about the entries in the winboard.ini file to be covered here but two things that can be done is for games played through the GUI to be saved to a Pgn file (You have to set the path to the actual pgn file), and with Winboard_X chess fonts can be used for the pieces instead of bitmaps. I have read where some people have problems with Winboard_X in using chess piece fonts with it but I have had no problem with using Chessbase's Fritz font with it, and other chess piece fonts can also be used with it instead.

Now go to the Winboard_X folder and double-click the winboard_x exe file. Make sure that “Play against a chess engine or match two engines” is selected. Since there is only one engine installed (Rybka 2.2n2) that is the one selected. Click the OK button.

21.jpg



One thing to do is to select 'Board' from the 'Options' menu and make sure 'Moderate' board size is selected. On my computer anyway the moderate board size fills the screen very well. I should note that I use a 800 x 600 screen resolution, so I don't know how things will look at higher resolutions - Maybe o.k., maybe not.

22.jpg



Then in the below example I go to 'Mode' in the menu and select 'Show Engine Output' and 'Show Move History'.

23.jpg



I then move the Engine Output and Move History windows to where I want them.

24.jpg



Go to 'Options > Time Control' to set the game times

25.jpg





26.jpg



To have Rybka play as the white pieces go to 'Mode > Machine White'

27.jpg



And here Rybka makes the first move

28.jpg



And going to 'Action > Abort' - I abort the game. If I wanted to play the actual game I would move one of the black pieces instead.

29.jpg





30.jpg



Two things especially to look at in the Winboard GUI not shown here would be 'Options > General' and 'Options > Engines'.

This is basically all the information I can give, it by no means covers everything. Further information can be found through self-discovery and through searching on the Internet or via a knowledgeable friend, and definitely through reading the documentation that comes with Polyglot, and Winboard (whichever version is being used).

***

Here is a visual representation of what the folder (directory) structure would look like if the above posting were followed.

31.jpg

Once it is learned that the paths in the polyglot.ini and winboard.ini files just need to point to the correct places, the folders can be kept pretty much wherever the person using them wants them to be.

This is how I have my folders structured.

32.jpg



Note: The information on this page was graciously supplied by Charles Browne


Personal Tools