X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=engine-intf.html;h=02166eac3156192f31dc75b77504fc6472c67040;hb=912ff451e7a648f6aa3ba7d2a10df2a1dc2cace5;hp=42525528485ede242cb3ab7d1567f30887793e6f;hpb=b8ccc2d03263c833777a7c055a372501b40bc7ce;p=xboard.git diff --git a/engine-intf.html b/engine-intf.html index 4252552..02166ea 100644 --- a/engine-intf.html +++ b/engine-intf.html @@ -42,11 +42,11 @@ and WinBoard except where they are specifically contrasted.
-There are two reasons I can imagine someone wanting to do this: +There are two reasons I can imagine someone wanting to do this:
I'd like to hear from everyone who is trying to interface their own -chess engine to xboard/WinBoard. Please email me, -tim@tim-mann.org. Also, please join -the mailing list for authors of xboard/WinBoard compatible chess -engines. The list is now hosted by Yahoo Groups; you can join at http://www.egroups.com/group/chess-engines, or you can read the +chess engine to xboard/WinBoard. Please join the mailing list for +authors of xboard/WinBoard compatible chess engines and post a message +about what you're doing. The list is now hosted by Yahoo Groups; you +can join at http://groups.yahoo.com/group/chess-engines, or you can read the list there without joining. The list is filtered to prevent spam.
@@ -97,7 +96,7 @@ implemented in Win32 and work fine. You don't have to use DDE, COM, DLLs, BSOD, or any of the other infinite complexity that Microsoft has created just to talk between two programs. A WinBoard chess engine is a Win32 console program that simply reads from its -standard input and writes to its standard output. See sections +standard input and writes to its standard output. See sections 5 and 6 below for additional details. @@ -154,14 +153,14 @@ features to be slightly different from what GNU Chess 4 does. This release of the protocol specification is the first to carry a version number of its own -- version 2. Previous releases simply -carried a last-modified date and were loosely tied to specific +carried a last-modified date and were loosely tied to specific releases of xboard and WinBoard. The version number "1" applies generally to all those older versions of the protocol.Protocol version 2 remains compatible with older engines but has -several new capabilities. In particular, it adds the +several new capabilities. In particular, it adds the "feature" command, a new mechanism for making backward-compatible changes and extensions to the protocol. Engines that do not support a particular new feature do not have to use it; new features are not @@ -272,10 +271,10 @@ use for polling is different depending on whether the input device is a pipe, a console, or something else. (More Microsoft brain damage here -- did they never hear of device independence?) For pipes, you can use PeekNamedPipe to poll (even when the pipe is unnamed). -For consoles, +For consoles, you can use GetNumberOfConsoleInputEvents. For sockets only, you can use select(). It might be possible to use -WaitForSingleObject more +WaitForSingleObject more generally, but I have not tried it. Some code to do these things can be found in Crafty's utility.c, but I don't guarantee that it's all correct or optimal. @@ -299,7 +298,7 @@ A third way to fix the problem is to check whether there are characters in the buffer whenever you poll. C I/O libraries generally do not provide any portable way to do this. Under C++, you can use cin.rdbuf()->in_avail(). This method has been reported to -work with +work with EXchess. Remember that if there are no characters in the buffer, you still have to poll the underlying file descriptor too, using the method described above. @@ -359,7 +358,7 @@ command.
Here are details for the curious. If xboard needs to send a command -when it is the chess engine's move (such as before the "?" command), +when it is the chess engine's move (such as before the "?" command), it sends a SIGINT first. If xboard needs to send commands when it is not the chess engine's move, but the chess engine may be pondering (thinking on its opponent's time) or analyzing (analysis or analyze @@ -367,7 +366,7 @@ file mode), xboard sends a SIGINT before the first such command only. Another SIGINT is not sent until another move is made, even if xboard issues more commands. This behavior is necessary for GNU Chess 4. The first SIGINT stops it from pondering until the next move, but on some -systems, GNU Chess 4 will die if it receives a SIGINT when not +systems, GNU Chess 4 will die if it receives a SIGINT when not actually thinking or pondering.
@@ -403,7 +402,7 @@ position. It will later send the initString again to start a new game. If your engine can't play multiple games, you can disable reuse either with the "feature" command (beginning in protocol version -2; see below) or +2; see below) or with xboard's -xreuse (or -xreuse2) command line option. xboard will then ask the process to quit after each game and @@ -532,17 +531,17 @@ reply.- +
- +
This sequence is used to avoid the "black" command, which is now -considered obsolete and which many engines never did implement as +considered obsolete and which many engines never did implement as specified in this document.
@@ -832,23 +831,23 @@ your default is for pondering or whether "new" affects this setting.- +
- +
-Generally, xboard will never send an ambiguous move, so it does not -matter whether you respond to such a move with an Illegal move message +Generally, xboard will never send an ambiguous move, so it does not +matter whether you respond to such a move with an Illegal move message or an Error message.
@@ -1322,7 +1321,7 @@ against an opponent on the ICS (Zippy mode), xboard sends "say MESSAGE\n" to the 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e6 + 4. 15 0 515 d1e2 e8e7 e2e3 e7e6 + 5+ 74 0 702 d1e2 f7f5 e2e3 e8e7 e3f4 + 5& 71 0 1085 d1e2 e8e7 e2e3 e7e6 e3f4 + 5. 71 0 1669 d1e2 e8e7 e2e3 e7e6 e3f4 + 6& 48 0 3035 d1e2 e8e7 e2e3 e7e6 e3e4 f7f5 e4d4 + 6. 48 0 3720 d1e2 e8e7 e2e3 e7e6 e3e4 f7f5 e4d4 + 7& 48 0 6381 d1e2 e8e7 e2e3 e7e6 e3e4 f7f5 e4d4 + 7. 48 0 10056 d1e2 e8e7 e2e3 e7e6 e3e4 f7f5 e4d4 + 8& 66 1 20536 d1e2 e8e7 e2e3 e7e6 e3d4 g7g5 a2a4 f7f5 + 8. 66 1 24387 d1e2 e8e7 e2e3 e7e6 e3d4 g7g5 a2a4 f7f5 + 9& 62 2 38886 d1e2 e8e7 e2e3 e7e6 e3d4 h7h5 a2a4 h5h4 + d4e4 + 9. 62 4 72578 d1e2 e8e7 e2e3 e7e6 e3d4 h7h5 a2a4 h5h4 + d4e4 +10& 34 7 135944 d1e2 e8e7 e2e3 e7e6 e3d4 h7h5 c2c4 h5h4 + d4e4 f7f5 e4f4 +10. 34 9 173474 d1e2 e8e7 e2e3 e7e6 e3d4 h7h5 c2c4 h5h4 + d4e4 f7f5 e4f4
If your engine is pondering (thinking on its opponent's time) in post @@ -1575,11 +1574,11 @@ on one move does not accumulate for use on later moves.
xboard supports analyzing fresh games, edited positions, and games from files. However, all of these look the same from the chess engine's perspective. Basically, the engine just has to respond to the -"analyze" command. +"analyze" command. Beginning in protocol version 2, if your engine does not support analyze mode, it should use -the feature command to set analyze=0. +the feature command to set analyze=0. The older method of printing the error message "Error (unknown command): analyze" in @@ -1587,7 +1586,7 @@ response to the "analyze" command will also work, however.
-To enter analyze mode, xboard sends the command sequence "post", "analyze". +To enter analyze mode, xboard sends the command sequence "post", "analyze". Analyze mode in your engine should be similar to force mode, except that your engine thinks about what move it would make next if it were on move. Your engine should accept the @@ -1609,7 +1608,7 @@ if any; see above.
If the user selects "Periodic Updates", xboard will send the string ".\n" to the chess engine periodically during analyze mode, unless the @@ -1673,7 +1672,7 @@ figure this out itself.
Some engines have variant interpretations of the force/go/white/black, -time/otim, and hard/easy command sets. +time/otim, and hard/easy command sets. In order to accommodate these older engines, xboard uses these commands only according to the stylized patterns ("idioms") given in this section. The obsolete white and black commands @@ -1694,7 +1693,7 @@ playing the opposite color.