Difference between revisions of "Chess Engine Communication Protocol"

From Chessprogramming wiki
Jump to: navigation, search
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Protocols]] * Chess Engine Communication Protocol'''
 
'''[[Main Page|Home]] * [[Protocols]] * Chess Engine Communication Protocol'''
  
The '''Chess Engine Communication Protocol''', also dubbed the '''XBoard''' or '''WinBoard''' protocol after the eponymous [[XBoard]] or [[WinBoard]] [[GUI|graphical user interfaces]] (GUI), is an open [https://en.wikipedia.org/wiki/Communication_protocol communication protocol] for chess engines to play [[Chess Game|games]] automatically, that is to communicate with other chess playing entities.   
+
'''Chess Engine Communication Protocol''' (CECP),<br/>also dubbed the '''XBoard''' or '''WinBoard''' protocol after the eponymous [[XBoard]] or [[WinBoard]] [[GUI|graphical user interfaces]] (GUI), is an open [https://en.wikipedia.org/wiki/Communication_protocol communication protocol] for chess engines to play [[Chess Game|games]] automatically, that is to communicate with other chess playing entities.   
  
 
=GUI=
 
=GUI=
Line 13: Line 13:
 
=UML State diagram=
 
=UML State diagram=
 
[[FILE:xboard.gif|none|border|text-bottom|link=http://walkofmind.com/programming/chess/xboard.htm]]  
 
[[FILE:xboard.gif|none|border|text-bottom|link=http://walkofmind.com/programming/chess/xboard.htm]]  
WinBoard/XBoard protocol [https://en.wikipedia.org/wiki/UML_state_machine UML state diagram] by [[Alessandro Scotti]] <ref>[http://walkofmind.com/programming/chess/xboard.htm Winboard/XBoard UML state diagram] by [[Alessandro Scotti]]</ref>  
+
WinBoard/XBoard protocol [https://en.wikipedia.org/wiki/UML_state_machine UML state diagram] by [[Alessandro Scotti]] <ref>[http://walkofmind.com/programming/chess/xboard.htm Winboard/XBoard UML state diagram] by [[Alessandro Scotti]]</ref> <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=70502 Winboard state machine diagram] by [[Harald Lüßen]], [[CCC]], April 15, 2019</ref>
  
 
=Version 2=
 
=Version 2=
 
[[Harm Geert Muller]] established a protocol Version 2 in September, 2009 <ref>[http://home.hccnet.nl/h.g.muller/engine-intf.html Chess Engine Communication Protocol] by [[Tim Mann]] & [[Harm Geert Muller|H.G. Muller]]</ref>, also covering [[Games|Chess Variants]] and different board sizes.
 
[[Harm Geert Muller]] established a protocol Version 2 in September, 2009 <ref>[http://home.hccnet.nl/h.g.muller/engine-intf.html Chess Engine Communication Protocol] by [[Tim Mann]] & [[Harm Geert Muller|H.G. Muller]]</ref>, also covering [[Games|Chess Variants]] and different board sizes.
 +
 +
=Pros and Cons=
 +
Those pros and cons compared with [[UCI]]
 +
==Pros==
 +
* Short commands
 +
* It has redundant commands for almost all chess tasks from old-time to now
 +
* Designed to work without the need of having an extra thread for processing those commands
 +
* Allow chess engines act a bit independently such as they can auto-start pondering after a move
 +
 +
==Cons==
 +
* Has a long and complicated list of commands
 +
* Use many suppose about data without keywords requirements. For example, the string "a2a3" is considered as a move, "9 156 1084 48000 Nf3 Nc6 Nc3 Nf6" is considered as a computing output when the first number is the ply, the second number is a score in centipawn unit...
 +
* Since allowing chess engines acting independently chess GUIs may get loss to control engines
 +
* Some popular chess GUIs don't support
  
 
=Engines=
 
=Engines=
Line 38: Line 52:
 
* [[Scid vs. PC]]
 
* [[Scid vs. PC]]
 
* [[Scidb]]
 
* [[Scidb]]
 +
* [[Banksia]]
 +
* [[Banksia GUI]]
  
 
=Utilities=
 
=Utilities=
Line 64: Line 80:
 
* [https://groups.google.com/d/msg/rec.games.chess.misc/M-NkXvEu1DM/XeESczC85o0J XBoard and WinBoard, version 3.6.0] by [[Tim Mann]], [[Computer Chess Forums|rgc]], May 09, 1997
 
* [https://groups.google.com/d/msg/rec.games.chess.misc/M-NkXvEu1DM/XeESczC85o0J XBoard and WinBoard, version 3.6.0] by [[Tim Mann]], [[Computer Chess Forums|rgc]], May 09, 1997
 
* [https://www.stmintz.com/ccc/index.php?id=26696 new autoplayer interface standard] by [[Robert Hyatt]], [[CCC]], September 15, 1998
 
* [https://www.stmintz.com/ccc/index.php?id=26696 new autoplayer interface standard] by [[Robert Hyatt]], [[CCC]], September 15, 1998
 +
* [https://groups.google.com/d/msg/rec.games.chess.computer/su1X8FrRMPA/dMUBRY-RT4AJ xboard/winboard interface documentation] by [[Jan Eric Larsson]], [[Computer Chess Forums|rgcc]], November 27, 1998
 
* [https://www.stmintz.com/ccc/index.php?id=62577 WinBoard and pondering under W98] by [[Frank Phillips]], [[CCC]], July 28, 1999 » [[Pondering]], [[WinBoard]]
 
* [https://www.stmintz.com/ccc/index.php?id=62577 WinBoard and pondering under W98] by [[Frank Phillips]], [[CCC]], July 28, 1999 » [[Pondering]], [[WinBoard]]
 
==2000 ...==
 
==2000 ...==
Line 74: Line 91:
 
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=2&t=1693&p=7809 A question about kibitz] by [[Niyaz Khasanov]], [[Computer Chess Forums|Winboard Forum]], February 18, 2005
 
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=2&t=1693&p=7809 A question about kibitz] by [[Niyaz Khasanov]], [[Computer Chess Forums|Winboard Forum]], February 18, 2005
 
* [http://lists.gnu.org/archive/html/info-gnu-chess/2006-05/msg00004.html Re: gnuchess/xboard protocol] by [[Hans Eric Sandström]], [[GNU Chess#NewsGroup|gnu.org]], May 19, 2006
 
* [http://lists.gnu.org/archive/html/info-gnu-chess/2006-05/msg00004.html Re: gnuchess/xboard protocol] by [[Hans Eric Sandström]], [[GNU Chess#NewsGroup|gnu.org]], May 19, 2006
* [http://www.talkchess.com/forum/viewtopic.php?t=24327 Authors of WinBoard SMP engines, take note!] by [[Harm Geert Muller]], [[CCC]], October 11, 2008 » [[Parallel Search]], [[SMP]], [[SMP Engines]]
+
* [http://www.talkchess.com/forum/viewtopic.php?t=24327 Authors of WinBoard SMP engines, take note!] by [[Harm Geert Muller]], [[CCC]], October 11, 2008 » [[Parallel Search]], [[SMP]]
 
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=50429 UCI protocol in winboard] by [[Engin Üstün]], [[Computer Chess Forums|Winboard Forum]], September 24, 2009 » [[UCI]], [[WinBoard]]
 
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=50429 UCI protocol in winboard] by [[Engin Üstün]], [[Computer Chess Forums|Winboard Forum]], September 24, 2009 » [[UCI]], [[WinBoard]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=30088 Adapter for non-standard chess engine to Winboard] by [[Carey Bloodworth|Carey]], [[CCC]], October 10, 2009
 
* [http://www.talkchess.com/forum/viewtopic.php?t=30088 Adapter for non-standard chess engine to Winboard] by [[Carey Bloodworth|Carey]], [[CCC]], October 10, 2009
Line 111: Line 128:
 
* [http://www.talkchess.com/forum/viewtopic.php?t=64411 Winboard questions] by [[Ed Schroder]], [[CCC]], June 26, 2017
 
* [http://www.talkchess.com/forum/viewtopic.php?t=64411 Winboard questions] by [[Ed Schroder]], [[CCC]], June 26, 2017
 
* [http://www.talkchess.com/forum/viewtopic.php?t=64432 Winboard: Resigning?] by [[Rasmus Althoff]], [[CCC]], June 27, 2017
 
* [http://www.talkchess.com/forum/viewtopic.php?t=64432 Winboard: Resigning?] by [[Rasmus Althoff]], [[CCC]], June 27, 2017
'''2018'''
+
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=65454 Loading opening book and tablebases (xboard vs uci)] by [[Pedro Castro]], [[CCC]], October 15, 2017 » [[UCI]]
 +
'''2018 ...'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66745 UCI vs Winboard question] by [[Michael Sherwin]], [[CCC]], March 05, 2018 » [[UCI]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66745 UCI vs Winboard question] by [[Michael Sherwin]], [[CCC]], March 05, 2018 » [[UCI]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=70502 Winboard state machine diagram] by [[Harald Lüßen]], [[CCC]], April 15, 2019
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=71186 Xboard, CECP, how to handle long inits] by [[Srdja Matovic]], [[CCC]], July 04, 2019
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=72019&start=36 Re: PGN standard, its improvement and standardization] by [[Pham Hong Nguyen|Nguyen Pham]], [[CCC]], October 14, 2019 » from [[Portable Game Notation]] to [[Protocols]]
 +
==2020 ...==
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73592 UCI to CECP] by Fulvio, [[CCC]], April 07, 2020 » [[UCI]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74028 Rolling dice] by [[Harm Geert Muller]], [[CCC]], May 27, 2020 » [[EinStein würfelt nicht!]]
  
 
=External Links=  
 
=External Links=  
 +
* [https://www.gnu.org/software/xboard/engine-intf.html Chess Engine Communication Protocol - GNU Project - Free Software Foundation]
 
* [https://en.wikipedia.org/wiki/Chess_Engine_Communication_Protocol Chess Engine Communication Protocol from Wikipedia]
 
* [https://en.wikipedia.org/wiki/Chess_Engine_Communication_Protocol Chess Engine Communication Protocol from Wikipedia]
 
* [http://hgm.nubati.net/CECP.html Chess-Engine Communication Protocol] by [[Harm Geert Muller]] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=58714 CECP ('WB protocol') specs] by [[Harm Geert Muller]], [[CCC]], December 28, 2015</ref>
 
* [http://hgm.nubati.net/CECP.html Chess-Engine Communication Protocol] by [[Harm Geert Muller]] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=58714 CECP ('WB protocol') specs] by [[Harm Geert Muller]], [[CCC]], December 28, 2015</ref>
Line 127: Line 152:
 
: [http://walkofmind.com/programming/chess/xboard.htm Winboard/XBoard UML state diagram] by [[Alessandro Scotti]]
 
: [http://walkofmind.com/programming/chess/xboard.htm Winboard/XBoard UML state diagram] by [[Alessandro Scotti]]
 
* [http://www.horizonchess.com/FAQ/Winboard/index.html FAQ on Winboard and Chess Engines] by [[Aaron Tay]]
 
* [http://www.horizonchess.com/FAQ/Winboard/index.html FAQ on Winboard and Chess Engines] by [[Aaron Tay]]
* [http://www.reocities.com/lyapko/winboard.htm Lyapko George's WinBoard related page] (outdated) by [[George Lyapko]] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=46721 Tool to recreate PGN from winboard.debug?] by [[Sven Schüle]], [[CCC]], January 01, 2013</ref>
+
* [http://www.oocities.org/siliconvalley/lab/6606/winboard.htm Lyapko George's WinBoard related page] (outdated) by [[George Lyapko]] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=46721 Tool to recreate PGN from winboard.debug?] by [[Sven Schüle]], [[CCC]], January 01, 2013</ref>
 
* [http://computer-chess.org/doku.php?id=winboard:faq:index Winboard and Chess Engines FAQ] from [[Ron Murawski|Ron Murawski's]] [http://computer-chess.org/doku.php?id=home Computer-Chess Wiki]
 
* [http://computer-chess.org/doku.php?id=winboard:faq:index Winboard and Chess Engines FAQ] from [[Ron Murawski|Ron Murawski's]] [http://computer-chess.org/doku.php?id=home Computer-Chess Wiki]
 
* [http://www.open-aurec.com/wbforum/viewforum.php?f=19 WinBoard development and bugfixing Forum]
 
* [http://www.open-aurec.com/wbforum/viewforum.php?f=19 WinBoard development and bugfixing Forum]

Revision as of 10:05, 31 May 2020

Home * Protocols * Chess Engine Communication Protocol

Chess Engine Communication Protocol (CECP),
also dubbed the XBoard or WinBoard protocol after the eponymous XBoard or WinBoard graphical user interfaces (GUI), is an open communication protocol for chess engines to play games automatically, that is to communicate with other chess playing entities.

GUI

A GUI supporting the protocol is known as XBoard or WinBoard, being for Unix (Posix) or Windows operating systems, respectively. Many other GUIs support the protocol, which is based on text commands, while requiring the engine to keep the state of the game internally. While the Universal Chess Interface is somewhat more popular today, the Chess Engine Communication Protocol protocol is preferred by some because it allows greater flexibility for the engine (for instance, in pondering).

How it began

Tim Mann in an Interview by Frank Quisinsky, April 2000 [1]:

Originally, xboard and WinBoard were simply graphical user interfaces for GNU Chess, then for GNU Chess and Internet chess servers. Because the GUI and the chess engine are separate programs, several people thought of the idea of connecting their own chess programs in place of GNU Chess, and they began to email me asking how to do it. I think the first person to ask was Shay Bushinsky, in November 1994. Over the years I received so many requests for this information that I was more or less forced into documenting and extending the ad-hoc engine protocol to support them. The document that exists now (chess-engines.html) evolved directly from the original email reply I sent to Shay. Unfortunately, because the protocol was never really designed, but just grew out of documenting the existing communication with GNU Chess, there are still several bugs and deficiencies in it today. It would be nice to make some major revisions, but then of course it would (at best) take a long time for the existing engines to convert over to the new protocol, so both would have to be supported, probably forever. 

UML State diagram

Xboard.gif

WinBoard/XBoard protocol UML state diagram by Alessandro Scotti [2] [3]

Version 2

Harm Geert Muller established a protocol Version 2 in September, 2009 [4], also covering Chess Variants and different board sizes.

Pros and Cons

Those pros and cons compared with UCI

Pros

  • Short commands
  • It has redundant commands for almost all chess tasks from old-time to now
  • Designed to work without the need of having an extra thread for processing those commands
  • Allow chess engines act a bit independently such as they can auto-start pondering after a move

Cons

  • Has a long and complicated list of commands
  • Use many suppose about data without keywords requirements. For example, the string "a2a3" is considered as a move, "9 156 1084 48000 Nf3 Nc6 Nc3 Nf6" is considered as a computing output when the first number is the ply, the second number is a score in centipawn unit...
  • Since allowing chess engines acting independently chess GUIs may get loss to control engines
  • Some popular chess GUIs don't support

Engines

GUIs

Native

Compatible

Utilities

See also

Forum Posts

1990 ...

1995 ...

2000 ...

2005 ...

2010 ...

2011

2012

2013

2014

2015 ...

2016

2017

2018 ...

2020 ...

External Links

What is new in XBoard/WinBoard 4.9.0? by H.G. Muller
rshd-readme.txt by Dan Newman [7] [8]
Winboard/XBoard UML state diagram by Alessandro Scotti

References

Up one Level