A Basic Guide for setting up Winboard a UCI Chess Engine

Here you will find useful links and tricks on how to do special/advanced things under Winboard. Feel free to contribute to this forum.

Moderator: Andres Valverde

A Basic Guide for setting up Winboard a UCI Chess Engine

Postby Charles Browne » 01 Nov 2008, 18:12

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

************************************

Go to - http://www.ascotti.org/programming/chess/winboard_x.htm - and download Winboard_X (The latest version from Jan 29, 2006). Winboard_X is the regular Tim Mann's Winboard GUI with some modifications done to it. There is a Winboard_F with chess variants for download on the Internet but I use Winboard_X and I am using that version in this example.

If you desire to use Winboard_F information on it can be found here -
http://www.open-aurec.com/wbforum/viewtopic.php?t=49439


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


Image


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.


Image


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


Image


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.


Image


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.


Image


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,


Image


and extract the files contents to the temporary place.


Image


A note: Polyglot 1.4 needs the cygwin1.dll file to work. On the Polyglot download page you will see reference to:

"New: PolyGlot 1.4w (Fabien Letouzy, modified by Fonzy Bluemers!)"

This Fonzy Bluemers modified version of Polyglot 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.


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.)


Image


For an example chess engine to use, go to -
http://www.rybkachess.com/index.php?aus ... mo+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.


Image


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.


Image


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'.


Image


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.


Image


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


Image


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 Post for information on how the making of a polyglot.ini file is accomplished.


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


Image


At this point in the Polyglot folder I make another folder called Rybka 2.2n2, 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.


Image


Image


Now 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.


Image


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:

http://www.rwbc-chess.de/ - click the 'Downloads' link underneath the heading 'RWBC'.



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.


Image


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.


Image


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.


Image


This is the entry shown in the above graphic displayed as code -

Code: Select all
}
/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 -

Code: Select all
"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 -

Code: Select all
}
/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.


Image


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.


Image


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


Image


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


Image


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


Image


Image


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


Image


And here Rybka makes the first move


Image


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.


Image


Image


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.


Image


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.


Image


post edited: The above post was edited to reflect changes in the software that was currently available for download at the time the original post was made. All software now referenced in the above post was available at the time of this post edit. All of the above links worked. :)
Last edited by Charles Browne on 07 Nov 2008, 22:20, edited 6 times in total.
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Return to How To & Useful Links

Who is online

Users browsing this forum: No registered users and 2 guests