The mate-in-5 problems from BWTC

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Dann Corbit
Posts: 12482
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: EPD variation display

Post by Dann Corbit »

sje wrote:
Dann Corbit wrote:
sje wrote:I need to finish the update of the EPD specification.
Two suggestions for the update of the EPD specification:
1. No useless e.p. tags. (I would suggest that even in the case where there is a vulnerable pawn but the attacker is pinned, the e.p. flag does not get set). In any case, if there is no attacker, do not set any e.p. flag.
2. Change the meaning of pm. To echo the first node of the pv does not seem to have any value for me. I use pm as a list of predicted moves (I also generally include an indication of their probability with a comment of some sort).
The en passant target square will always be "-" except when at least one en passant capture is available.

The old pm opcode has been deprecated. Instead, from the pv field (if present), use its first move (if present). The reason for this is to avoid having the same data appear twice and so eliminate the chance of a mismatch. Also, the old pm opcode would only specify a single move and not a set of moves. To specify a set of best moves, use the bm opcode which takes zero or more move operands.
On the pm opcode, I use it in a non-standard way.

Consider:
[d]2kr1b1r/pb3p2/5P2/1qnp4/Npp5/4B1P1/1P3PBP/R2Q1RK1 w - -

2kr1b1r/pb3p2/5P2/1qnp4/Npp5/4B1P1/1P3PBP/R2Q1RK1 w - - acd 31; acs 1896; bm Nxc5; c3 "Qg4+"; cce -131; ce 129; pm Qg4+ {151} Nxc5 {23} Bd4 {1}; pv Nxc5 Bxc5 Qg4+ Kb8 Qf4+ Ka8 Qc7 Rc8 Qxf7 Rhf8 Qg7 Rg8 Qh7 Rh8 Qf5 d4 Bg5 Bxg2 Kxg2 c3 h4 Qb7+ f3 Qh7 Qe4+ Qb7 Rad1 Rhe8 Qd3 b3 bxc3 dxc3 Qxc3 Re2+ Kh1 Rc2 Qd3 Bf2 Kg2 Be3+ Kh3; white_wins 46; black_wins 94; draws 23;
As you can see, black has a big advantage for this position, if I play the usual move Qg4+ (most books will have this). But Nxc5 gives a clear advantage for white.

This is very useful for me.
I also added some other obviously non-standard tags for my own usage.

A predicted move is not necessarily a best move (often, I know for certain that the most likely move to be played is a losing move and one of the less likely moves is a winning move). In the above row, the pm does not match the first move of the pv. But I will predict that it is likely to be played, because it is a book opening.

If we do not use pm for this, I would create my own tag for that purpose. The utility is obvious. (E.g. cce is calculated centipawn evaluation as composed from win/loss/draw statistics. If this disagrees with the ce value, then it is something to investigate. The won/loss/drawn stat is also helpful for me.)

In fact, the very best book moves are those that the opponent is probably going to make the wrong choice (if I know the better alternative).
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: EPD variation display

Post by sje »

The EPD revision is still in progress and it will remain so for a while. I will try to accommodate all reasonable requests; in return I hope that all implementations will follow the standard.

A better standard means more implementations. And more implementations mean that there will be more general purpose EPD utility programs which all can use.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: EPD variation display

Post by Ferdy »

I run the tool with chestUCI to take the DM6 fen. The tool log file showed like in the following. The one thing that I have observed is that it added multipv 2, so this would signal a position with 2 equal evaluation, hence the two dm6 moves. And of course there is this.

Code: Select all

info string Matt in 6 gefunden !  (2 Lösungen in 00:02)
I don't understand those 2 words there, but there is number 2.

[d]r1b1kb1r/ppp2ppp/2n1p3/3pPn2/3P1q2/2PB4/PPK3PP/RNBQ2NR b kq - 0 1
Tool log.

Code: Select all

Starting engine ChestUCI.exe ...
>> uci
<< id name ChestUCI Ver.5.2
<< id author Franz Huber
<< option name HashSize type spin default 64 min -1 max 2048

&#91;...&#93;

Pos 36
r1b1kb1r/ppp2ppp/2n1p3/3pPn2/3P1q2/2PB4/PPK3PP/RNBQ2NR b kq - 0 1

2015-08-08T19&#58;52&#58;01.532000 >> isready
2015-08-08T19&#58;52&#58;01.532000 << readyok
2015-08-08T19&#58;52&#58;01.532000 >> ucinewgame
2015-08-08T19&#58;52&#58;01.532000 >> position fen r1b1kb1r/ppp2ppp/2n1p3/3pPn2/3P1q2/2PB4/PPK3PP/RNBQ2NR b kq - 0 1
2015-08-08T19&#58;52&#58;01.532000 >> go mate 6
2015-08-08T19&#58;52&#58;01.536000 << info string FEN&#58; r1b1kb1r/ppp2ppp/2n1p3/3pPn2/3P1q2/2PB4/PPK3PP/RNBQ2NR b kq -   &#40;15+16&#41;
2015-08-08T19&#58;52&#58;01.536000 << info string Stellungs-Analyse&#58;  C0/R0/K2/P11/X32   S&#58;13/49
2015-08-08T19&#58;52&#58;01.536000 << info string Suche nach Matt in 10 ...  &#40;Hash=64MB&#41;
2015-08-08T19&#58;52&#58;02.564000 << info depth 6 currmovenumber 1 currmove f5d4
2015-08-08T19&#58;52&#58;02.565000 << info depth 6 time 294 score mate 6 pv f5d4
2015-08-08T19&#58;52&#58;02.565000 << info depth 6 currmovenumber 4 currmove c6d4
2015-08-08T19&#58;52&#58;02.566000 << info depth 6 time 501 score mate 6 pv c6d4
2015-08-08T19&#58;52&#58;02.566000 << info depth 6 currmovenumber 11 currmove g7g5 hashfull 24 nodes 393885 nps 399072
2015-08-08T19&#58;52&#58;03.564000 << info depth 6 currmovenumber 39 currmove f4f3 hashfull 51 nodes 827026 nps 413719
2015-08-08T19&#58;52&#58;03.704000 << info depth 6 seldepth 6 currmovenumber 49 currmove e8d7 hashfull 54 nodes 873691 nps 409991
2015-08-08T19&#58;52&#58;03.704000 << info string Suche abgeschlossen ...  &#40;Zeit=2.13s&#41;
2015-08-08T19&#58;52&#58;03.721000 << info string Matt in 6 gefunden !  &#40;2 Lösungen in 00&#58;02&#41;
2015-08-08T19&#58;52&#58;03.737000 << info depth 6 seldepth 6 time 2131 score mate 6 multipv 2 pv c6d4 c3d4 f5d4 c2c3 f8b4 c3b4 d4c6 b4b3 f4b4 b3c2 c6d4
2015-08-08T19&#58;52&#58;03.753000 << info depth 6 seldepth 6 time 2131 score mate 6 multipv 1 pv f5d4 c3d4 c6d4 c2c3 f8b4 c3b4 d4c6 b4b3 f4b4 b3c2 c6d4
2015-08-08T19&#58;52&#58;03.753000 << bestmove f5d4
The winchest will output like the following.

Code: Select all

r1b1kb1r/ppp2ppp/2n1p3/3pPn2/3P1q2/2PB4/PPK3PP/RNBQ2NR b kq - 0 1; acn 873692; acs 2; bm Ncxd4+ Nfxd4+; ce 32756; dm 6; pv Nfxd4+ cxd4 Nxd4+ Kc3 Bb4+ Kxb4 Nc6+ Kb3 Qb4+ Kc2 Nd4#;
How can this be best written in epd file, where the two pv will be displayed?

Perhaps it could be written like this,

Code: Select all

r1b1kb1r/ppp2ppp/2n1p3/3pPn2/3P1q2/2PB4/PPK3PP/RNBQ2NR b kq - 0 1 acn 873692; acs 2; bm Ncxd4+ Nfxd4+; ce 32756; dm 6; pv c6d4 c3d4 f5d4 c2c3 f8b4 c3b4 d4c6 b4b3 f4b4 b3c2 c6d4 | Nfxd4+ cxd4 Nxd4+ Kc3 Bb4+ Kxb4 Nc6+ Kb3 Qb4+ Kc2 Nd4#;
As opcode pv can take more than one operand. The sequence probably will correspond to the sequence of moves written in bm opcode. I am just using the pipe symbol "|" to separate the pv line.