ELECTRONIC T-NOTES


CHESSBASE USA'S WEEKLY ON-LINE NEWSLETTER


FOR THE WEEK OF OCTOBER 20, 2002


RUNNING WINBOARD ENGINES IN FRITZ7

by Steve Lopez

Ever since ChessBase GmbH removed the Winboard Adapter from the Web page (and, no, I don't know why this was done, so please don't ask me), I've seen a lot of questions on Interrant message boards asking about alternative methods for making Winboard engines accessible in the Fritz7 interface. I've found a way it can be done and it's not very difficult if you have a wee bit of computer knowledge (how to create folders, how to copy files, how to edit files). It works pretty well, too -- I've tried this on more than a dozen Winboard engines and all of them work in the Fritz7 interface. However, before we begin, we need to get the usual disclaimer stuff out of the way first...


DISCLAIMERS

Running Winboard engines in the Fritz7 interface requires the use of several pieces of "third party" (i.e. non-ChessBase) software (including the Winboard engines themselves as well as the non-ChessBase adapter software). Consequently:

1) ChessBase GmbH, ChessBase USA, and myself accept no responsibility or liability for any problems or damages that may occur when running any of these third-party programs or utilities;

2) ChessBase GmbH and ChessBase USA offer no technical support (beyond this article) for any of the third-party engines, programs, utilities, and procedures mentioned in this article.

3) As with any third-party software you download from the Internet, you should virus scan all files you download before you run them, and make sure your anti-virus program's AV signature files are current and updated!

None of the above is meant to alarm you. I've successfully run many Winboard engines using the non-ChessBase adapter in the Fritz7 interface without any problems. However, I'm just emphasizing the fact that we're going to be talking about software that is not written by ChessBase and therefore we at ChessBase can't (and won't) be held liable in the unlikely event that any subsequent problems pop up from using Winboard engines and/or the non-ChessBase adapter.


As I stated in the first paragraph of this article, you'll need to know how to perform several very basic functions in Windows (creating folders, copying and editing files, renaming files). If you don't know how to do any of this -- LEARN. These are very basic procedures that you need to know to be able to successfully operate your computer; even little kids can do them and there's no excuse for not learning how to operate your $1,500 machine. Here are links to several online Windows tutorials:

Jan's Illustrated Computer Literacy 101
Computer Help Desk
Teckies.com
Windows Basics

You'll also need several other Web page links. Most files you download from the Interrant are in compressed format (to save download time) and will need to be uncompressed before you use them. By far, the most popular compression format is the .ZIP format and the most popular program for uncompressing these files is WinZip.

You'll definitely need to download the Winboard to UCI adapter, available here. It's written by Odd Gunar Malin and it works really well.

And, last but certainly not least, you'll need to download a Winboard engine. Winboard is a chess interface program created by Tim Mann. It can function as an interface to online chess servers as well as allow you to play chess against the dozens of Winboard-compatible chessplaying engines available for download on the Web. Numerous programmers have created these chess engines and offer them at no charge. Here are a couple of sites from which you can download Winboard-compatible engines directly or which contain links to the various programmers' homepages:

WBEC Ridderkerk
Winboard engines

And, if you've chosen to display engine logos as part of the Clock pane in Fritz7 and want some cool logos for the most popular Winboard engines, you can get them here. To copy one of these logos to your hard drive, just right-click on it, select "Save picture as" and make sure you have "Save as type" set to *.bmp in the popup dialogue before you click "Save".

Now that we have the disclaimers and links out of the way, let's get down to the business of setting up an engine to run in Fritz7. The first step is to download the Winboard to UCI adapter from the link given above. Here's how the adapter (basically) works. Fritz7 can't run Winboard engines directly, but it can run chess engines that use the UCI protocol (see the ETN issue for May 26, 2002 for the details and procedures). The adapter program is essentially a "link" that makes Fritz think the Winboard engine is actually a UCI engine.

Here's the step-by-step on how to use the adapter after you've downloaded it. For the purposes of this discussion, I've made up a fictitious Winboard engine called Boing which we'll "download and install".

1) Create a folder on your hard drive to hold the adapter files. Then unzip the downloaded adapter file so that the uncompressed files wind up in this new folder (your WinZip documentation will tell you how to do this). You'll only need to do this once.

2) Check the contents of the \ChessBase folder on your hard drive (if you installed Fritz7 to the default path suggested by the Installation Wizard, this folder will be inside your \Program Files folder on your C: drive). If you don't already have a subfolder (within the \ChessBase folder) called \Engines.UCI, create one. As in Step One, you'll need to do this just once.

3) Download a Winboard engine to a work folder on your hard drive (in this case, my made-up engine called Boing). The exact destination folder really doesn't matter as long as you remember where on your hard drive you downloaded the file.

4) Create a subfolder within your \Engines.UCI folder with the same name as the engine you just downloaded (for example, I'd create a new folder with the path ...\Engines.UCI\Boing).

5) Use WinZip (or another similar utility) to uncompress the contents of the .ZIP file into the folder you just created (so I'd uncompress all of Boing's files into the \Boing folder).

6) Copy the adapter files Wb2Uci.eng and Wb2Uci.exe from the folder where you unzipped them (in Step One) into the same folder as the Winboard engine's files (in this case it would be the \Boing folder).

7) Next you'll need to edit the file Wb2Uci.eng to add the specific information for the Winboard engine you're adapting. The easiest way to do this is to open the file in Notepad and just type in the information. Here's what the .eng file looks like when you open it:

[ENGINE]
Name=Name of engine
Author=Name of engine author
Filename=Wb2Uci.exe

[OPTIONS]
Program=engine.exe

You'll need to edit the "Name" field (putting in the name of the chess engine), the "Author" field (which is usually found on the Web page from which you downloaded the engine), and the "Program" field (putting in the filename of the engine's .exe file). You do not have to edit the "Filename" line -- leave that line alone.

Going back to our example, let's say I've downloaded the latest version of Boing (v1.06) and that the .exe file is called boing106.exe -- my Wb2Uci.eng file will look like this after I've finished editing it:

[ENGINE]
Name=Boing 1.06
Author=Esteban Lopes
Filename=Wb2Uci.exe

[OPTIONS]
Program=boing106.exe

Make sure that you save the changes you make to this file (File menu/Save in Notepad).

8) If you've downloaded a logo file (in .bmp format) for the Winboard engine, change the filename to Wb2Uci.bmp

9) Start Fritz7, go to the Engine menu, and select "Create UCI engine".

10) Use the "Browse" button to navigate to the Winboard engine's folder (in my example, this would be ...\Engines.UCI\Boing). Select the file Wb2Uci.exe, not the .exe file for the Winboard engine! (I'll explain this later). Click once on Wb2Uci.exe to select it and then click "Open". This will return you to the "Create UCI engine" dialogue.

11) You'll see the engine name and author name displayed just the way you typed them in the .eng file in Step Seven. Click "OK" and, after a few moments, the Winboard engine will be installed as a new engine usable in Fritz7. You can hit F3 on your keyboard to call up the scrolling list of engines and you'll see the new engine displayed in this alphabetical list.

Here's how this all works (and I'll try to make this as simple as I can). The file Wb2Uci.exe is a "translator" file that links Fritz7 to the Winboard engine, passing commands back and forth between the engine and interface according to the parameters of the UCI protocol. By selecting the file Wb2Uci.exe in Fritz' "Create UCI engine" dialogue, you're telling Fritz to treat that file as though it was an actual UCI engine; in effect, you're tricking Fritz into thinking that Wb2Uci.exe is the real engine (which is why you renamed your .bmp file also -- so that Fritz will recognize and display that engine's logo).

Meanwhile, the Wb2Uci.exe file looks to the file Wb2Uci.eng (the file you edited) for information as to the name of the Winboard engine's actual program file (that's why you edited the "Program=" file to tell the .eng file what to look for) and then tricks the Winboard engine into thinking that Wb2Uci.exe is the Fritz7 program interface. The Wb2Uci.exe adapter file translates the Winboard commands of the actual chess engine to UCI commands which the Fritz interface can recognize and understand. So, in reality, the adapter file acts as a translator between two other programs that speak different "languages", allowing them to communicate with each other. It's as simple as that -- the Fritz7 interface talks to the adapter which talks to the chess engine, then the engine gives its Winboard commands to the adapter which then translates them from "Winboard" to "UCI" before passing them along to the Fritz interface. You edit the Wb2Uci.eng file so that the adapter knows what chess engine it's supposed to be communicating with.

I've used the Winboard to UCI adapter as a translator for a lot of different Winboard engines and (so far) all of them have worked in the Fritz7 interface without a hitch. The neat thing about these engines is that they come in all different strengths: some play very strong chess (with estimated ratings of 2500+) while others are rather weak (with estimated ratings as low as 1200-1400). They also play in many different styles (since every programmer brings something a little different to the table with him). So, in effect, when you download and adapt a variety of Winboard engines you're effectively creating a "chess club" on your computer with a lot of different opponents you can play against.

You can also have a lot of fun pitting these engines against each other in matches and tournaments (see ETN for July 14 and July 21, 2002). In fact, a whole "chess subculture" has evolved on the Interrant, made up of people who specialize in running these types of events.

One last caveat before we wrap this up. Although a few commercial chess engines are Winboard-compatible, the downloadable Winboard chess engines discussed in this article are not commercial products -- they're freebies which are often written by amateur programmers. As such, they are not guaranteed to work flawlessly; in an extreme case or two they sometimes don't work at all (or do things like make illegal moves, promote a pawn to a King, etc.). Some of them require extra command-line parameters to be added to the Wb2Uci.eng file (in the "[Options]" section of that file) in order to make them work properly (and this information is usually provided on the websites from which you can download these engines). This is why (in Point 2 under "Disclaimers" above) I stated that we at ChessBase can't offer technical support for third-party Winboard or UCI engines that are malfunctioning within the Fritz7 interface -- there are literally scores of Winboard engines, all written by different programmers (and with new engines appearing every month), and we can't possibly know all of the various "tweaks" that may be required to get them to work. So when you have a problem with a Winboard engine you've downloaded from a programmer's Web page, please use the "E-mail" link on his page to contact him and ask him if additional parameters need to be set for his engine to work properly.

The steps given in this article might sound like a lot of work when you first read the instructions, but you'll find that it's actually pretty easy and straightforward once you've adapted one or two engines. So fire up that modem and start downloading!

Until next week, have fun!

You can e-mail me with your comments, suggestions, and analysis for Electronic T-Notes.