Your trusted source for computer chess information!

This is an old revision of the document!


Computer-Chess Wiki

Understanding Chess Engine Protocols

Introduction

In the past, buying chess-playing software was simple, you bought it, and it came with a Chess playing program and that was it. But nowadays, Chess programs (or should I say engines) are highly “portable”. With a increasing number of chess programs conforming to protocols such as the Winboard and Universal Chess Interface (UCI) protocols, they are no longer confined to only one software or interface. Users can now “export” one chess program (engine) from one software/interface they have bought to another. If you have no idea what Winboard or UCI are, this article will be just right for you. Very soon, you will be mixing and matching Chess Engines with the best of them.

The Games Chess Engines Play

First let us define a few terms. When we talk about a normal piece of software that you buy like say, Chessmaster, you might see the whole software package as one complete whole. In actual fact, we can actually split the software into 2 quite distinct components. The first part is what I call the user interface (or graphical user interface) and the other part is the chess engine. By user interface, I refer to the software portion that interacts with the user. This could be anything from a the parts of a chess-playing program that displays the chess board, allows the user to make moves, the search filters in a database, or the online capabilities of a ICS client, etc. This is to be distinguished from the chess engine , which is the portion of the program that actually decides or calculates what move to play. So, for the case of Chessmaster, while the whole package is named Chessmaster it can be seen to be in fact made up of two parts, the Chessmaster interface and the chess engine which is named “The King” written by Johan de Koning. While both parts are often programmed by the same person, it's not always true.

The Body Versus the Brain

By separating chess software into two separate components, you can now see now it's possible that one Chess engine can work happily in one interface as well as another. Think about it. The fact that you can “import” say Crafty (a well known free Chess engine) into Winboard, Fritz, Chess Assistant, Bookup, or any other interface and have Crafty working implies that there must be some way for Crafty to communicate with the software. It also implies that there are two programs at work, the “brain” or the engine portion that dictates what move to be played, and the user interface (also known as the graphical user interface [GUI]), that handles the display of moves and interacts with the user. This all works seamlessly together, that it looks like only one program is running, but if you view the programs running in your task manager, you can clearly see two programs at work. One crude analogy is to think of the interface as the “body” and the chess engine as the “brain” that makes the decisions. In the above example, Crafty acting as the brain can work equally well in either “bodies”/interfaces which will faithfully display all the moves decided on by Crafty. Clearly when referring to a chess software package we must be careful to specify whether we are talking about the interface or the engine especially in cases where they both bear the same name. Not all chess engines can run in all user interfaces. For a chess engine to run properly in a user interface (Fritz, Chess Assistant, Winboard, etc), they must share a common communication protocol or “language” to communicate.

Why are Protocols Important?

As mentioned before when all engines and interfaces share the same protocol, you will be able to switch and match chess engines in the same interface! Why would you want to do that? After all isn't the one that comes as the default with your interface good enough? There are some possible reasons

  • You gain access to external engines, many of which are free.
  • While many of the free Chess engines are weaker than the commercial ones you can get, they may be suitable as a playing opponent since they play at a level closer to you. Of course, you can use the “dumbing down” features (e.g. 'friend mode' in Fritz) that most modern programs have, but these in my experience often lead to unrealistic play.
  • You get to switch and mix engines to the interface that you are most comfortable with.
  • You can obtain an analysis from a wider range of chess engines with different styles. You can think of it as seeking a “second opinion”, after all each chess engine has it's strengths and weaknesses. Comparing analysis, or even allowing the two engines to play it out can accomplish this!
  • For those of you interested in playing computer versus computer matches to decide which engine is stronger, this is now possible, with each engine “taking turns” to control the moves made. Note however all this is possible, only if the Chess engines and interface use the same protocol. Some interfaces like Chess Assistant support 2 or more protocols so you can get all the benefits this allows, including the ability to match engines supporting different protocols against each other.

Also, you will see that adaptors are available to convert among the 3 major protocols, so this also expands your options somewhat. However, if you are using a chess engine that does not support any of the major protocols then you basically have no choice. Today there are two major open protocols and one major closed protocol.

The "Languages"

By far the most common protocol or language used is the Winboard communication protocol by Tim Mann. Currently at least 200 free chess engines support this protocol. The other is the Universal Chess Interface protocol by Stefan Meyer-Kahlen (Shredder) and Rudolf Huber (SOS) which at time of writing is supported by about 50 engines.

The Winboard Protocol

Winboard (and Xboard, it's linux brother) is perhaps more famous as a software client used to connect online. However strictly speaking we need to make a distinction between the interface itself and the protocol. While the idea of the Winboard protocol originated with Winboard, Winboard (the user interface) is not the only interface to support the Winboard protocol. In fact, Winboard being the dominant standard is supported by most commercial and many freeware interfaces (databases and playing programs). A short list includes Bookup, Chessbase GUI (through a adaptor, but more on that in part II), Chessmaster, Chess Assistant, Chess Academy, Chess Partner, and many more. Please refer to table at the end of article for more details.

The Universal Chess Interface

The other open communication protocols that is gaining popularity is the Universal Chess Interface. The first interface to support the UCI protocol was the commercial Shredder 5 by the authors of UCI. Recently, other interfaces have began to support it, including Chess Assistant 6, Chess Partner and Fritz 7 (patched up to Jan 2002).

Open Versus Closed Protocols

Both Winboard and the Universal Chess Interface are examples of open protocols. 'Open' means that the protocol is available for free such that any programmer can (if they wish) adapt their program to conform to the standard. This is as opposed to closed protocol, where the standard is secret and not available to the public. This can include proprietary interfaces which are not meant to be accessible by other engines. On the other hand it can refer to private/propriety protocols which are known only to engines belonging to the same company or to authors who pay a licensing fee to use the protocol. The ChessBase protocol is perhaps the most famous one.

ChessBase Protocol

In general closed protocols are not very interesting because they support only a small number of chess engines. ChessBase protocol is interesting in that some of the best chess engines in the world use them. The ChessBase collection of chess engines includes Fritz, Junior, Nimzo, HIARCS, Tiger and Shredder. Naturally they are all commercial. Generally, however, except for a few exceptions, no one else knows how the ChessBase communication standard works, or how to adapt their engine to conform to that standard. Crafty the famous freeware engine for example exists as a ChessBase engine. However, the author of Crafty, Dr Robert Hyatt, cheerfully admits that he has no idea how to make a ChessBase engine, as the ChessBase version of Crafty is altered and complied by the staff from ChessBase. This is true for most of the other ChessBase native engines (except perhaps Comet by Uli Türke) that you can download for free. While the ChessBase interface supports the Winboard protocol (and Fritz 7 patched up to Jan 2002 supports the UCI protocol), such engines have to be “adapted” before they can run in ChessBase. Due to a flawed implementation of the adaptor, Winboard engines are much weakened as compared to “native” ChessBase engines that use the private ChessBase communication protocol. (More on this in part II.) The above protocols are not the only protocols around (There is Millennium Chess System [MCS] which is supported by Shredder 3/4,Zarkov 5, WChess2000, and Genius 6.5, as well as auto232 players), but the three I mention above are the ones that you are most likely to encounter.

Future Issues

In part II of this series, we will briefly trace the history of Xboard/ Winboard and how the idea of separating the chess engine component from interface came about. We will also examine briefly the differences between the Winboard protocol and the UCI protocol, reasons for the recent rise in popularity of UCI, as well as the great debate over the apparent bugs in the Winboard adaptor used by ChessBase. In part III, we will put everything together by giving examples of what you can or cannot do with your chess engines. There will be advice given on the use of adaptors as well and examples of how to do so for the most popular interfaces. And finally in Part IV we will round up the article with a small section on ICS support in various interfaces as well as the use of the auto232 protocol. For now, I will leave you with a table of common interfaces and the protocols they support.

Sincerely, Aaron Tay 1 March 2002

Links

Technical links

Interfaces

Engine list

General help and reviews

Computer Chess Forums and Newsgroups

Summary of Interfaces and the Protocols they support

Name Winboard protocol UCI protocol Chessbase protocol Remarks
Arena WB 1 & 2 Yes No Arena is a free interface that will be released
Bookup

WB 1 No No NA
Chess Academy 6 WB 1 Yes for Chess Academy 7 No Supports Millennium Chess System [MCS] as well
Chess Assistant 6+ WB 1 & 2 Yes , but not the light version No Supports Millennium Chess System [MCS] as well
ChessBase GUI like Fritz, Junior, Hiarcs, Shredder 5.32 Yes, comes with a adaptor Yes for Fritz 7 with patch Jan 2002 Yes NA
ChessBase Shredder 6 Yes comes with a adaptor Yes Yes Bundled together with Shredder 6 UCI interface (See below)
“Classic” Shredder 6 Yes comes with a adaptor Yes No Bundled together with Shredder 6 CB interface (See above)
Chessmaster 8000+ WB 1 No No Chessmaster 8000 is a Winboard engine
Chess Partner 5.0.0.4 WB 1 & 2 Yes No NA
Chess Vision

WB 1 & 2 No No NA
Gandalf 5.1

WB 1 & 2 Yes No Sold by Rebel, Gandalf 5.1 (the engine) is Winboard compatible only
SCID WB 1 & 2 No No SCID is a free Chess database
Shredder 5 Yes,comes with a adaptor Yes No Shredder 3 to 5 Supports Millennium Chess System [MCS] as well
Winboard WB 1&2 No No The original interface to support Winboard protocol

You can find a full list of interfaces that support Winboard, UCI, ChessBase protocols here.


Personal Tools