Million Mate Madness

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

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

Re: Million Mate Madness

Post by Dann Corbit »

JohnS wrote:
JohnS wrote:
Dann Corbit wrote:
JohnS wrote:
Dann Corbit wrote:There are more than one million verified checkmates in this file:
https://www.dropbox.com/s/2gd72g3xrr36n ... at.7z?dl=0

Specifically, there are 1,112,569 checkmates between mate in 1 and mate in 8.

Each checkmate has been verified by Chest319 (so brute force, no shortcuts).

If you like solving chess puzzles or are otherwise deranged, you might enjoy it.

The file contains the positions which are annotated with the solutions.

From time to time, I will add to the collection.
Thanks for the great file.

Would you be able to provide a version ordered in terms of distance to mate, eg all mate in 1 followed by mates in 2...
The records are all tagged with the distance to mate. Records that have "dm 4;" in them are 'direct mate in four' and records that have "dm 1;" in them are direct mate in one.

If you are using windows, from a command prompt you can do things like this:
findstr "dm 1;" ischmat.epd > dm1.epd
which will create a file of every mate in one that is contained in the file.

If you are using some unix/posix sort of environment you can use grep or sed or what have you.
Thanks again Dann. The command works fine.

Now all I have to do is to start with the mate in 1 problems and work my way through the whole file. I should be ready to take on Carlsen when I finish. :D
Spoke too soon. Dann's command doesn't work for me as it gives all the problems. This works for me.

findstr /c:"dm 1;" ischmat.epd > dm1.epd
Quite right. That's what happens when you try it from memory instead of really doing it.
bnst
Posts: 87
Joined: Tue Sep 11, 2007 12:16 pm

Re: Million Mate Madness

Post by bnst »

There are 46 positions with ce -32755 which means that the colour that does not move mates.
Regards Andreas
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Million Mate Madness

Post by Ferdy »

bnst wrote:There are 46 positions with ce -32755 which means that the colour that does not move mates.
Regards Andreas
Number of positions without bm is also 46.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Million Mate Madness

Post by Ferdy »

Dann Corbit wrote:There are more than one million verified checkmates in this file:
Here is a position with items in castling field interchanged.

Code: Select all

r3kn1Q/b5pp/1pN1B1bq/6pp/8/4P1p1/4P3/R3K2R w QKq - acn 3334; acs 0; bm Qg8; ce 32762; dm 3; pv Qg8 h4 Rf1 h3 Rxf8#;
Also this.

Code: Select all

r3k2r/pp1p1p1p/3P4/3K2N1/8/8/8/7Q w qk - acn 49217; acs 0; bm Qa1; ce 32758; dm 5; pv Qa1 Rg8 Qe5+ Kd8 Nxf7+ Kc8 Qc3+ Kb8 Qc7#;
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Million Mate Madness

Post by Dann Corbit »

Ferdy wrote:
Dann Corbit wrote:There are more than one million verified checkmates in this file:
Here is a position with items in castling field interchanged.

Code: Select all

r3kn1Q/b5pp/1pN1B1bq/6pp/8/4P1p1/4P3/R3K2R w QKq - acn 3334; acs 0; bm Qg8; ce 32762; dm 3; pv Qg8 h4 Rf1 h3 Rxf8#;
Also this.

Code: Select all

r3k2r/pp1p1p1p/3P4/3K2N1/8/8/8/7Q w qk - acn 49217; acs 0; bm Qa1; ce 32758; dm 5; pv Qa1 Rg8 Qe5+ Kd8 Nxf7+ Kc8 Qc3+ Kb8 Qc7#;
Thanks for the defect reports. They will help me to clean the database.

Some programs are forgiving of those sorts of gaffes (transposed castling rights, for instance) and others are not.
bnst
Posts: 87
Joined: Tue Sep 11, 2007 12:16 pm

Re: Million Mate Madness

Post by bnst »

I tried to hint that they are the same :)
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Million Mate Madness

Post by Ferdy »

Dann Corbit wrote:
Ferdy wrote:
Dann Corbit wrote:There are more than one million verified checkmates in this file:
Here is a position with items in castling field interchanged.

Code: Select all

r3kn1Q/b5pp/1pN1B1bq/6pp/8/4P1p1/4P3/R3K2R w QKq - acn 3334; acs 0; bm Qg8; ce 32762; dm 3; pv Qg8 h4 Rf1 h3 Rxf8#;
Also this.

Code: Select all

r3k2r/pp1p1p1p/3P4/3K2N1/8/8/8/7Q w qk - acn 49217; acs 0; bm Qa1; ce 32758; dm 5; pv Qa1 Rg8 Qe5+ Kd8 Nxf7+ Kc8 Qc3+ Kb8 Qc7#;
Thanks for the defect reports. They will help me to clean the database.

Some programs are forgiving of those sorts of gaffes (transposed castling rights, for instance) and others are not.
This is all I can find. The first 2 should be in here.

Code: Select all

r3kn1Q/b5pp/1pN1B1bq/6pp/8/4P1p1/4P3/R3K2R w QKq - acn 3334; acs 0; bm Qg8; ce 32762; dm 3; pv Qg8 h4 Rf1 h3 Rxf8#;
r3k2r/pp1p1p1p/3P4/3K2N1/8/8/8/7Q w qk - acn 49217; acs 0; bm Qa1; ce 32758; dm 5; pv Qa1 Rg8 Qe5+ Kd8 Nxf7+ Kc8 Qc3+ Kb8 Qc7#;
r3k2r/p1QN1pp1/b1p1Bp2/np3N1R/8/2b4q/K3p3/8 w qk - acn 477; acs 0; bm Nc5; ce 32764; dm 2; pv Nc5 g6 Qe7#;
r3k2r/Pp1npn1p/P4B2/8/8/1Q6/B7/3R1K2 w qk - acn 80; acs 0; bm Qe6; ce 32764; dm 2; pv Qe6 h6 Qxe7#;
r3k2r/4b2n/2P5/4Q1Nb/3R3K/3B1R2/8/8 w qk - acn 240; acs 0; bm Re3; ce 32764; dm 2; pv Re3 Nf8 Qxe7#;
r3k2r/3pp2p/1P5P/1B3QNn/bB6/8/1K6/8 w qk - acn 307; acs 0; bm Qe4; ce 32764; dm 2; pv Qe4 e6 Qxa8#;
r3k2r/3R3p/8/Qpp2p2/q1B2N2/8/P1n4K/8 w qk - acn 1294; acs 0; bm Nd5; ce 32762; dm 3; pv Nd5 h6 Nf6+ Kf8 Rf7#;
r3k2r/2p5/1b1nn1P1/ppN4p/3p2Q1/3K4/B1RPRNp1/8 w qk - acn 22; acs 0; bm Qxe6+; ce 32764; dm 2; pv Qxe6+ Kf8 Qe7#;
r3k2r/1p1npn2/3P4/4N1B1/2Q5/8/R6R/4K3 w qk - acn 253; acs 0; bm Qe6; ce 32764; dm 2; pv Qe6 b6 Qxe7#;
r3k2r/1R1qpn1p/4QB2/NR2N2K/B7/8/8/3n4 w qk - acn 558; acs 0; bm Rb4; ce 32764; dm 2; pv Rb4 h6 Qxe7#;
r1n1k2r/p1Q1Bn1p/1p6/8/8/8/B7/1K6 w qk - acn 141; acs 0; bm Bf6; ce 32764; dm 2; pv Bf6 h6 Qxf7#;
r1b1kb1r/1p3qpB/4p3/p2p2BQ/2p5/2P2N2/PP3PPP/R4RK1 w qk - acn 46; acs 0; bm Qxf7+; ce 32762; dm 3; pv Qxf7+ Kxf7 Ne5+ Ke8 Bg6#;
q1r1Bn2/1N1pb3/7B/2P5/p3k3/2Q1N3/4P3/R3K2R w QK - acn 331; acs 0; bm O-O; ce 32764; dm 2; pv O-O d6 Rf4#;
n3k3/2p2p2/5B2/7p/2p5/2N5/p7/R3K2R w QK - acn 27780; acs 0; bm O-O-O; ce 32760; dm 4; pv O-O-O a1=Q+ Kc2 Qb1+ Nxb1 h4 Rd8#;
8/q7/Bp1p3n/1b1rP1Qn/4pP1B/2N2k1P/2N2P2/R3K2R w QK - acn 3545; acs 0; bm f5; ce 32762; dm 3; pv f5 Rd1+ Kxd1 Be2+ Bxe2#;
8/6B1/1N6/1p1P1p2/1P4Pp/1PNk1B1P/P6P/R3K2R w QK - acn 3004; acs 0; bm d6; ce 32762; dm 3; pv d6 f4 Be4+ Ke3 Nbd5#;
8/5pQ1/5Nb1/8/5B1p/8/B1N3kP/R3K2R w QK - acn 219; acs 0; bm Bc4; ce 32764; dm 2; pv Bc4 h3 Bd5#;
8/4Q3/1qp1N2b/1p3n2/2B5/2BNk1p1/6P1/R3K2R w QK - acn 361; acs 0; bm O-O-O; ce 32764; dm 2; pv O-O-O Ke4+ Ng5#;
8/2n4b/1N6/3pQ3/pPpPPP2/P3k2P/1P6/R3K2R w QK - acn 3522; acs 0; bm Rg1; ce 32762; dm 3; pv Rg1 Kf3 f5 dxe4 Rg3#;
6n1/3ppBQ1/3N1pP1/P3kP2/8/2P3P1/2P5/R3K2R w QK - acn 4028; acs 0; bm Qf8; ce 32762; dm 3; pv Qf8 e6 O-O-O exf5 Rhe1#;
5B2/1p3p2/1P2pkp1/5p2/1p3P2/2P5/8/R3K2R w QK - acn 2938; acs 0; bm O-O-O; ce 32762; dm 3; pv O-O-O b3 Kb2 g5 Rh6#;
4r1r1/p3b3/n1p1Pp2/6p1/pP1Pp1Bk/2B4P/2P5/R3KN1R w QK - acn 1289; acs 0; bm Ne3; ce 32762; dm 3; pv Ne3 Kg3 O-O f5 Nxf5#;
4q3/4p3/1n1r4/1bp1nB2/5N2/2Q1PkB1/2N2P2/R3K2R w QK - acn 1767; acs 0; bm e4+; ce 32762; dm 3; pv e4+ Nd3+ Kf1 e6 Ne1#;
1br2N2/6p1/b3n2r/Q3pB1p/5p1k/p1B1P2N/6PP/R3K2R w QK - acn 3382; acs 0; bm Qb4; ce 32762; dm 3; pv Qb4 e4 Qxe4 g6 g3#;
1B5k/4N1b1/4P1P1/1p1bQ1P1/7r/6P1/4B2N/R3K2R w QK - acn 212; acs 0; bm O-O-O; ce 32762; dm 3; pv O-O-O Rc4+ Bxc4 b4 Nf3#;
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Million Mate Madness

Post by Dann Corbit »

Ferdy wrote:
Dann Corbit wrote:
Ferdy wrote:
Dann Corbit wrote:There are more than one million verified checkmates in this file:
Here is a position with items in castling field interchanged.

Code: Select all

r3kn1Q/b5pp/1pN1B1bq/6pp/8/4P1p1/4P3/R3K2R w QKq - acn 3334; acs 0; bm Qg8; ce 32762; dm 3; pv Qg8 h4 Rf1 h3 Rxf8#;
Also this.

Code: Select all

r3k2r/pp1p1p1p/3P4/3K2N1/8/8/8/7Q w qk - acn 49217; acs 0; bm Qa1; ce 32758; dm 5; pv Qa1 Rg8 Qe5+ Kd8 Nxf7+ Kc8 Qc3+ Kb8 Qc7#;
Thanks for the defect reports. They will help me to clean the database.

Some programs are forgiving of those sorts of gaffes (transposed castling rights, for instance) and others are not.
This is all I can find. The first 2 should be in here.

Code: Select all

r3kn1Q/b5pp/1pN1B1bq/6pp/8/4P1p1/4P3/R3K2R w QKq - acn 3334; acs 0; bm Qg8; ce 32762; dm 3; pv Qg8 h4 Rf1 h3 Rxf8#;
r3k2r/pp1p1p1p/3P4/3K2N1/8/8/8/7Q w qk - acn 49217; acs 0; bm Qa1; ce 32758; dm 5; pv Qa1 Rg8 Qe5+ Kd8 Nxf7+ Kc8 Qc3+ Kb8 Qc7#;
r3k2r/p1QN1pp1/b1p1Bp2/np3N1R/8/2b4q/K3p3/8 w qk - acn 477; acs 0; bm Nc5; ce 32764; dm 2; pv Nc5 g6 Qe7#;
r3k2r/Pp1npn1p/P4B2/8/8/1Q6/B7/3R1K2 w qk - acn 80; acs 0; bm Qe6; ce 32764; dm 2; pv Qe6 h6 Qxe7#;
r3k2r/4b2n/2P5/4Q1Nb/3R3K/3B1R2/8/8 w qk - acn 240; acs 0; bm Re3; ce 32764; dm 2; pv Re3 Nf8 Qxe7#;
r3k2r/3pp2p/1P5P/1B3QNn/bB6/8/1K6/8 w qk - acn 307; acs 0; bm Qe4; ce 32764; dm 2; pv Qe4 e6 Qxa8#;
r3k2r/3R3p/8/Qpp2p2/q1B2N2/8/P1n4K/8 w qk - acn 1294; acs 0; bm Nd5; ce 32762; dm 3; pv Nd5 h6 Nf6+ Kf8 Rf7#;
r3k2r/2p5/1b1nn1P1/ppN4p/3p2Q1/3K4/B1RPRNp1/8 w qk - acn 22; acs 0; bm Qxe6+; ce 32764; dm 2; pv Qxe6+ Kf8 Qe7#;
r3k2r/1p1npn2/3P4/4N1B1/2Q5/8/R6R/4K3 w qk - acn 253; acs 0; bm Qe6; ce 32764; dm 2; pv Qe6 b6 Qxe7#;
r3k2r/1R1qpn1p/4QB2/NR2N2K/B7/8/8/3n4 w qk - acn 558; acs 0; bm Rb4; ce 32764; dm 2; pv Rb4 h6 Qxe7#;
r1n1k2r/p1Q1Bn1p/1p6/8/8/8/B7/1K6 w qk - acn 141; acs 0; bm Bf6; ce 32764; dm 2; pv Bf6 h6 Qxf7#;
r1b1kb1r/1p3qpB/4p3/p2p2BQ/2p5/2P2N2/PP3PPP/R4RK1 w qk - acn 46; acs 0; bm Qxf7+; ce 32762; dm 3; pv Qxf7+ Kxf7 Ne5+ Ke8 Bg6#;
q1r1Bn2/1N1pb3/7B/2P5/p3k3/2Q1N3/4P3/R3K2R w QK - acn 331; acs 0; bm O-O; ce 32764; dm 2; pv O-O d6 Rf4#;
n3k3/2p2p2/5B2/7p/2p5/2N5/p7/R3K2R w QK - acn 27780; acs 0; bm O-O-O; ce 32760; dm 4; pv O-O-O a1=Q+ Kc2 Qb1+ Nxb1 h4 Rd8#;
8/q7/Bp1p3n/1b1rP1Qn/4pP1B/2N2k1P/2N2P2/R3K2R w QK - acn 3545; acs 0; bm f5; ce 32762; dm 3; pv f5 Rd1+ Kxd1 Be2+ Bxe2#;
8/6B1/1N6/1p1P1p2/1P4Pp/1PNk1B1P/P6P/R3K2R w QK - acn 3004; acs 0; bm d6; ce 32762; dm 3; pv d6 f4 Be4+ Ke3 Nbd5#;
8/5pQ1/5Nb1/8/5B1p/8/B1N3kP/R3K2R w QK - acn 219; acs 0; bm Bc4; ce 32764; dm 2; pv Bc4 h3 Bd5#;
8/4Q3/1qp1N2b/1p3n2/2B5/2BNk1p1/6P1/R3K2R w QK - acn 361; acs 0; bm O-O-O; ce 32764; dm 2; pv O-O-O Ke4+ Ng5#;
8/2n4b/1N6/3pQ3/pPpPPP2/P3k2P/1P6/R3K2R w QK - acn 3522; acs 0; bm Rg1; ce 32762; dm 3; pv Rg1 Kf3 f5 dxe4 Rg3#;
6n1/3ppBQ1/3N1pP1/P3kP2/8/2P3P1/2P5/R3K2R w QK - acn 4028; acs 0; bm Qf8; ce 32762; dm 3; pv Qf8 e6 O-O-O exf5 Rhe1#;
5B2/1p3p2/1P2pkp1/5p2/1p3P2/2P5/8/R3K2R w QK - acn 2938; acs 0; bm O-O-O; ce 32762; dm 3; pv O-O-O b3 Kb2 g5 Rh6#;
4r1r1/p3b3/n1p1Pp2/6p1/pP1Pp1Bk/2B4P/2P5/R3KN1R w QK - acn 1289; acs 0; bm Ne3; ce 32762; dm 3; pv Ne3 Kg3 O-O f5 Nxf5#;
4q3/4p3/1n1r4/1bp1nB2/5N2/2Q1PkB1/2N2P2/R3K2R w QK - acn 1767; acs 0; bm e4+; ce 32762; dm 3; pv e4+ Nd3+ Kf1 e6 Ne1#;
1br2N2/6p1/b3n2r/Q3pB1p/5p1k/p1B1P2N/6PP/R3K2R w QK - acn 3382; acs 0; bm Qb4; ce 32762; dm 3; pv Qb4 e4 Qxe4 g6 g3#;
1B5k/4N1b1/4P1P1/1p1bQ1P1/7r/6P1/4B2N/R3K2R w QK - acn 212; acs 0; bm O-O-O; ce 32762; dm 3; pv O-O-O Rc4+ Bxc4 b4 Nf3#;
Probably, a lot of them are my fault if they are records I have entered by hand. I am dyslexic and it leads to right/left confusion at times.
It happens when I spell things too. I might spell 'blue' as 'bule' or 'the' as 'hte'. Normally a spell checker catches my typing permutations.

If I goof up a checkmate in the piece placement area of the EPD record and it is no longer a mate, then the engine will not solve it. And if it is a mate, then I invented a new (unintended) one.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Million Mate Madness

Post by Ferdy »

I extracted positions with single bm only. Then try to convert the SAN of bm to LAN using python-chess library (PCL) which after some tries have successfully installed only yesterday.

The slight anomally in castling field was because when I run my script the PCL will not process the fen with that kind of castling field. So I create a script to look all those castling field before using the PCL.

Now before I convert the SAN in bm to LAN, I try to check all positions if the moves in bm are legal moves using PCL. The script has halted again because the PCL has found a double digit in the epd, see /16N/

Code: Select all

4r1k1/b1R2ppp/pq6/1p2Q3/1P2n3/16N/1B4BP/7K b - - acn 45; acs 0; bm Qg1+; ce 32764; dm 2; pv Qg1+ Nxg1 Nf2#;
I am only checking the bm legality for all positions with 1 bm that I had extracted.
But the positions that I reported with unnatural castling fields are based on original epd.
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Million Mate Madness

Post by Dann Corbit »

Ferdy wrote:I extracted positions with single bm only. Then try to convert the SAN of bm to LAN using python-chess library (PCL) which after some tries have successfully installed only yesterday.

The slight anomally in castling field was because when I run my script the PCL will not process the fen with that kind of castling field. So I create a script to look all those castling field before using the PCL.

Now before I convert the SAN in bm to LAN, I try to check all positions if the moves in bm are legal moves using PCL. The script has halted again because the PCL has found a double digit in the epd, see /16N/

Code: Select all

4r1k1/b1R2ppp/pq6/1p2Q3/1P2n3/16N/1B4BP/7K b - - acn 45; acs 0; bm Qg1+; ce 32764; dm 2; pv Qg1+ Nxg1 Nf2#;
I am only checking the bm legality for all positions with 1 bm that I had extracted.
But the positions that I reported with unnatural castling fields are based on original epd.
That one is fascinating. Since chest processed it without puking, I guess that it considered it as '1', '6' 'N' so 8 characters (7 spaces and a knight).