X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=engine-intf.html;h=3b7cb6cd3262a9788c85349c501c3d10ae33babe;hb=20d95ee2c3dfba12a15c9290b69aa8aaa9d5f2fa;hp=3e966be042144c1363e06e02c98b01dc12dc8e0e;hpb=09a5c7c790a6715c887207462e38003fedfc8dcf;p=xboard.git
diff --git a/engine-intf.html b/engine-intf.html
index 3e966be..3b7cb6c 100644
--- a/engine-intf.html
+++ b/engine-intf.html
@@ -540,6 +540,7 @@ defined variant names are:
If your engine can play variants on a deviating board size,
like capablanca on an 8x8 board, or capablanca crazyhouse,
-it can list them amongst the variants with a prefix spcifying board size plus
+it can list them amongst the variants with a prefix specifying board size plus
holdings size, like 8x8+0_capablanca or 10x8+7_capablanca.
If it is capable of playing any variant with an arbitrary board size,
it should list "boardsize" as one of the variants.
@@ -1510,6 +1517,46 @@ in this case, you must set done=1 before xboard will enter normal operation.
+setup FEN
+setup (PIECETOCHAR) FEN
+setup (PIECETOCHAR) WxH+S_PARENTVARIANT FEN
+The engine can optionally send a setup command to the GUI in reply
+to the variant command.
+In the simplest form this sends the FEN of the initial position.
+This can be used to implement engines for non-standard variants
+that only differ from standard variants through the initial position.
+(E.g. many of the 'wild' boards you can play on an ICS.)
+Whether the GUI should obey or ignore this command depends on the situation.
+Normally it would ignore it in variants where it knows the standard initial position
+and legality testing is on, or when the user specified an initial position.
+In other cases it will use the FEN sent by the first engine
+for setting up the initial position, as if it was an externally supplied position.
+Such a position will always be sent to a second engine that might be involved,
+and any setup commands received from the latter will always be ignored.
+(This to allow for shuffle games, where the two engines might pick different setups.)
+When no initial position is known, such as for 'catch-all' variants like fairy,
+or whenever the board width is overruled to a non-standard value,
+the FEN will be used as default initial position even when legality testing is on.
+
+Optionally the meaning of the piece ID letters in the FEN can be defined
+between parentheses; this will be interpreted as if it was the value of a
+-pieceToCharTable command-line option, mapping letters to GUI piece types.
+Also optionally behind that, the setup command can specify board width W,
+board height H and holdings size S, as well as a 'parent variant'.
+This is typically done in response to a variant command with a non-standard name,
+about which the GUI is not supposed to know anything at all.
+The engine can then specify board size, participating pieces, initial setup,
+and other rule details (inherited from the parent variant),
+saving the user the trouble to configure the GUI for this non-standard variant.
+Example:
+
+ setup (PN.RQKpn.rqk) 6x6+0_fairy rnqknr/pppppp/6/6/PPPPPP/RNQKNR w - - 0 1
+
+could be used by an engine for Los-Alamos Chess in response to 'variant losalamos',
+and would automatically switch the GUI to this variant as soon as the user
+selected it from the GUI menu.
+The PIECETOCHAR element would ensure a Bishop would not be accepted as promotion choice.
+
Illegal move: MOVE
Illegal move (REASON): MOVE
@@ -1752,11 +1799,42 @@ output should be in the following format:
score | Integer giving current evaluation in centipawns. |
time | Current search time in centiseconds (ex:1028 = 10.28 seconds). |
nodes | Nodes searched. |
+*selective depth | Maximium length of any branch in the current search. |
+*speed | Nodes per second in last measured time interval. |
+* | Reserved for future extensions. |
+*tbhits | Number of tablebase probes made in the current search. |
pv | Freeform text giving current "best" line.
You can continue the pv onto another line if you start each
continuation line with at least four space characters. |
+
+The items marked with * are optional.
+If any of these items is present, the pv field must be preceeded directly by a tab character;
+if no tab character preceeds the first non-integer token,
+the pv field will start at the first non-blank character after nodes.
+Otherwise it will start after the last tab that is not behind any non-integer token.
+Of all integers between nodes and pv the last one is intepreted as tbhits.
+Of any remaining ones the first is interpreted as selective depth,
+and a second as speed.
+More infos could be added to this in the future.
+Note that older interfaces might consider the optional infos to be part of the pv field,
+and display them exactly as sent.
+It is therefore encouraged that engines use tabs or spaces to format this optional info
+so that it will display nicely in (not too wide) columns.
+
+
+
+A question mark as the last character in the pv field should be used to indicate
+the reported score is from a fail low, and thus represents an upper bound only.
+Similarly, an exclamation point should be used to indicate a fail high / lower bound.
+
+
+
+Mate scores should be indicated as 100000 + N for "mate in N moves",
+and -100000 - N for "mated in N moves".
+
+
Example: