Engine check: tricky 2-move mate

Discussion of chess software programming and technical issues.

Moderator: Ras

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

Engine check: tricky 2-move mate

Post by Chessnut1071 »

[fen]8/8/1b1ppNbB/nQr2k2/n1p3N1/1P2p1p1/2Kp1q2/1B1R1R2 w 0 1 [/fen] Alian White (1906) 2-move mate [Rc1]

This puzzles is easy for humans; however, I've seen some highly ranked engines fail to find the mate in 2. Too much pruning?

enjoy
yeni_sekme
Posts: 40
Joined: Mon Mar 01, 2021 7:51 pm
Location: İstanbul, Turkey
Full name: Ömer Faruk Tutkun

Re: Engine check: tricky 2-move mate

Post by yeni_sekme »

Code: Select all

id name Devre
id author Omer Faruk Tutkun
position fen 8/8/1b1ppNbB/nQr2k2/n1p3N1/1P2p1p1/2Kp1q2/1B1R1R2 w 0 1
go depth 10
info depth 1  nps 203000 nodes 203 score cp -52 time 1 pv f1f2
info depth 2  nps 240083 nodes 2881 score cp 64 time 12 pv b5a4 g3g2
info depth 3  nps 230181 nodes 5064 score cp 126 time 22 pv b5a4 c4b3 c2b2
info depth 4  nps 315822 nodes 14212 score mate 4 time 45 pv b5a4 c4b3 c2b2 c5c2
info depth 5  nps 355267 nodes 25224 score mate 2 time 71 pv d1c1 c4c3 b5d3
info depth 6  nps 321777 nodes 26064 score mate 2 time 81 pv d1c1 c4c3 b5d3
info depth 7  nps 284294 nodes 27008 score mate 2 time 95 pv d1c1 c4c3 b5d3
info depth 8  nps 270058 nodes 27816 score mate 2 time 103 pv d1c1 c4c3 b5d3
info depth 9  nps 261481 nodes 28763 score mate 2 time 110 pv d1c1 c4c3 b5d3
info depth 10  nps 244702 nodes 29609 score mate 2 time 121 pv d1c1 c4c3 b5d3
bestmove  d1c1
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Engine check: tricky 2-move mate

Post by dangi12012 »

Perft 7: 29891316936
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
R. Tomasi
Posts: 307
Joined: Wed Sep 01, 2021 4:08 pm
Location: Germany
Full name: Roland Tomasi

Re: Engine check: tricky 2-move mate

Post by R. Tomasi »

Pygmalion:

Code: Select all

set-fen 8/8/1b1ppNbB/nQr2k2/n1p3N1/1P2p1p1/2Kp1q2/1B1R1R2 w - - 0 1

New position: 8/8/1b1ppNbB/nQr2k2/n1p3N1/1P2p1p1/2Kp1q2/1B1R1R2 w - -

debug-pvs 10

0:     +6.00977 - Rxf2 gxf2 Qxa4 xb3
   673 N   in    585 mcs =>   1.15 MN/s

1:     +6.00977 - Rxf2 gxf2 Qxa4 xb3
  89.0 N   in   85.8 mcs =>   1.04 MN/s

2:     +6.00977 - Rxf2 gxf2 Qxa4 xb3
  3.76 kN  in   2.11 ms  =>   1.78 MN/s

3:     +6.00977 - Rxf2 gxf2 Qxa4 xb3
   590 N   in    254 mcs =>   2.32 MN/s

4:     +6.99414 - Qxa4 xb3 Kb2 Rc2 Bxc2
  5.61 kN  in   3.33 ms  =>   1.69 MN/s

5:     +6.99414 - Qxa4 xb3 Kb2 Rc2 Bxc2
  3.28 kN  in   1.89 ms  =>   1.74 MN/s

6:     +9.05273 - Qxa4 xb3 Kb2 Rc2 Bxc2 xc2 Rxf2 exf2 Kxc2
  4.35 kN  in   2.17 ms  =>   2.00 MN/s

7:          +M3 - Rc1 Rxb5 Kd1
   186 kN  in   66.1 ms  =>   2.82 MN/s

8:          +M3 - Rc1 Rxb5 Kd1
  1.03 MN  in    349 ms  =>   2.96 MN/s

9:          +M3 - Rc1 Rxb5 Kd1
  2.94 MN  in    866 ms  =>   3.40 MN/s

10:          +M3 - Rc1 Rxb5 Kd1
  15.6 MN  in   5.30 s   =>   2.94 MN/s
  
JVMerlino
Posts: 1404
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Engine check: tricky 2-move mate

Post by JVMerlino »

Which "highly ranked" engines fail to find this?

Myrddin needs 1/100 second:

Code: Select all

 4   1382      1        20234 f1f2! (1264 KNPS)
 4  32758      1        20723 f1f2 g3f2 b5a4 c4b3 c2b2 c5c2 b1c2 b3c2 a4c2 (1295 KNPS)(Mate in 5)
 5  32758      1        21229 f1f2 g3f2 b5a4 c4b3 c2b2 c5c2 b1c2 b3c2 a4c2 (1326 KNPS)(Mate in 5)
 6  32758      1        22626 f1f2 g3f2 b5a4 c4b3 c2b2 c5c2 b1c2 b3c2 a4c2 (1414 KNPS)(Mate in 5)
 7  32758      1        24336 f1f2 g3f2 b5a4 c4b3 c2b2 c5c2 b1c2 b3c2 a4c2 (1521 KNPS)(Mate in 5)
 7  32764      1        41615 d1c1 c5b5 c2d1 (2600 KNPS)(Mate in 2)
 8  32764      1        42549 d1c1 c5b5 c2d1 (2659 KNPS)(Mate in 2)
User avatar
algerbrex
Posts: 608
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Engine check: tricky 2-move mate

Post by algerbrex »

Code: Select all

position fen 8/8/1b1ppNbB/nQr2k2/n1p3N1/1P2p1p1/2Kp1q2/1B1R1R2 w - - 0 1
go
info depth 1 score cp 406 nodes 326 nps 24050 time 13 pv f1f2 g3f2
info depth 2 score cp 406 nodes 344 nps 45726 time 7 pv f1f2 g3f2 b5a4
info depth 3 score cp 556 nodes 1732 nps 174603 time 9 pv f1f2 g3f2 b5a4 b6d8
info depth 4 score cp 789 nodes 4309 nps 313120 time 13 pv f1f2 g3f2 b5a4 c5d5 c2c3 d5d3 b1d3 c4d3
info depth 5 score cp 9997 nodes 13207 nps 425719 time 31 pv d1c1 c5b5 c2d1
info depth 6 score cp 9997 nodes 28474 nps 567644 time 50 pv d1c1 c5b5 c2d1
info depth 7 score cp 9997 nodes 83467 nps 870706 time 95 pv d1c1 c5b5 c2d1
info depth 8 score cp 9997 nodes 211711 nps 1493002 time 141 pv d1c1 c5b5 c2d1
info depth 9 score cp 9997 nodes 638399 nps 1739139 time 367 pv d1c1 c5b5 c2d1
info depth 10 score cp 9997 nodes 1606092 nps 1775416 time 904 pv d1c1 c5b5 c2d1
info depth 11 score cp 9997 nodes 5014968 nps 1841577 time 2723 pv d1c1 c5b5 c2d1
User avatar
Ras
Posts: 2703
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Engine check: tricky 2-move mate

Post by Ras »

CT800:

Code: Select all

info depth 2 seldepth 2 score cp 253 time 32 nodes 2202 nps 68812 hashfull 0 tbhits 0 pv b5a4 a5b3
info depth 3 seldepth 6 score cp 663 time 34 nodes 4380 nps 128823 hashfull 0 tbhits 0 pv b5a4 c5d5 c2c3 d5d3 b1d3 c4d3
info depth 4 seldepth 7 score mate 4 time 34 nodes 4763 nps 140088 hashfull 0 tbhits 0 pv b5a4 c5d5 c2c3 d5d3 b1d3 c4d3 a4e4
info depth 5 seldepth 7 score mate 4 time 35 nodes 5074 nps 144971 hashfull 0 tbhits 0 pv b5a4 c5d5 c2c3 d5d3 b1d3 c4d3 a4e4
info depth 6 seldepth 7 score mate 4 time 35 nodes 5449 nps 155685 hashfull 0 tbhits 0 pv b5a4 c5d5 c2c3 d5d3 b1d3 c4d3 a4e4
info depth 7 seldepth 7 score mate 4 time 36 nodes 6381 nps 177250 hashfull 0 tbhits 0 pv b5a4 c5d5 c2c3 d5d3 b1d3 c4d3 a4e4
info depth 8 seldepth 8 score mate 4 time 38 nodes 7847 nps 206500 hashfull 0 tbhits 0 pv b5a4 c5d5 c2c3 d5d3 b1d3 c4d3 a4e4
info depth 9 seldepth 9 score mate 2 time 43 nodes 11782 nps 274000 hashfull 0 tbhits 0 pv d1c1 d2c1q c2c1
info depth 10 seldepth 10 score mate 2 time 43 nodes 12363 nps 287511 hashfull 0 tbhits 0 pv d1c1 d2c1q c2c1
algerbrex wrote: Fri Oct 08, 2021 6:30 pm

Code: Select all

info depth 11 score cp 9997 nodes 5014968 nps 1841577 time 2723 pv d1c1 c5b5 c2d1
The mate score should be displayed with mate, not in cp.

R. Tomasi wrote: Fri Oct 08, 2021 5:10 pm Pygmalion:

Code: Select all

10:          +M3 - Rc1 Rxb5 Kd1
The PV shows a mate in 2, not in 3.
Rasmus Althoff
https://www.ct800.net
User avatar
Ajedrecista
Posts: 2134
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Engine check: tricky 2-move mate.

Post by Ajedrecista »

Hello Rasmus:
Ras wrote: Fri Oct 08, 2021 8:14 pm[...]
R. Tomasi wrote: Fri Oct 08, 2021 5:10 pm Pygmalion:

Code: Select all

10:          +M3 - Rc1 Rxb5 Kd1
The PV shows a mate in 2, not in 3.
Roland's engine outputs the DTM in plies for some reason, as it can be seen in a post from the last week:

Re: Godfrey Heathcote's (1902) 2-move mate - engine tester

As for the problem, it is valid (white checkmates black) for both white to move and black to move according to YACPDB (Yet Another Chess Problem Database):

https://yacpdb.org/#32780

Regards from Spain.

Ajedrecista.
Last edited by Ajedrecista on Fri Oct 08, 2021 8:25 pm, edited 1 time in total.
User avatar
Ras
Posts: 2703
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Engine check: tricky 2-move mate.

Post by Ras »

Ajedrecista wrote: Fri Oct 08, 2021 8:22 pmRoland's engine outputs the DTM in plies for some reason
Ah, that's why, I forgot that. :)
Rasmus Althoff
https://www.ct800.net
R. Tomasi
Posts: 307
Joined: Wed Sep 01, 2021 4:08 pm
Location: Germany
Full name: Roland Tomasi

Re: Engine check: tricky 2-move mate

Post by R. Tomasi »

Ras wrote: Fri Oct 08, 2021 8:14 pm The PV shows a mate in 2, not in 3.
No. It's the distance in ply. It shows that when given the "debug-pvs" command, since the engine is designed to support other boardgames, where the distance in ply would be relevant. When interfaced via the Winboard protocol it will post the distance correctly.