The mate-in-5 problems from BWTC

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: EPD field labels

Post by sje »

Ferdy wrote:
sje wrote:
Ferdy wrote:What is the meaning of pt and wt?

Code: Select all

bm = best move(s) (zero or more SAN moves)
id = identification (quoted string)
md = mating distance (full move count, always positive)
nc = node count (always unsigned)
pd = ply draft (always unsigned)
pt = processor time (ddd:hh:mm:ss.mmm, summed over all threads)
pv = predicted variation (zero or more SAN moves)
ss = symbolic score (signed decimal pawns or MateInN or LoseInN or Even)
wt = wall time (elapsed time shown by a clock on the wall)
Can you give an example of how pt is calculated when the engine is using 2 threads?
If the engine is using 1 thread is wt equals pt?
See: http://linux.die.net/man/2/getrusage
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: The mate-in-5 problems from BWTC

Post by sje »

Ferdy wrote:
sje wrote:Symbolic's analysis of the above 83 positions:

Code: Select all

r3k1nr/pp1n2pp/1bp1N1q1/6B1/2B1p3/8/PPP2RPP/R2Q3K w kq - 0 1 md 5; nc 19900406; pd 9; pt 18.926; pv Qxd7+ Kxd7 Rd1+ Kc8 Rf8+ Qe8 Rxe8+ Bd8 Rexd8#; ss MateIn5; wt 18.904;
When Symbolic analyzed the position is it aware that it is solving for position that is mate in 5? something similar to the uci command,

Code: Select all

go mate n
In the position above, the pt is 18.926, is there any stopping rule that you apply when it found the mate in 5?
The search stops when it finds the first mate.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: The mate-in-5 problems from BWTC

Post by sje »

sje wrote:
Ferdy wrote:
sje wrote:Symbolic's analysis of the above 83 positions:

Code: Select all

r3k1nr/pp1n2pp/1bp1N1q1/6B1/2B1p3/8/PPP2RPP/R2Q3K w kq - 0 1 md 5; nc 19900406; pd 9; pt 18.926; pv Qxd7+ Kxd7 Rd1+ Kc8 Rf8+ Qe8 Rxe8+ Bd8 Rexd8#; ss MateIn5; wt 18.904;
When Symbolic analyzed the position is it aware that it is solving for position that is mate in 5? something similar to the uci command,

Code: Select all

go mate n
In the position above, the pt is 18.926, is there any stopping rule that you apply when it found the mate in 5?
The search stops when it finds the first mate.
And using its TABS (traditional A/B search) instead of its mate finder, Symbolic says in less than a second:

Code: Select all

[] sf r3k1nr/pp1n2pp/1bp1N1q1/6B1/2B1p3/8/PPP2RPP/R2Q3K w kq - 0 1
[] tabs 1
SI: Iteration 0: begin
PV: [-4.100/3/0.000/17] 1. Ba6 Bxf2 2. Bxb7
PV: [-3.996/2/0.000/93] 1. Be3 Bxe3
PV: [-1.980/3/0.000/188] 1. Bh4 Bxf2 2. Bxf2
PV: [-1.950/3/0.001/205] 1. Kg1 Bxf2+ 2. Kxf2
PV: [-1.850/3/0.001/302] 1. Qd2 Bxf2 2. Qxf2
PV: [-0.433/1/0.001/345] 1. Rd2
PV: [-0.353/1/0.001/351] 1. Rf1
SI: Iteration 0: end
SI: Iteration 1: begin
PV: [-0.683/2/0.001/495] 1. Rf1 Ngf6
PV: [+1.584/5/0.002/940] 1. Nc7+ Bxc7 2. Bf7+ Qxf7 3. Rxf7
SI: Iteration 1: end
SI: Iteration 2: begin
PV: [+1.584/5/0.003/1,507] 1. Nc7+ Bxc7 2. Bf7+ Qxf7 3. Rxf7
PV: [+2.789/9/0.005/3,288] 1. Nxg7+ Qxg7 2. Bf7+ Qxf7 3. Rxf7 Kxf7 4. Qxd7+ Kg6 5. Qxb7
SI: Iteration 2: end
SI: Iteration 3: begin
PV: [+2.789/9/0.013/10,629] 1. Nxg7+ Qxg7 2. Bf7+ Qxf7 3. Rxf7 Kxf7 4. Qxd7+ Kg6 5. Qxb7
PV: [MateIn5/9/0.040/32,723] 1. Qxd7+ Kxd7 2. Rd1+ Kc8 3. Rf8+ Qe8 4. Rxe8+ Bd8 5. Rdxd8#
SI: Iteration 3: end
[MateIn5/9/0.040/32,723] 1. Qxd7+ Kxd7 2. Rd1+ Kc8 3. Rf8+ Qe8 4. Rxe8+ Bd8 5. Rdxd8#
Four iterations and forty milliseconds for the above. But it doesn't by itself prove that no faster mate exists.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: The mate-in-5 problems from BWTC

Post by sje »

The log file gives millisecond resolution for the above:

Code: Select all

2015-08-06 10&#58;06&#58;32.229 < tabs 1
2015-08-06 10&#58;06&#58;32.230 > SI&#58; Iteration 0&#58; begin
2015-08-06 10&#58;06&#58;32.230 > PV&#58; &#91;-4.100/3/0.000/17&#93; 1. Ba6 Bxf2 2. Bxb7
2015-08-06 10&#58;06&#58;32.230 > PV&#58; &#91;-3.996/2/0.000/93&#93; 1. Be3 Bxe3
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;-1.980/3/0.000/188&#93; 1. Bh4 Bxf2 2. Bxf2
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;-1.950/3/0.001/205&#93; 1. Kg1 Bxf2+ 2. Kxf2
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;-1.850/3/0.001/302&#93; 1. Qd2 Bxf2 2. Qxf2
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;-0.433/1/0.001/345&#93; 1. Rd2
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;-0.353/1/0.001/351&#93; 1. Rf1
2015-08-06 10&#58;06&#58;32.262 > SI&#58; Iteration 0&#58; end
2015-08-06 10&#58;06&#58;32.262 > SI&#58; Iteration 1&#58; begin
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;-0.683/2/0.001/495&#93; 1. Rf1 Ngf6
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;+1.584/5/0.002/940&#93; 1. Nc7+ Bxc7 2. Bf7+ Qxf7 3. Rxf7
2015-08-06 10&#58;06&#58;32.262 > SI&#58; Iteration 1&#58; end
2015-08-06 10&#58;06&#58;32.262 > SI&#58; Iteration 2&#58; begin
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;+1.584/5/0.003/1,507&#93; 1. Nc7+ Bxc7 2. Bf7+ Qxf7 3. Rxf7
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;+2.789/9/0.005/3,288&#93; 1. Nxg7+ Qxg7 2. Bf7+ Qxf7 3. Rxf7 Kxf7 4. Qxd7+ Kg6 5. Qxb7
2015-08-06 10&#58;06&#58;32.262 > SI&#58; Iteration 2&#58; end
2015-08-06 10&#58;06&#58;32.262 > SI&#58; Iteration 3&#58; begin
2015-08-06 10&#58;06&#58;32.262 > PV&#58; &#91;+2.789/9/0.013/10,629&#93; 1. Nxg7+ Qxg7 2. Bf7+ Qxf7 3. Rxf7 Kxf7 4. Qxd7+ Kg6 5. Qxb7
2015-08-06 10&#58;06&#58;32.270 > PV&#58; &#91;MateIn5/9/0.040/32,723&#93; 1. Qxd7+ Kxd7 2. Rd1+ Kc8 3. Rf8+ Qe8 4. Rxe8+ Bd8 5. Rdxd8#
2015-08-06 10&#58;06&#58;32.279 > SI&#58; Iteration 3&#58; end
2015-08-06 10&#58;06&#58;32.279 > &#91;MateIn5/9/0.040/32,723&#93; 1. Qxd7+ Kxd7 2. Rd1+ Kc8 3. Rf8+ Qe8 4. Rxe8+ Bd8 5. Rdxd8#
Note that TABS picked a different terminal mating move.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: The mate-in-5 problems from BWTC

Post by Ferdy »

I created a tool to run uci engines and output similar formats.
I sent "go mate n" command where n = 5, for engines that support this command. If not then I use "go movetime n" command instead.
Also added the pt field using psutil python library. Just added the user cpu time and the system cpu time to get the processor time.
When the engine sent bestmove and previous to that it sent info score mate n on one of its info output then I count it as mate found, though the bestmove is not verified. This can be shown in summary as "with mate found". With the result below, I limit the engine to search for only 60s max, by sending stop command (this is settable in the tool). Looking at the pv first move, it actually solved the position, it just could not return a mate score.

There are 3 positions that Deuterium is not able to send mate score because it could not increase its score. So the output position have no md field but it has ss numeric value.

Deuterium output.

Code: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/4p1PK/8 b - - 0 1 md 5; nc 3184; pd 3; pt 0.015; pv 1...Qg3+ 2.Kxg3 e1=Q+ 3.Kh3 Re3+ 4.Kh2; ss MateIn5; wt 0.021;
5rkb/ppp1q3/3p2BQ/6P1/3n4/2B4P/bPP1r3/2KR2NR b - - 0 1 md 5; nc 319444; pd 13; pt 0.343; pv 1...Qe3+; ss MateIn5; wt 0.358;
6k1/1Q1R1p1p/6p1/2b1pq2/P7/4P3/2r2PPP/5RK1 b - - 0 1 md 5; nc 73434; pd 10; pt 0.093; pv 1...Qxf2+; ss MateIn5; wt 0.098;
rnbkr3/ppp2Bpp/5b2/7q/2Q2p2/5N2/PPPP2PP/R1B2K1R b - - 0 1 md 5; nc 9737; pd 4; pt 0.031; pv 1...Qxf3+ 2.gxf3 Bh3+ 3.Kf2 Bh4+ 4.Kg1 Re1+ 5.Qf1; ss MateIn5; wt 0.038;
N1bk3r/p5pp/3b1p2/3B4/3nP1nq/3P3N/PPP3KP/R1B1Q2R b - - 0 1 md 5; nc 421977; pd 9; pt 0.468; pv 1...Qxh3+ 2.Kxh3 Ne3+ 3.Be6 Bxe6+ 4.Kh4 Nf3+ 5.Kh5 Bg4#; ss MateIn5; wt 0.483;
6k1/1bp2ppp/p2p1b2/7R/Q1P5/P3q3/1r3NPP/5RK1 b - - 0 1 md 5; nc 23163; pd 10; pt 0.046; pv 1...Qxf2+; ss MateIn5; wt 0.076;
1r1r2k1/p4ppp/1qp5/4Pb2/3b1P2/1PP2N2/P2BQ1PP/2KR3R b - - 0 1 md 5; nc 1281963; pd 12; pt 01.248; pv 1...Qxb3 2.axb3 Rxb3 3.Qd3 Bxd3 4.Be3 Bxe3+ 5.Nd2 Rb1#; ss MateIn5; wt 01.257;
1k6/p2q2pp/1p3p2/2pn4/3P2PP/Q1P2PK1/P3r3/6RR b - - 0 1 md 5; nc 313990; pd 8; pt 0.280; pv 1...Qc7+ 2.Kh3 Nf4+ 3.Kg3 Nh5+ 4.Kh3 Qg3+ 5.Rxg3 Nf4#; ss MateIn5; wt 0.293;
r3rbk1/5b2/2R3p1/1p1p2Np/3B2n1/1P1P2P1/4PPB1/6K1 w - - 0 1 md 5; nc 10838; pd 5; pt 0.031; pv 1.Rxg6+ Bg7 2.Rxg7+ Kf8 3.Rxf7+ Kg8 4.Rg7+ Kf8 5.Nh7#; ss MateIn5; wt 0.048;
7k/pppR3p/5p1N/8/5n1N/7P/P4bPK/4r3 w - - 0 1 md 5; nc 4624; pd 4; pt 0.015; pv 1.Rd8+ Re8 2.Rxe8+ Kg7 3.N4f5+ Kg6 4.Rg8+ Kh5; ss MateIn5; wt 0.034;
3r2k1/pB3ppp/1pr5/4n3/4n3/1RP1P3/P4PPP/2B2RK1 b - - 0 1 md 5; nc 12752; pd 8; pt 0.031; pv 1...Nf3+; ss MateIn5; wt 0.037;
5r1N/ppp1k1pp/8/3Pp3/1PBnn2P/2N1K2b/PP1P3P/R1B4R b - - 0 1 pd 20; nc 60886016; pt 01&#58;00.731; pv 1...Rf3+; ss +1.300; wt 01&#58;00.742;
4r2k/1p4p1/1pb5/8/3P1n2/2P2rN1/PP5P/R1B2RK1 b - - 0 1 md 5; nc 94092; pd 9; pt 0.109; pv 1...Rf2 2.Bxf4 Rg2+ 3.Kh1 Rxg3+ 4.d5 Bxd5+ 5.Rf3 Bxf3#; ss MateIn5; wt 0.119;
7k/1R3p1p/P2Pp3/4n3/8/8/r5BP/2r2N1K b - - 0 1 md 5; nc 10257013; pd 16; pt 07.815; pv 1...Nf3 2.Rb8+ Kg7 3.Rg8+ Kxg8 4.a7 Rxf1+ 5.Bxf1 Rxh2#; ss MateIn5; wt 07.834;
2kr4/ppp2p1p/2np1p2/2b1p2b/4PP1P/1B1P4/PPP3KP/RN3R2 b - - 0 1 md 5; nc 9158; pd 4; pt 0.031; pv 1...Rg8+ 2.Kh3 Bg4+ 3.Kg2 Be2+ 4.Kh1 Bf3+ 5.Rxf3; ss MateIn5; wt 0.047;
5k2/pbp2r2/1p5p/4R1pP/1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q - 0 1 md 5; nc 126883; pd 8; pt 0.156; pv 1.Rd8+ Bxd8 2.Rxd8+ Kxd8 3.Qxf8+ Kd7 4.Qxf7+ Kd8 5.Bg5#; ss MateIn5; wt 0.166;
r2k4/ppp1n1r1/1b2RN1q/8/2pp2P1/5Q2/PPP2P1P/R5K1 w - - 0 1 md 5; nc 753661; pd 10; pt 0.811; pv 1.Qd5+ Kc8 2.Qd7+ Kb8 3.Qd8+ Nc8 4.Qxc8+ Kxc8 5.Re8#; ss MateIn5; wt 0.819;
2r2b1r/p1Nk2pp/3p1p2/N2Qn3/4P3/q6P/P4PP1/1R3K1R w - - 0 1 md 5; nc 83191; pd 10; pt 0.093; pv 1.Qe6+; ss MateIn5; wt 0.108;
r4rk1/p1p4p/1p1pp3/2P2p1q/2PPn1p1/1Q1BPbP1/PBR2P1P/4R1K1 b - - 0 1 pd 21; nc 54060032; pt 01&#58;00.809; pv 1...Rf6; ss +5.160; wt 01&#58;00.814;
6k1/1p5p/2P1p3/pP1pN2q/P2Qpr2/7b/5R1P/6K1 b - - 0 1 md 5; nc 12162; pd 5; pt 0.031; pv 1...Qe2 2.Nf3 Rg4+ 3.Kh1 Bg2+ 4.Kg1 Bxf3+ 5.Rg2; ss MateIn5; wt 0.048;
8/p4pkp/P1p3p1/2p5/2n1P1q1/2PKp1P1/2P5/1Q2B3 b - - 0 1 md 5; nc 104894; pd 12; pt 0.109; pv 1...Ne5+; ss MateIn5; wt 0.116;
rnb1k2r/pppp1ppp/8/3Pp3/2P1n2q/5KPP/PP2P3/RNBQ1BNR b kq - 0 1 md 5; nc 9311; pd 6; pt 0.031; pv 1...Qxg3+; ss MateIn5; wt 0.034;
rr4k1/6pp/2Q5/3KN3/8/q7/8/8 w - - 0 1 md 5; nc 1401; pd 4; pt 0.015; pv 1.Qe6+; ss MateIn5; wt 0.050;
4qr1k/pb3p1r/1p1p4/2pPpNQB/2P1n3/P1P5/5P2/3RK2R w K - 0 1 md 5; nc 244629; pd 10; pt 0.265; p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RR1K1 w kq - 0 1 md 5; nc 72132; pd 11; pt 0.093; pv 1.Qd7+; ss MateIn5; wt 0.098;
3q1rk1/p4pp1/2pb3p/3p4/6Pr/1PNQ4/P1PB1PP1/4RRK1 b - - 0 1 md 5; nc 4420; pd 10; pt 0.015; pv 1...Bh2+; ss MateIn5; wt 0.065;
r3qr2/ppp1ppkP/3p1nb1/6Q1/3P3N/8/PPP1PPP1/R3KB1R w KQ - 0 1 md 5; nc 31712; pd 6; pt 0.062; pv 1.h8=Q+ Rxh8 2.Nf5+ Kg8 3.Rxh8+ Kxh8 4.Qh6+ Kg8 5.Qg7#; ss MateIn5; wt 0.071;
r3r1k1/p4p1p/5Bp1/2q5/8/8/PP1Q4/KR1R4 w - - 0 1 md 5; nc 1544710; pd 14; pt 01.372; pv 1.Qh6 Qf8 2.Qxh7+ Kxh7 3.Rh1+ Qh6 4.Rxh6+ Kxh6 5.Rh1#; ss MateIn5; wt 01.381;
2kr2r1/pp1n1p2/2p1p1bp/8/2PP1N2/8/PP3P1P/R2BQRK1 b - - 0 1 md 5; nc 85732; pd 8; pt 0.093; pv 1...Be4+ 2.Ng2 Rxg2+ 3.Kh1 Rg1+ 4.Kxg1 Rg8+ 5.Bg4 Rxg4#; ss MateIn5; wt 0.111;
Output summary.

Code: Select all

cpu name                    &#58; Intel&#40;R&#41; Core&#40;TM&#41; i7-2600K CPU @ 3.40GHz
physical cores              &#58; 4
logical cores               &#58; 8
total memory                &#58; 12 GB
available memory            &#58; 9 GB

engine                      &#58; Deuterium v2015.1.35.236
hash                        &#58; 128 MB
threads                     &#58; 1
cpu affinity                &#58; &#91;0, 1, 2, 3, 4, 5, 6, 7&#93;

test set filename           &#58; DM5_BWTC.fen
test set total positions    &#58; 83
maximum allowable time      &#58; 60.0s/pos
mating distance &#40;md&#41;        &#58; 5

total wall time &#40;wt&#41;        &#58; 000d&#58;00h&#58;04m&#58;34s.751ms
total processor time &#40;pt&#41;   &#58; 000d&#58;00h&#58;04m&#58;33s.625ms
total pos                   &#58; 83
average pt                  &#58; 000d&#58;00h&#58;00m&#58;03s.296ms

total pt with mate found    &#58; 000d&#58;00h&#58;01m&#58;31s.260ms
total pos with mate found   &#58; 80 &#40;96.4%)
average pt with mate found  &#58; 000d&#58;00h&#58;00m&#58;01s.140ms

total ply draft &#40;pd&#41;        &#58; 744
average pd                  &#58; 9
Sample from SF6.

Code: Select all

r3k1nr/pp1n2pp/1bp1N1q1/6B1/2B1p3/8/PPP2RPP/R2Q3K w kq - 0 1 md 5; nc 23042; pd 11; pt 0.046; pv 1.Qxd7+ Kxd7 2.Rd1+ Kc8 3.Rf8+ Qe8 4.Rxe8+ Bd8 5.Rdxd8#; ss MateIn5; wt 0.082;
2rr3k/1b2bppP/p2p1n2/R7/3P4/1qB2P2/1P4Q1/1K5R w - - 0 1 md 5; nc 467; pd 4; pt 0.015; pv 1.Qxg7+ Kxg7 2.h8=Q+ Rxh8; ss MateIn5; wt 0.026;
6k1/6n1/1p3Rp1/4qp2/3pN1PQ/P2P3P/1Pr1r3/5RK1 w - - 0 1 md 5; nc 27915; pd 9; pt 0.046; pv 1.Qh8+ Kxh8 2.Rf8+ Kh7 3.Ng5+ Kh6 4.Nf7+ Kh7 5.Rh8#; ss MateIn5; wt 0.058;
5nk1/1b3ppp/r7/p3q3/1pp3P1/4pP1R/PPQ4P/1B1R2K1 w - - 0 1 md 5; nc 4149; pd 7; pt 0.015; pv 1.Qxh7+ Nxh7 2.Rd8+ Qe8 3.Rxe8+ Nf8 4.Bh7+ Kh8 5.Rxf8#; ss MateIn5; wt 0.038;
r1bqrk2/pp1n1n1p/3p1p2/P1pP1P1Q/2PpP1NP/6R1/2PB4/4RBK1 w - - 0 1 md 5; nc 1728; pd 7; pt 0.015; pv 1.Qxf7+ Kxf7 2.Nh6+ Kf8 3.Rg8+ Ke7 4.Rg7+ Kf8 5.Rf7#; ss MateIn5; wt 0.032;
3r2k1/p4rPp/1b1q3Q/n1p1pP2/1p6/3B1NR1/P4P1P/6RK w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5 4.c4+ Ke4 5.Re1#; ss MateIn5; wt 0.061;
2k2b2/p1p1p3/P1Pp1N2/7p/2Q5/5pPq/4pP2/1R3nK1 w - - 0 1 md 5; nc 7084; pd 9; pt 0.015; pv 1.Qe6+ Qxe6 2.Nd7 Qxd7 3.Rb8+ Kxb8 4.cxd7 e1=Q 5.d8=Q#; ss MateIn5; wt 0.059;

&#91;...&#93;

SF6 summary.

Code: Select all

cpu name                    &#58; Intel&#40;R&#41; Core&#40;TM&#41; i7-2600K CPU @ 3.40GHz
physical cores              &#58; 4
logical cores               &#58; 8
total memory                &#58; 12 GB
available memory            &#58; 9 GB

engine                      &#58; Stockfish 6 64 POPCNT
hash                        &#58; 128 MB
threads                     &#58; 1
cpu affinity                &#58; &#91;0, 1, 2, 3, 4, 5, 6, 7&#93;

test set filename           &#58; DM5_BWTC.fen
test set total positions    &#58; 83
maximum allowable time      &#58; 60.0s/pos
mating distance &#40;md&#41;        &#58; 5

total wall time &#40;wt&#41;        &#58; 000d&#58;00h&#58;00m&#58;10s.988ms
total processor time &#40;pt&#41;   &#58; 000d&#58;00h&#58;00m&#58;09s.079ms
total pos                   &#58; 83
average pt                  &#58; 000d&#58;00h&#58;00m&#58;00s.109ms

total pt with mate found    &#58; 000d&#58;00h&#58;00m&#58;09s.079ms
total pos with mate found   &#58; 83 &#40;100.0%)
average pt with mate found  &#58; 000d&#58;00h&#58;00m&#58;00s.109ms

total ply draft &#40;pd&#41;        &#58; 735
average pd                  &#58; 9
Tool to be uploaded later after some further improvement.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

EPD variation display

Post by sje »

The tool output looks interesting. I would note however that move numbering is not used with EPD variation display. So, for an EPD pv field use

Code: Select all

pv e4 e5 Nf3;
instead of

Code: Select all

pv 1. e4 e5 2. Nf3;
I need to finish the update of the EPD specification.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: EPD variation display

Post by Ferdy »

sje wrote:The tool output looks interesting. I would note however that move numbering is not used with EPD variation display. So, for an EPD pv field use

Code: Select all

pv e4 e5 Nf3;
instead of

Code: Select all

pv 1. e4 e5 2. Nf3;
I need to finish the update of the EPD specification.
Right I will revise it.
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:The tool output looks interesting. I would note however that move numbering is not used with EPD variation display. So, for an EPD pv field use

Code: Select all

pv e4 e5 Nf3;
instead of

Code: Select all

pv 1. e4 e5 2. Nf3;
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).
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

And also for the ev (execute variation) field

Post by sje »

The revised EPD specification also has the ev field to show an execute variation move sequence, and this doesn't use move numbering either. The EPD ev field makes for better inter-conversion with UCI position directives. Its semantics are simple. The position indicated by an EPD record is given by the record's FEN (first six tokens, always present) and modified by an ev field (if present).-

In all cases, EPD implied move numbering begins using the FEN half move counter and full move number.

----

Some tangentially related code from Symbolic's Position class:

Code: Select all

EPDPtr Position&#58;&#58;NewEPDFromAnalysis&#40;const Analysis& analysis&#41; const
&#123;
  EPDPtr epdptr = new EPD&#40;*this&#41;;

  if &#40;IsSvMating&#40;analysis.GetPsv&#40;)))
    epdptr->AppendNewCmd&#40;FullMoveMatingDistance&#40;analysis.GetPsv&#40;)));
  epdptr->AppendNewCnc&#40;analysis.GetNodeCount&#40;));
  epdptr->AppendNewCpd&#40;analysis.GetDraft&#40;));
  epdptr->AppendNewCpt&#40;analysis.RefTPTotal&#40;).GetProcUsec&#40;));
  epdptr->AppendNewCpv&#40;analysis.RefPV&#40;));
  epdptr->AppendNewCss&#40;analysis.GetPsv&#40;));
  epdptr->AppendNewCwt&#40;analysis.RefTPTotal&#40;).GetWallUsec&#40;));
  return epdptr;
&#125;

EPDPtr Position&#58;&#58;NewEPDFromPerft&#40;const ui draft, const NodeCount nodecount&#41; const
&#123;
  EPDPtr epdptr = new EPD&#40;*this&#41;;

  epdptr->AppendNewCnc&#40;nodecount&#41;;
  epdptr->AppendNewCpd&#40;draft&#41;;
  return epdptr;
&#125;
And some samples from the EPD class:

Code: Select all

void EPD&#58;&#58;AppendNewCpt&#40;const Usec usec&#41;
&#123;
  EPDFieldNodePtr fnptr = new EPDFieldNode&#40;EoCpt&#41;;
  EPDValueNodePtr vnptr = new EPDValueNode&#40;);

  vnptr->SEVusec&#40;usec&#41;;
  fnptr->AppendValue&#40;vnptr&#41;;
  AppendField&#40;fnptr&#41;;
&#125;

void EPD&#58;&#58;AppendNewCpv&#40;const MoveList& movelist&#41;
&#123;
  EPDFieldNodePtr fnptr = new EPDFieldNode&#40;EoCpv&#41;;
  MoveNodePtr mnptr = movelist.GetHead&#40;);

  while &#40;mnptr&#41;
  &#123;
    EPDValueNodePtr vnptr = new EPDValueNode&#40;);

    vnptr->SEVmove&#40;*mnptr&#41;;
    fnptr->AppendValue&#40;vnptr&#41;;
    mnptr = mnptr->GetNext&#40;);
  &#125;;
  AppendField&#40;fnptr&#41;;
&#125;
Various encoding routines:

Code: Select all

std&#58;&#58;string EPDValue&#58;&#58;Encode&#40;void&#41; const
&#123;
  std&#58;&#58;ostringstream oss;

  switch &#40;eob&#41;
  &#123;
    case EoBmove&#58;
      oss << vVmove.Encode&#40;);
      break;

    case EoBstring&#58;
      oss << "\"" << vVstring << "\"";
      break;

    case EoBsv&#58;
      oss << Score&#58;&#58;EncodeSv&#40;vVsv&#41;;
      break;

    case EoBui64&#58;
      oss << EncodeUi64&#40;vVui64&#41;;
      break;

    case EoBusec&#58;
      oss << UsecMark&#40;vVusec&#41;.EncodeMarkLZSUsec&#40;);
      break;

    default&#58;
      SwitchFault&#40;"EPDValue&#58;&#58;Encode");
      break;
  &#125;;
  return oss.str&#40;);
&#125;

std&#58;&#58;string EPDField&#58;&#58;Encode&#40;void&#41; const
&#123;
  std&#58;&#58;ostringstream oss;
  EPDValueNodePtr vnptr = valuelist.GetHead&#40;);

  oss << EPD&#58;&#58;OpcodeNames&#91;eoc&#93;;
  while &#40;vnptr&#41;
  &#123;
    oss << " " << vnptr->Encode&#40;);
    vnptr = vnptr->GetNext&#40;);
  &#125;;
  oss << ";";
  return oss.str&#40;);
&#125;

std&#58;&#58;string EPD&#58;&#58;Encode&#40;void&#41; const
&#123;
  std&#58;&#58;ostringstream oss;
  EPDFieldNodePtr fnptr = fieldlist.GetHead&#40;);

  oss << position.Encode&#40;);
  while &#40;fnptr&#41;
  &#123;
    oss << " " << fnptr->Encode&#40;);
    fnptr = fnptr->GetNext&#40;);
  &#125;;
  return oss.str&#40;);
&#125;
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: EPD variation display

Post by sje »

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.