robertnurnberg / matetools

Python scripts to manipulate and provide mating PVs for Chest-like EPD files.
GNU General Public License v3.0
3 stars 1 forks source link

add diffmates.py #66

Closed robertnurnberg closed 4 months ago

robertnurnberg commented 4 months ago

Sample usage:

> python diffmates.py ChestUCI_23102018.epd matetrack.epd
> 4k3/b7/1p1p4/pPpPp1p1/P1P1PpPp/5P1P/2QQ4/K7 w - - bm #10; 00:27; 00:03 @ C2/R0/K7/P4/X7;
<
---
> Nb1QN3/1pp1PPp1/1rnn1p1P/1Pkr2B1/P1pRpK1p/2P1P2B/2qb2Pp/4R3 b - - bm #11; Duals(2); 00:00 @ C3/R0/K5/P3/X6;
<
---
> 1r2brk1/pp3p1p/3p1Q2/2pBp3/P2nP3/2NP2P1/1qP2R1P/5RK1 w - - bm #11; SFMF9;
< 1r2brk1/pp3p1p/3p1Q2/2pBp3/P2nP3/2NP2P1/1qP2R1P/5RK1 w - - bm #10;
---
> k7/2Kp3p/4p3/1p3b2/5R2/2p3p1/8/8 w - b6 bm #12; 00:27; 00:00 @ C0/R-2/K3/P0/X17;
<
---
> Nb1QN3/1pp1PPp1/1rnn1p1P/1Pkr2B1/P1pRpK1p/2P1P2B/2qb2Pp/4R3 w - - bm #12; 00:00 @ C3/R0/K4/P2/X3;
<
---
> 3K1R2/6p1/6Pb/3p1Pkr/3Pp2p/4P2B/5P2/8 w - - bm #15; 00:00 @ C2/R0/K2/P1/X1;
< 3K1R2/6p1/6Pb/3p1Pkr/3Pp2p/4P2B/5P2/8 w - - bm #14;
---
> 8/B7/p2p3p/rk1P3K/bp2R2P/1p1p4/1P1P2B1/8 w - - bm #15; 00:00 @ C2/R-3/K2/P1/X1;
< 8/B7/p2p3p/rk1P3K/bp2R2P/1p1p4/1P1P2B1/8 w - - bm #14;
---
> 8/8/2B4p/3RPp1K/5PrP/1p1pB2p/bp1Pp2p/qrn1Rn1k w - - bm #15; SFMF9;
< 8/8/2B4p/3RPp1K/5PrP/1p1pB2p/bp1Pp2p/qrn1Rn1k w - - bm #14;
---
> 8/5R2/2p1p3/2Pbp2N/2p1p3/2P1p1p1/4P1p1/4K1k1 w - - bm #16; 00:00 @ C2/R0/K4/P1/X3;
< 8/5R2/2p1p3/2Pbp2N/2p1p3/2P1p1p1/4P1p1/4K1k1 w - - bm #15;
---
> 2b5/1p1p2p1/1PpP4/b1NkB3/3P2K1/1P6/6P1/1N6 w - - bm #16; 00:11+ @ C0/R0/K1/P2/X9;
< 2b5/1p1p2p1/1PpP4/b1NkB3/3P2K1/1P6/6P1/1N6 w - - bm #15;
---
> 1Brb1B2/Pbn1r3/2pkP3/2p2P2/2Pb1P2/1P1KpP2/1p2P3/4R3 w - - bm #16; --:-- @ C0/R0/K2/P4/X14;
<
---
> r2q1bk1/pbp5/1p6/3pP2Q/3P4/4B3/PPP4P/R6K w - - bm #16;
< r2q1bk1/pbp5/1p6/3pP2Q/3P4/4B3/PPP4P/R6K w - - bm #15;
---
> 8/p1p3p1/2P1Q1p1/8/6rp/p3p2k/P3P1p1/6K1 w - - bm #16; SFMF9;
< 8/p1p3p1/2P1Q1p1/8/6rp/p3p2k/P3P1p1/6K1 w - - bm #14;
---
> 3K4/6pR/6Pb/3p1Pkr/3Pp2p/4P2B/5P2/8 w - - bm #17; 00:00 @ C2/R0/K2/P1/X1;
< 3K4/6pR/6Pb/3p1Pkr/3Pp2p/4P2B/5P2/8 w - - bm #15;
---
> 8/1p4p1/6P1/P3kN1P/2B1N1P1/pPp2Kp1/1p1b4/rn6 w - - bm #17;
< 8/1p4p1/6P1/P3kN1P/2B1N1P1/pPp2Kp1/1p1b4/rn6 w - - bm #16;
---
> Bk6/1P2p1pp/RP1p3p/P7/2P5/4p3/4p1p1/4Kbrb w - - bm #19; 00:00+;
<
---
> 8/1p2p3/1P2P3/4p2R/8/4pppK/3prqp1/B2Rbbkn w - - bm #19; Duals(4); 00:06 @ C2/R0/K2/P1/X1;
< 8/1p2p3/1P2P3/4p2R/8/4pppK/3prqp1/B2Rbbkn w - - bm #18;
---
> 8/2p5/7p/2pR3r/8/6R1/2P4r/4K2k w - - bm #19;
< 8/2p5/7p/2pR3r/8/6R1/2P4r/4K2k w - - bm #21; c0 "was bm #19";
---
> 8/8/3p4/N2p4/1k6/p2K4/8/1B6 w - - bm #20;
< 8/8/3p4/N2p4/1k6/p2K4/8/1B6 w - - bm #29; c0 "was bm #20";
---
> qrr1b3/pn2p3/npppp1P1/4pP2/2P2BPp/PPN1P2B/4R2K/2k5 w - - bm #20;
<
---
> 8/N6p/b7/8/2p4p/p1P2Q2/Pp1PP1rp/1Rb1K2k w - - bm #21; 00:26 @ C0/R0/K2/P4/X7;
< 8/N6p/b7/8/2p4p/p1P2Q2/Pp1PP1rp/1Rb1K2k w - - bm #16;
---
> 7n/1p1K1p1N/bp3p1p/1p2prbr/1P2Rn1p/B6P/1PB2PP1/k7 w - - bm #21; --:-- @ C2/R0/K4/P5/X10;
< 7n/1p1K1p1N/bp3p1p/1p2prbr/1P2Rn1p/B6P/1PB2PP1/k7 w - - bm #20;
---
> 7Q/6p1/8/8/1p6/3P3P/2P3pp/4K2k w - - bm #23;
< 7Q/6p1/8/8/1p6/3P3P/2P3pp/4K2k w - - bm #24; c0 "was bm #23";
---
> 8/p4p2/5p1p/p2N1P1P/p2P1P2/kp5P/1r6/bBB1K3 w - - bm #23; SFMF9;
< 8/p4p2/5p1p/p2N1P1P/p2P1P2/kp5P/1r6/bBB1K3 w - - bm #19;
---
> 1R1B4/p6p/rb5P/pk1K2p1/b5p1/1p2p1p1/1P2P1P1/8 w - - bm #23; SFMF9;
< 1R1B4/p6p/rb5P/pk1K2p1/b5p1/1p2p1p1/1P2P1P1/8 w - - bm #21;
---
> 7k/b1p1N1pr/2P3p1/2p3Pb/1pP1B1p1/1P3pP1/3P1P1n/4K3 w - - bm #24; SFMF9;
< 7k/b1p1N1pr/2P3p1/2p3Pb/1pP1B1p1/1P3pP1/3P1P1n/4K3 w - - bm #21;
---
> 2r5/1p6/1Nk1p1pn/QpPp1p1r/6p1/nN3b1q/3R4/2BR2K1 w - - bm #26; 00:53 @ C3/R0/K6/P2/X5;
< 2r5/1p6/1Nk1p1pn/QpPp1p1r/6p1/nN3b1q/3R4/2BR2K1 w - - bm #25;
---
> 8/p1p3p1/p5Pp/8/p1p5/6r1/1QP2p1k/N4Kb1 w - - bm #26; SFMF9;
< 8/p1p3p1/p5Pp/8/p1p5/6r1/1QP2p1k/N4Kb1 w - - bm #24;
---
> 8/7B/8/p7/P7/Kp6/bpr2P2/qkbRR3 w - - bm #27;
< 8/7B/8/p7/P7/Kp6/bpr2P2/qkbRR3 w - - bm #21;
---
> 5brq/p1p1pPkb/PpP1P1p1/1P1PK1p1/2pP2p1/2P3N1/8/7R w - - bm #32; 00:03 @ C0/R0/K2/P3/X3;
< 5brq/p1p1pPkb/PpP1P1p1/1P1PK1p1/2pP2p1/2P3N1/8/7R w - - bm #26;
---
> 1k4b1/3r3p/1K6/8/6p1/8/8/1Q6 w - - bm #32;
<
---
> R1n4k/n1p5/pb1p1N1P/3P3p/7p/p1p1P3/P1P1PP1P/7K w - - bm #34;
< R1n4k/n1p5/pb1p1N1P/3P3p/7p/p1p1P3/P1P1PP1P/7K w - - bm #23;
---
> 8/1rp3p1/1p4N1/1P1P4/P1K3P1/1pBP1B2/pPp5/1bk5 w - - bm #36;
< 8/1rp3p1/1p4N1/1P1P4/P1K3P1/1pBP1B2/pPp5/1bk5 w - - bm #27;
---
> 8/8/8/1p6/6k1/1p2Q3/p1p1p3/rbrbK3 w - - bm #39; SFMF9;
< 8/8/8/1p6/6k1/1p2Q3/p1p1p3/rbrbK3 w - - bm #36;
---
> 1rb5/Np1p1p1B/1PpP1P2/3p2p1/8/1rP1PpPk/7P/6BK w - - bm #40;
< 1rb5/Np1p1p1B/1PpP1P2/3p2p1/8/1rP1PpPk/7P/6BK w - - bm #32;
---
> 7K/1P1p1kpP/n1pPp3/1pP1Pp2/5Pp1/1P4P1/8/6N1 w - - bm #44; SFMF9;
< 7K/1P1p1kpP/n1pPp3/1pP1Pp2/5Pp1/1P4P1/8/6N1 w - - bm #43;
---
> 2b4b/Pr1p3P/qP1p2Q1/1R1n4/8/n6r/7P/k6K w - - bm #47;
< 2b4b/Pr1p3P/qP1p2Q1/1R1n4/8/n6r/7P/k6K w - - bm #45;
---
> 7K/8/5Q2/8/6B1/3P3p/p5p1/6kq w - - bm #51;
< 7K/8/5Q2/8/6B1/3P3p/p5p1/6kq w - - bm #40;
---
> qnb5/rp1p4/pPpP4/P1P5/2P5/6K1/8/6Nk w - - bm #51;
< qnb5/rp1p4/pPpP4/P1P5/2P5/6K1/8/6Nk w - - bm #49;
---
> R7/pbk3p1/q1r3P1/brp5/1pP1Q3/1Pp1p3/K1P1P3/1B6 w - - bm #52; 00:00 @ C2/R0/K2/P1/X1;
<
---
> 5Q2/p1p5/p1p5/6rp/7k/6p1/p1p3P1/rbK5 w - - bm #62; 00:00+ @ C2/R0/K2/P5/X7;
< 5Q2/p1p5/p1p5/6rp/7k/6p1/p1p3P1/rbK5 w - - bm #60;
---
> 4n3/2p3p1/1pP1p1P1/1P1bP3/2p1p1N1/1pPkPp2/1P3P2/3NK3 w - - bm #65;
<
---
> 4n3/2p3p1/1pP1p1n1/1P1bP2P/1pp1p1N1/2PkPp2/1P3P2/3NK3 w - - bm #66;
<
---
> 5Q2/2p1ppr1/2Pbpk2/2p1n1p1/2P1P1P1/2B1p2p/4P3/5K2 w - - bm #70; 00:00 @ C4/R0/K2/P2/X5;
<
---
> 6k1/p1p2pP1/5PpK/5p2/1p2pP2/1P1pP2N/1P1P2P1/5BBq w - - bm #104;
<
---
> Q1b4q/2Pp2p1/3P1k1b/6pP/3p1pPp/3P1pBK/5P2/8 w - - bm #125;
< Q1b4q/2Pp2p1/3P1k1b/6pP/3p1pPp/3P1pBK/5P2/8 w - - bm #55;
---
>
< k7/2Kp3p/4p3/1p3b2/5R2/2p3p1/8/8 w - - bm #12; 00:27; 00:00 @ C0/R-2/K3/P0/X17;
---

(The final position, which seemingly shows a position in matetrack.epd that is not in ChestUCI_23102018.epd is the one where the superfluous ep flag was removed. See https://github.com/vondele/matetrack/pull/37.)