WB protocol: ++ and --

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

WB protocol: ++ and --

Post by hgm »

I just noticed in the CECP specs (Analysis section) that there are engine->GUI commands ++ and --, "to indicate fail high and fail low". Win/XBoard seems to ignore this command.

Are there engines that actually use this? If so, in what way? From the specs it was not clear to me at all how they should be used. Should they come instead of thinking output? Instead of a stat01 command? In combination with either of those?

I recently proposed a convention (! or ? at the end of the PV) to indicate if the given PV is the result of a fail high or fail low. (Which would imply the PV is 1 or 2 moves long, respectively.) XBoard does take heed of that, currently.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: WB protocol: ++ and --

Post by Ferdy »

hgm wrote:I just noticed in the CECP specs (Analysis section) that there are engine->GUI commands ++ and --, "to indicate fail high and fail low". Win/XBoard seems to ignore this command.

Are there engines that actually use this? If so, in what way? From the specs it was not clear to me at all how they should be used. Should they come instead of thinking output? Instead of a stat01 command? In combination with either of those?

I recently proposed a convention (! or ? at the end of the PV) to indicate if the given PV is the result of a fail high or fail low. (Which would imply the PV is 1 or 2 moves long, respectively.) XBoard does take heed of that, currently.
Looking from one of those engine logs doing sts test, Djinn has this.

Code: Select all

Starting engine djinn1021_x64_popcnt.exe ...
Set wait time to 30s
>> xboard
>> protover 2
<< feature done=0
Received done=0
Increase wait time to 90s
<< 
<< djinn1021_x64_popcnt.exe build&#58; 1.021
<< 
<< Main hash&#58;  1048584 entries, size of each entry=  16 &#40;16.00 Mbytes&#41;
<< Pawn hash&#58;   262152 entries, size of each entry=  64 &#40;16.00 Mbytes&#41;
<< Eval hash&#58;  1048584 entries, size of each entry=  16 &#40;16.00 Mbytes&#41;
<< Rep hash&#58;    16392 entries, size of each entry=   8 &#40;0.13 Mbytes&#41;

Code: Select all

Pos 26
2b2rk1/2qn1p2/p2p2pp/2pPP3/8/4NN1P/P1Q2PP1/bB2R1K1 w - - bm e6; id "STS&#40;v1.0&#41; Undermine.026"; c0 "e6=10, Nc4=1, Ng4=1, exd6=2"; c7 "e6 Nc4 Ng4 exd6"; c8 "10 1 1 2"; c9 "e5e6 e3c4 e3g4 e5d6";

2015-09-19T05&#58;31&#58;22.506000 >> new
2015-09-19T05&#58;31&#58;22.506000 >> setboard 2b2rk1/2qn1p2/p2p2pp/2pPP3/8/4NN1P/P1Q2PP1/bB2R1K1 w - - 0 1
2015-09-19T05&#58;31&#58;22.506000 >> level 40 0&#58;8 0
2015-09-19T05&#58;31&#58;22.506000 >> time 800
2015-09-19T05&#58;31&#58;22.506000 >> go
2015-09-19T05&#58;31&#58;22.522000 << 2 68 0 1674 1. e6 Ne5 2. exf7+ Qxf7 3. Nxe5 Bxe5 4. Qxg6+ Qxg6 5. Bxg6
2015-09-19T05&#58;31&#58;22.522000 << 3 68 0 6374 1. e6 Ne5 2. exf7+ Qxf7 3. Nxe5 Bxe5 4. Qxg6+ Qxg6 5. Bxg6
2015-09-19T05&#58;31&#58;22.538000 << 4 68 1 17995 1. e6 Ne5 2. exf7+ Qxf7 3. Nxe5 Bxe5 4. Qxg6+ Qxg6 5. Bxg6
2015-09-19T05&#58;31&#58;22.553000 << 5 101 3 41286 1. e6 Ne5 2. exf7+ Qxf7 3. Qxg6+ Qxg6 4. Bxg6
2015-09-19T05&#58;31&#58;22.553000 << 6 101 3 47766 1. e6 Ne5 2. Nxe5 Bxe5 3. Ng4 f5 4. Nxh6+ Kh7
2015-09-19T05&#58;31&#58;22.569000 << 7 93 4 85632 1. e6 Nf6 2. exf7+ Qxf7 3. Qxg6+ Qxg6 4. Bxg6 Bc3 5. Rc1 Bb2
2015-09-19T05&#58;31&#58;22.600000 << 8 118 8 131681 ++ 1. e6 Ne5H 2. exf7+H Qxf7H 3. Nxe5 <HT>
2015-09-19T05&#58;31&#58;22.631000 << 8 134 11 181736 1. e6 Ne5 2. Nxe5 Bxe5 3. Ng4 Bg7 4. exf7+ Qxf7 5. Qxg6 Qxg6 6. Bxg6
2015-09-19T05&#58;31&#58;22.662000 << 9 134 14 233457 1. e6 Ne5 2. Nxe5 Bxe5 3. Ng4 Bg7 4. Nxh6+
2015-09-19T05&#58;31&#58;22.694000 << 10 109 17 300058 -- 1. e6 Ne5H 2. Nxe5H dxe5H 3. exf7+H Qxf7H 4. Qxg6+H Qxg6H 5. Bxg6H Bc3H 6. Rb1 <HT>
2015-09-19T05&#58;31&#58;22.740000 << 10 106 22 393401 1. e6 Ne5 2. Nxe5 Bxe5 3. Ng4 Bg7 4. exf7+ Qxf7 5. Qxg6 Qxg6 6. Bxg6 Bd7
2015-09-19T05&#58;31&#58;22.803000 << move e6
Engine best move is correct!!
Position points earned             &#58; 10
Total points for this theme so far &#58; 165/260
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WB protocol: ++ and --

Post by hgm »

This doesn't seem the same usage as mentioned in the specs, which suggest that the ++ and -- have to be directly followed by a linefeed:
CECP specs wrote:To give the user some extra information, the chess engine can output the strings "++\n" and "--\n", to indicate that the current search is failing high or low, respectively. You don't have to send anything else to say "Okay, I'm not failing high/low anymore." xboard will figure this out itself.