Checkmate evaluation test

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Ajedrecista
Posts: 2103
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Checkmate evaluation test.

Post by Ajedrecista »

Hello:

A blast from the past: Rybka 2.2n2 x64 (date of the executable: 2nd December, 2006) with single core takes few seconds to find checkmate in 10:

Code: Select all

FEN: 3kNr2/p1ppppNq/Ppr1p2p/8/1R6/8/1Q3BB1/1R2b2K w - - 0 1 

Rybka 2.2 64 bit:
   2	00:00	         613	627.712	+5,17	Rb1xe1
   3	00:00	       1.715	1.756.160	+5,02	Rb1xe1
   4	00:00	       3.646	219.617	+5,98	Rb1xe1
   5	00:00	       4.919	296.297	+6,14	Rb1xe1 d7d5
   6	00:00	       8.513	264.160	+6,90	Rb1xe1 d7d5 Re1c1
   7	00:00	      16.270	347.093	+6,90	Rb1xe1 d7d5 Re1c1 Rc6xc1+ Qb2xc1 Rf8xe8
   8	00:00	      25.856	413.696	+6,90	Rb1xe1 d7d5 Re1c1 Rc6xc1+ Qb2xc1 Rf8xe8 Ng7xe8 c7c5
   9	00:00	      59.198	426.892	+6,89	Rb1xe1 Rc6c2 Qb2d4 Rf8xe8 Bg2e4 Qh7xg7
  10	00:00	      99.640	432.336	+7,05	Rb1xe1 Rc6c2 Qb2d4 Rf8xe8 Bg2e4 Qh7xg7 Qd4xg7 Rc2xf2
  11	00:00	     296.892	462.032	+7,32	Rb1xe1 d7d5 Re1c1 Rc6xc1+ Qb2xc1 Rf8xe8 Ng7xe8
  12	00:02	   1.010.157	505.078	+9,18	Rb1xe1 Qh7c2 Bg2xc6 Qc2xc6+ Kh1h2 Rf8g8 Rb4g4 Rg8f8 Re1c1 Qc6f3
  13	00:02	   1.296.990	502.694	+9,35	Rb1xe1 Qh7c2 Bg2xc6 Qc2xc6+ Kh1h2 Rf8xe8 Ng7xe8 d7d6 Ne8g7 Qc6d5 Bf2e3 c7c5
  14	00:04	   2.043.214	495.794	+9,85	Rb1xe1 Qh7c2 Bg2xc6 Qc2xc6+ Kh1h2 Rf8g8 Rb4g4 f7f5 Rg4g1 Rg8f8 Re1c1 Qc6d5
  14	00:06	   3.197.449	509.759	+M10	Rb4xb6 c7xb6 Bf2xb6+ Rc6xb6 Qb2xb6+ a7xb6 a6a7 Qh7c2 Rb1xb6 Rf8xe8 Rb6b8+ Qc2c8 a7a8Q
  15	00:07	   3.563.713	520.057	+M10	Rb4xb6 c7xb6 Bf2xb6+ Rc6xb6 Qb2xb6+ a7xb6 a6a7 Qh7c2 Rb1xb6 Rf8xe8 Rb6b8+ Qc2c8 a7a8Q
------------
Chessnut1071 wrote: Sun Oct 16, 2022 2:34 pm[fen]3kNr2/p1ppppNq/Ppr1p2p/8/1R6/8/1Q3BB1/1R2b2K w - - 0 1[/fen]

The author claims the above puzzle can be solved in 7 moves, however, he doesn't supply the solution. [...]
Just for curiosity: where did you find the problem, Bill?

Regards from Spain.

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

Re: Checkmate evaluation test

Post by Chessnut1071 »

JVMerlino wrote: Mon Oct 17, 2022 7:00 pm My engine, rated about 2600, with 8 cores, needed 4 minutes and 26 seconds to announce Mate in 10 with Rxb6, searching almost 7.9B nodes.

21 32748 44598 7,881,802,951 b4b6 c7b6 (17672 KNPS)(Mate in 10)
Can you specify the metrics in your generic evaluation function?
Chessnut1071
Posts: 313
Joined: Tue Aug 03, 2021 2:41 pm
Full name: Bill Beame

Re: Checkmate evaluation test.

Post by Chessnut1071 »

Ajedrecista wrote: Mon Oct 17, 2022 8:34 pm Hello:

A blast from the past: Rybka 2.2n2 x64 (date of the executable: 2nd December, 2006) with single core takes few seconds to find checkmate in 10:

Code: Select all

FEN: 3kNr2/p1ppppNq/Ppr1p2p/8/1R6/8/1Q3BB1/1R2b2K w - - 0 1 

Rybka 2.2 64 bit:
   2	00:00	         613	627.712	+5,17	Rb1xe1
   3	00:00	       1.715	1.756.160	+5,02	Rb1xe1
   4	00:00	       3.646	219.617	+5,98	Rb1xe1
   5	00:00	       4.919	296.297	+6,14	Rb1xe1 d7d5
   6	00:00	       8.513	264.160	+6,90	Rb1xe1 d7d5 Re1c1
   7	00:00	      16.270	347.093	+6,90	Rb1xe1 d7d5 Re1c1 Rc6xc1+ Qb2xc1 Rf8xe8
   8	00:00	      25.856	413.696	+6,90	Rb1xe1 d7d5 Re1c1 Rc6xc1+ Qb2xc1 Rf8xe8 Ng7xe8 c7c5
   9	00:00	      59.198	426.892	+6,89	Rb1xe1 Rc6c2 Qb2d4 Rf8xe8 Bg2e4 Qh7xg7
  10	00:00	      99.640	432.336	+7,05	Rb1xe1 Rc6c2 Qb2d4 Rf8xe8 Bg2e4 Qh7xg7 Qd4xg7 Rc2xf2
  11	00:00	     296.892	462.032	+7,32	Rb1xe1 d7d5 Re1c1 Rc6xc1+ Qb2xc1 Rf8xe8 Ng7xe8
  12	00:02	   1.010.157	505.078	+9,18	Rb1xe1 Qh7c2 Bg2xc6 Qc2xc6+ Kh1h2 Rf8g8 Rb4g4 Rg8f8 Re1c1 Qc6f3
  13	00:02	   1.296.990	502.694	+9,35	Rb1xe1 Qh7c2 Bg2xc6 Qc2xc6+ Kh1h2 Rf8xe8 Ng7xe8 d7d6 Ne8g7 Qc6d5 Bf2e3 c7c5
  14	00:04	   2.043.214	495.794	+9,85	Rb1xe1 Qh7c2 Bg2xc6 Qc2xc6+ Kh1h2 Rf8g8 Rb4g4 f7f5 Rg4g1 Rg8f8 Re1c1 Qc6d5
  14	00:06	   3.197.449	509.759	+M10	Rb4xb6 c7xb6 Bf2xb6+ Rc6xb6 Qb2xb6+ a7xb6 a6a7 Qh7c2 Rb1xb6 Rf8xe8 Rb6b8+ Qc2c8 a7a8Q
  15	00:07	   3.563.713	520.057	+M10	Rb4xb6 c7xb6 Bf2xb6+ Rc6xb6 Qb2xb6+ a7xb6 a6a7 Qh7c2 Rb1xb6 Rf8xe8 Rb6b8+ Qc2c8 a7a8Q
------------
Chessnut1071 wrote: Sun Oct 16, 2022 2:34 pm[fen]3kNr2/p1ppppNq/Ppr1p2p/8/1R6/8/1Q3BB1/1R2b2K w - - 0 1[/fen]

The author claims the above puzzle can be solved in 7 moves, however, he doesn't supply the solution. [...]
Just for curiosity: where did you find the problem, Bill?
It was on a YouTube video which I can't find any more. What's in Rybka's evaluation, that has to be a killer function.
Regards from Spain.

Ajedrecista.
JVMerlino
Posts: 1398
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Checkmate evaluation test

Post by JVMerlino »

Chessnut1071 wrote: Tue Oct 18, 2022 12:59 am
JVMerlino wrote: Mon Oct 17, 2022 7:00 pm My engine, rated about 2600, with 8 cores, needed 7 minutes and 26 seconds to announce Mate in 10 with Rxb6, searching almost 7.9B nodes.

21 32748 44598 7,881,802,951 b4b6 c7b6 (17672 KNPS)(Mate in 10)
Can you specify the metrics in your generic evaluation function?
I assume you are interested in the search functionality, since the evaluation is not as important in mate-finding. Actually, a very simple evaluation will often find mates much faster than a complex one, although of course the more complex one will provide more elo if implemented and tuned properly. To prove this, I modified Myrddin to only use a very simple evaluation - just material and PST, while maintaining knowledge of material draws. It found the Mate in 10 in only 50 seconds (compared to 446 seconds with the full evaluation). :roll:

Anyway, Myrddin's A/B search has the following features, and all use very standard implementation:
History Heuristic
Killer Moves
Null Move
IID
Razoring
Mate Distance Pruning
Two aspiration windows before full-width search
Reasonably aggressive reductions using logarithmic formula
Check and Single-reply extensions

You can see its code here:
https://github.com/JVMerlino/Myrddin/bl ... BThink.cpp