Checkmate check on solution

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Chessnut1071
Posts: 313
Joined: Tue Aug 03, 2021 2:41 pm
Full name: Bill Beame

Checkmate check on solution

Post by Chessnut1071 »

A 9-move checkmate was published on Chess.com as follows:

FEN[2213] = "1n3r2/6pp/ppkp4/1p4b1/1q2PB2/5Q2/PPP3PP/R4RK1 w - - 0 1";

// solution: 1. Pe5+ Kc7 2. PxP+ Kd7 3.Qb7+ Ke6 4. Re1+ Kf5 5. Bxg5+ Kxg5 6. Qe7+ Rf6 7. Rf5+ Kg6 8. qe8+ hh6 9 Qh5++

However, after 1. Pe5+ Kd7 I cannot find a mate in 9. Can anybody find a mate in 9 from this position or that a bogus solution?

tia
Uri Blass
Posts: 10372
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Checkmate check on solution

Post by Uri Blass »

The solution is wrong.

Chest say no mate in 9.
Chessnut1071
Posts: 313
Joined: Tue Aug 03, 2021 2:41 pm
Full name: Bill Beame

Re: Checkmate check on solution

Post by Chessnut1071 »

Uri Blass wrote: Fri Aug 18, 2023 8:02 pm The solution is wrong.

Chest say no mate in 9.
Thanks Uri. One question, how long did your program take to determine that? My program sputtered away for 6 hours on that bogus mate.
Joerg Oster
Posts: 939
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany
Full name: Jörg Oster

Re: Checkmate check on solution

Post by Joerg Oster »

Chessnut1071 wrote: Sat Aug 19, 2023 3:50 am
Uri Blass wrote: Fri Aug 18, 2023 8:02 pm The solution is wrong.

Chest say no mate in 9.
Thanks Uri. One question, how long did your program take to determine that? My program sputtered away for 6 hours on that bogus mate.
Matefish Dev with 2 Threads needs about 11 min to confirm there is no mate.

Code: Select all

position fen 1n3r2/6pp/ppkp4/1p4b1/1q2PB2/5Q2/PPP3PP/R4RK1 w - - 0 1
d

 +---+---+---+---+---+---+---+---+
 |   | n |   |   |   | r |   |   | 8
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   | p | p | 7
 +---+---+---+---+---+---+---+---+
 | p | p | k | p |   |   |   |   | 6
 +---+---+---+---+---+---+---+---+
 |   | p |   |   |   |   | b |   | 5
 +---+---+---+---+---+---+---+---+
 |   | q |   |   | P | B |   |   | 4
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   | Q |   |   | 3
 +---+---+---+---+---+---+---+---+
 | P | P | P |   |   |   | P | P | 2
 +---+---+---+---+---+---+---+---+
 | R |   |   |   |   | R | K |   | 1
 +---+---+---+---+---+---+---+---+
   a   b   c   d   e   f   g   h

Fen: 1n3r2/6pp/ppkp4/1p4b1/1q2PB2/5Q2/PPP3PP/R4RK1 w - - 0 1
PositionKey: D248275742D3525C
MaterialKey: 24EB971ADFE34E91
Checkers: 
Legal moves: 40
setoption name Threads value 2
go mate 9
info depth 1 seldepth 1 multipv 1 score cp 0 nodes 1 nps 1000 tbhits 0 time 1 pv f3c3
info depth 3 seldepth 3 multipv 1 score cp 0 nodes 3309 nps 1103000 tbhits 0 time 3 pv f3c3
info depth 5 seldepth 5 multipv 1 score cp 0 nodes 6601 nps 1650250 tbhits 0 time 4 pv f3c3
info depth 7 seldepth 7 multipv 1 score cp 0 nodes 15064 nps 1883000 tbhits 0 time 8 pv f3c3
info depth 9 seldepth 9 multipv 1 score cp 0 nodes 38687 nps 2149277 tbhits 0 time 18 pv f3c3
info depth 11 seldepth 11 multipv 1 score cp 0 nodes 141559 nps 2320639 tbhits 0 time 61 pv f3c3
info currmove f3b3 currmovenumber 3
info currmove f3d1 currmovenumber 4
info currmove f3h5 currmovenumber 5
info currmove f3a3 currmovenumber 6
info currmove f1d1 currmovenumber 7
info currmove f3h3 currmovenumber 8
info currmove a1c1 currmovenumber 9
info currmove c2c4 currmovenumber 10
info currmove g2g4 currmovenumber 11
info currmove g2g3 currmovenumber 12
info currmove a2a4 currmovenumber 13
info currmove b2b3 currmovenumber 14
info currmove a1b1 currmovenumber 15
info currmove a2a3 currmovenumber 16
info currmove f4d6 currmovenumber 17
info currmove f4g3 currmovenumber 18
info currmove g1f2 currmovenumber 19
info currmove a1e1 currmovenumber 20
info currmove f4d2 currmovenumber 21
info depth 13 seldepth 13 multipv 1 score cp 0 nodes 8934663 nps 2601823 tbhits 0 time 3434 pv f3c3
info currmove f3c3 currmovenumber 1
info currmove f3b3 currmovenumber 2
info currmove f3d1 currmovenumber 3
info currmove f3h5 currmovenumber 4
info currmove f3a3 currmovenumber 6
info currmove f1d1 currmovenumber 7
info currmove f3h3 currmovenumber 8
info currmove a1c1 currmovenumber 9
info currmove c2c4 currmovenumber 10
info currmove g2g4 currmovenumber 11
info currmove g2g3 currmovenumber 12
info currmove a2a4 currmovenumber 13
info currmove b2b3 currmovenumber 14
info currmove a1b1 currmovenumber 15
info currmove a2a3 currmovenumber 16
info currmove f4d6 currmovenumber 17
info currmove f4g3 currmovenumber 18
info currmove g1f2 currmovenumber 19
info currmove a1e1 currmovenumber 20
info currmove f4d2 currmovenumber 21
info depth 15 seldepth 15 multipv 1 score cp 0 nodes 383846595 nps 2502602 tbhits 0 time 153379 pv f3c3
info currmove f3c3 currmovenumber 1
info currmove f3b3 currmovenumber 2
info currmove f3d1 currmovenumber 3
info currmove f3h5 currmovenumber 4
info currmove f3a3 currmovenumber 5
info currmove f1d1 currmovenumber 6
info currmove f3h3 currmovenumber 7
info currmove a1c1 currmovenumber 9
info currmove c2c4 currmovenumber 10
info currmove g2g4 currmovenumber 11
info currmove g2g3 currmovenumber 12
info currmove a2a4 currmovenumber 13
info currmove b2b3 currmovenumber 14
info currmove a1b1 currmovenumber 15
info currmove a2a3 currmovenumber 16
info currmove f4d6 currmovenumber 17
info currmove f4g3 currmovenumber 18
info currmove g1f2 currmovenumber 19
info currmove a1e1 currmovenumber 21
info currmove f4d2 currmovenumber 23
info depth 17 seldepth 17 multipv 1 score cp 0 nodes 1665072294 nps 2502637 tbhits 0 time 665327 pv f3c3
info string Failure! No mate found!
bestmove f3c3
Jörg Oster
Ras
Posts: 2495
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Checkmate check on solution

Post by Ras »

No mate in 9 in the original position.
CT800 V1.44 after a bit under 15 minutes, single-threaded engine in mate-finder mode:

Code: Select all

setoption name hash value 256
position fen 1n3r2/6pp/ppkp4/1p4b1/1q2PB2/5Q2/PPP3PP/R4RK1 w - - 0 1         
go mate 9
(...)
info depth 17 seldepth 17 score cp 0 time 872534 nodes 1417257052 nps 1624300
info string error (no mate found)
bestmove 0000
One speed-up trick for the mate-finder is that the move at the last ply level must necessarily deliver check, or else it cannot be checkmate. Another is that you don't need to call static eval - if a leaf position isn't checkmate, you can just score it as draw. Many identical scores also help with (lossless) alpha-beta pruning.
Rasmus Althoff
https://www.ct800.net
Joerg Oster
Posts: 939
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany
Full name: Jörg Oster

Re: Checkmate check on solution

Post by Joerg Oster »

Joerg Oster wrote: Sat Aug 19, 2023 12:34 pm Matefish Dev with 2 Threads needs about 11 min to confirm there is no mate.
That was too optimistic.
Happened because the main thread finished searching and printed the pv while the other thread was still searching.

After the fix:

Code: Select all

info string Failure! No mate found!
info time 1547314 multipv 1 depth 17 seldepth 17 nodes 2758883409 nps 1783014 tbhits 0 score cp 0 pv f3c3
bestmove f3c3
So almost 26 minutes with 2 threads. :(
Jörg Oster
User avatar
Ajedrecista
Posts: 1972
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Checkmate check on solution.

Post by Ajedrecista »

Hello Bill:
Chessnut1071 wrote: Fri Aug 18, 2023 7:42 pm A 9-move checkmate was published on Chess.com as follows:

FEN[2213] = "1n3r2/6pp/ppkp4/1p4b1/1q2PB2/5Q2/PPP3PP/R4RK1 w - - 0 1";

// solution: 1. Pe5+ Kc7 2. PxP+ Kd7 3.Qb7+ Ke6 4. Re1+ Kf5 5. Bxg5+ Kxg5 6. Qe7+ Rf6 7. Rf5+ Kg6 8. qe8+ hh6 9 Qh5++

However, after 1. Pe5+ Kd7 I cannot find a mate in 9. Can anybody find a mate in 9 from this position or that a bogus solution?

tia
The given solution is a joke to say the least. It is not your fault, Bill. Let me explain why I think so:

1.- The solution is not correctly written: 4.- Re1+ could be both 4.- Rae1+ and 4.- Rfe1+ (we later see that it must be 4.- Rae1+ because of 5.- Bxg5+, this is, for the check, so a rook must stand at f-file).

2.- The most important thing is the presence of suboptimal moves and even blunders. The most notorious, bleeding to my eyes is the last black move: we have the following position:

[d]1n2Q3/6pp/pp1P1rk1/1p3R2/1q6/8/PPP3PP/4R1K1 b - - 5 8

Black can simply play 8.- ..., Kxf5 (KxR) and keep the game going on, but no way, it is better to play 8.- ..., Kh6?? to allow a checkmate in one (9.- Qh5# or 9.- Rh5#) to stick to the wanna be checkmate in nine moves and go for a walk earlier. Totally absurd in a checkmate in X problem.

Sorry for being so harsh and aggressive to the 'composer', but it is like claim that chess is a win in two or four moves only because the fool's mate and the scholar's mate exist.

I repeat that I know that this failed 'composition' is not your fault at all, so please keep up your good work in some topics that I see from time to time. Nothing wrong with you. :-)

Regards from Spain.

Ajedrecista.