Chess boardHow to use Crafty with WinBoard

What is WinBoard? It is a GUI (Graphical User Interface) chess program that runs on Windows 95,98,ME,NT4,2000 and XP. It is completely free software and is distributed under the Free Software Foundation's GNU General Public License (GNU GPL). If you have a WinBoard compatible program (click here to see a list of most of these) then you will be able to use WinBoard as a user friendly interface (or a front-end) to these engines. WinBoard will not make any moves by itself unless it is using an engine and by default it comes with the GNU Chess engine. The engine and WinBoard are 2 separate programs that communicate with each other. This makes it easy for chess programmers to concentrate on writing the chess program without having to take the time to program a GUI for it. WinBoard not only acts as an interface to chess engines, but also acts as an interface to Internet chess servers (ICS) such as ICC and FICS. These instructions do assume some general background knowledge of Windows that I've listed in Appendix D.

Download Crafty executable

http://cito.atspace.com/

Alternate Crafty Compiles site. This site has crafty that was compiled from the source code to suit various pc's with different configurations. These versions use the crafty.rc file instead of .craftyrc . Unzip the files into "C:\Program Files\Crafty" if it exists otherwise create this folder when extracting the files. Instructions in this page assume the file is name .craftyrc but just substitute crafty.rc if you downloaded the crafty executable from this site.

crafty_19.19.zip

This version uses the configuration file .craftyrc instead of crafty.rc. This zip file contains the crafty.exe and the cygwin1.dll file required to run it and also a sample .craftyrc configuration file. Choose the "C:\Program Files\Crafty" if it exists otherwise create this folder when extracting the files.

STEP 1: Download and install WinBoard.

Go to:http://www.tim-mann.org/xboard.html and download the self extracting executable for WinBoard.

Tim Mann's Chess Page

After you've downloaded this file, execute it by double-clicking on it from within Windows Explorer. This will install WinBoard.

STEP 2: Download Crafty.

Use the link at the top of this page to download the main program files of Crafty. The Crafty FTP site:ftp://ftp.cis.uab.edu/pub/hyatt/ has some useful files for crafty:

When you first double-click on the .craftyrc file, choose wordpad to open it. Make sure you disable the Windows Explorer option "Hide file extensions for known file types" to make it simpler dealing with a text file with a .craftyrc extension. See Appendix A for more info on how to do this if you don't know already. ".craftyrc" contains a list of initial commands for Crafty and executes this script every time you run it, so you may wish to add more commands if you want like such as "depth=3". Crafty by default produces log files for each game you play. The log off line in the .craftyrc file turns this off.

STEP 3: Create a shortcut.

You can run Crafty with WinBoard by creating a shortcut using the following target or command-line:

"C:\Program Files\WinBoard\winboard.exe" -cp -fcp "crafty winboard" -fd "C:\Program Files\Crafty"

NOTE: You should read documentation on WinBoard. The help file that comes with WinBoard is very useful, and the WinBoard FAQ that comes with WinBoard as an HTML file is also very useful.

If you see this when you launch winboard:

Fatal Error

then see Appendix C to find out what may be causing this. Here's a screenshot of the shortcut:

Crafty Properties

After running the shortcut and customizing the colours of WinBoard, this is what WinBoard with Crafty as the engine looks like while on the way to mating with a bishop and knight with the help of tablebases:

Screen Shot of WinBoard

Here's what colours I used:

Colour Channel

Red

Green

Blue

Light Square

207

159

96

Dark Square

111

63

15

White Pieces

255

255

255

Black Pieces

0

0

0


Appendix A - How to edit the plain text file called ".craftyrc".
(Click here to go back)

Every filename has an extension, which is the string of characters after the last stop or period (.) of the filename, e.g. the filename "readme.txt" has a "txt" extension. By default, Windows does not show you the extension of the filename if it has an extension that Windows has registered. E.g."readme.txt" would appear as "readme" because Windows associates files with a "txt" extension as a plain text file that is used by the NotePad program. I prefer to view the extension of a filename because it makes dealing with files much less confusing. To view the file extensions you must change the option for Windows Explorer that hides the extension. Warning: It is dangerous to use the windows registry editor incorrectly. Please follow the following steps carefully. If you already know how to show the file extension by configuring the options for Windows Explorer then do that instead of following these steps.

  1. Click on Start / Run... and type "regedit" then click "OK". This will start a program called "Registry Editor".

  2. Browse to the "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" key.

  3. Double-click on the "HideFileExt" value.

  4. Make sure that "Value data" is set to the number "0" then click "OK".

  5. Close the Registry Editor window.


Appendix B - Tablebases.
(Click here to go back)

Tablebases are files that contain information that a chess program uses in the endgame, in order to make the correct moves in an instant. E.g. if the program is in an endgame in which it has a knight and a bishop and the opponent has nothing but a king, it will look up the KBNK (King, Bishop, kNight vs King) file and see what the next move would be. There are no chess programs clever enough to mate with a bishop and knight using only its wit, it needs the tablebase to do this. Also each tablebase has 1 file for each colour, e.g. KBNK.NBW.EMD for white and KBNK.NBB.EMD for black. Why are they so big? Because it has to take into consideration all the possible combinations of positions of the pieces on the board. The more pieces in the tablebase, the more possible combinations and therefore the larger the file.


Appendix C - Causes of the error message "Startup failure on 'XXXXX winboard': The system cannot find the file specified."
(Click here to go back)

This is caused by 1 or more of the following situations:


Appendix D - Assumed knowledge for my chess page.
(Click here to go back)


If you have any suggestions/questions, etc. about this page, please email me.

Email

First Published: 17th August, 1998.

Home