Testposition. Escape into drawish endgame.

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

Moderator: Ras

User avatar
Eelco de Groot
Posts: 4673
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Testposition. Escape into drawish endgame.

Post by Eelco de Groot »

In endgames with lots of Rooks it is sometimes not possible to win even with two extra passed pawns if they are far apart and can't work together. I was trying to see if this is even true if both sides have Rooks, pawns and one minor piece. I keep it simple, don't count the number of pawns and don't specify the minor piece, two Bishops of the same colour would probably preserve the drawish character. But it is probably not easy to tune all of this and it might not work in practice.

In the below testgame White is already in big trouble again but might escape into such an endgame if minor pieces are traded, if not the move is still probably the best defense. It involves putting the Knight en prise but Black can't take it with d-pawn or Knight because of X-ray attacks along the d-file. Rybka 2.2n2 finds it fast even on one thread, this is the best I can do with Blueberry (P.S. at ply ten you can see some iterative deepening; a second PV, but in case of a False Fail High there is no update of the PV, a bug of my implementation). I got the time down from almost twelve minutes in build 262 :) :


[d]r3r1k1/3q2b1/1p4p1/1Npn1pP1/P2p1P2/5Q2/1P2PBK1/R2R4 w - -

Engine: Blueberry Beta 4 DM70 Build 269 (Athlon 2009 MHz, 64 MB)
by F. Letouzey, T. Gaksch, E. de Groot

8/31 0:06 -1.05 34.Kg1 Re4 35.Bg3 Re3 36.Qg2 Rb3
37.Rdb1 Rc8 38.Kh1 (3.353.034) 514

9/33 0:21 -1.07 34.Kg1 Re4 35.Bg3 Rc8 36.Qf2 c4
37.Re1 d3 38.exd3 cxd3 39.Qd2 Bd4+
40.Nxd4 Rxd4 41.Kg2 (11.424.092) 521

10/42 1:11 -1.55 34.Kg1 Re4 35.Bg3 c4 36.Re1 c3 37.b3 Re3
38.Qf2 c2 39.Kh1 Rc8 (37.687.913) 527

10/52 4:30 -0.87 34.Nc3 Nxf4+ 35.Qxf4 Qc6+ 36.Qf3 Qxf3+
37.exf3 dxc3 38.bxc3 Bxc3 39.Ra3 Be5
40.Ra2 Red8 41.Rxd8+ Rxd8 42.a5 bxa5
43.Bxc5 Ra8 44.Ra4 (145.524.646) 537

10/58 7:43 -0.94 34.Nc3 Nxf4+ 35.Qxf4 Qc6+ 36.Kh3 dxc3
37.a5 bxa5 38.Qc4+ Re6 39.bxc3 Be5
40.Bxc5 Kg7 41.Qb3 Qxc5 42.Qxe6 Qxc3+
43.e3 Qxe3+ 44.Kg2 Qxg5+ 45.Kh3 Bxa1
46.Qd7+ Kf6 47.Qc6+ (248.947.984) 536

11/58 8:54 -1.00 34.Nc3 Nxf4+ 35.Qxf4 Qc6+ 36.Qf3 Qxf3+
37.exf3 dxc3 38.bxc3 Bxc3 39.Rac1 Be5
40.Rc4 Kf7 41.Rb1 Rab8 42.a5 bxa5
43.Rxb8 Rxb8 44.Bxc5 (289.141.016) 541

12/63 17:15 -1.09 34.Nc3 Nc7 35.Nb5 Nxb5 36.axb5 Rad8
37.Qb3+ Kf8 38.Rd2 Re4 39.Bg3 Re6
40.Bf2 Qf7 41.Qf3 (562.393.759) 542


best move: Nb5-c3 time: 20:16.313 min n/s: 544.016 CPU 100.0% n/s(1CPU): 544.016 nodes: 661.660.000


[Event "12 Minutes/Game + 6 Seconds/Move"]
[Site "Engine Match"]
[Date "2009.01.17"]
[Round "2"]
[White "Blueberry Beta 4 DM70 Build 262"]
[Black "Rybka 2.2n2 mp 32-bit PVtips5menbases"]
[ECO "E01"]
[Result "0-1"]

1. Nf3 {book 0s} d5 {book 0s} 2. d4 {book 0s} Nf6 {book 0s}
3. c4 {book 0s} e6 {book 0s} 4. g3 {book 0s} Bd6 {book 0s}
5. c5 {-0.10/9 53s} Be7 {-0.02/15 40s} 6. Bg2 {-0.19/9 24s}
b6 {+0.04/15 1:29m} 7. cxb6 {-0.25/8 31s} axb6 {0.00/15
23s} 8. Nc3 {-0.16/9 30s} O-O {+0.02/14 52s} 9. O-O
{-0.23/9 29s} c5 {+0.05/14 37s} 10. Ne5 {-0.30/9 44s} Bb7
{+0.17/14 1:07m} 11. a4 {-0.27/9 25s} Nc6 {+0.20/13 31s}
12. Nxc6 {-0.36/9 17s} Bxc6 {+0.21/14 16s} 13. Bf4 {-0.32/9
15s} Qd7 {+0.20/13 33s} 14. Bf3 {-0.38/9 21s} Rfd8
{+0.20/12 18s} 15. Be3 {-0.56/9 16s} h6 {+0.30/12 18s}
16. Qc2 {-0.40/9 27s} Bd6 {+0.32/13 18s} 17. Qb3 {-0.45/9
22s} e5 {+0.57/13 30s} 18. dxe5 {-1.37/9 23s} Bxe5
{+0.64/13 5s} 19. Nb5 {-1.16/8 22s} d4 {+0.70/14 32s}
20. Bxc6 {-1.18/11 16s} Qxc6 {+0.67/14 11s} 21. f4
{-1.11/10 11s} Bd6 {+0.65/13 27s} 22. Bf2 {-1.18/10 18s}
Be7 {+0.66/12 32s} 23. Rfd1 {-1.20/8 21s} Nd5 {+0.68/13
54s} 24. Rdc1 {-0.94/9 20s} Bf6 {+0.79/12 8s} 25. Rd1
{-0.96/8 12s} Qe6 {+0.73/12 30s} 26. Qf3 {-0.72/10 30s} g6
{+0.75/11 11s} 27. Kg2 {-0.84/8 34s} h5 {+0.79/10 11s}
28. h3 {-0.96/8 15s} Qf5 {+0.81/10 15s} 29. Qd3 {-1.17/9
32s} Qd7 {+0.78/12 17s} 30. Qf3 {-0.99/8 14s} Bg7 {+0.78/12
36s} 31. g4 {-0.69/8 9s} hxg4 {+1.01/11 6s} 32. hxg4
{-0.85/9 11s} f5 {+1.25/12 6s} 33. g5 {-0.81/8 13s} Re8
{+1.15/11 3s} 34. Rd2 {-1.32/8 24s} (34. Nc3{!} Nxf4+ {Rybka plays Nb4}35. Qxf4 Qc6+ 36. Qf3 Qxf3+ 37. exf3 dxc3 38. bxc3 Bxc3
{[d]r3r1k1/8/1p4p1/2p2pP1/P7/2b2P2/5BK1/R2R4 w - -
With drawing chances})
34... Re4 {+1.47/12 6s} 35. Bg3 {-1.32/8 9s} Re3 {+1.86/12
6s} 36. Qf2 {-2.16/10 11s} Qe6 {+1.87/13 8s} 37. Kh2
{-2.17/9 34s} Be5 {+2.47/12 14s} 38. Rf1 {-3.23/10 52s} Bb8
{+2.66/13 15s} 39. Kh1 {-3.55/8 12s} Rxa4 {+3.12/13 13s}
40. Kg1 {-4.18/9 16s} Re4 {+3.85/11 8s} 41. Qh2 {-4.80/8
6s} Rxf4 {+5.36/12 9s} 42. Bxf4 {-6.17/10 8s} Bxf4
{+7.23/14 6s} 43. Rxf4 {-6.77/11 12s} Qe3+ {+8.57/15 6s}
44. Qf2 {-6.77/12 9s} Qxd2 {+8.01/16 24s} 45. Rh4 {-7.28/8
12s} Ra1+ {+14.98/15 5s} 46. Kh2 {-13.78/9 1:48m} d3
{+15.18/16 6s} 47. Nc7 {-10.83/6 6s} dxe2 {+M11/8 0s}
48. Kh3 {-17.23/4 4s} e1=Q {+M6/5 0s} 49. Qxe1 {-M5/43 3s}
Rxe1 {+M5/3 0s} 50. Nxd5 {-M4/14 4s} Qd3+ {+M4/3 0s}
51. Ne3 {-M3/63 1s} Qxe3+ {+M3/3 0s} 52. Kg2 {-M2/63 0s}
Rg1+ {+M2/3 0s} 53. Kh2 {-M1/4 0s} Qg3# {+M1/3 0s} 0-1
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
User avatar
Eelco de Groot
Posts: 4673
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Testposition. Escape into drawish endgame.

Post by Eelco de Groot »

This is with an older version of Blueberry from one week ago, so you can see it is not an easy position. I am surprised myself that this version does not find it around depth 11 or so..

Build 231 11-01-2009 6:19

[d]r3r1k1/3q2b1/1p4p1/1Npn1pP1/P2p1P2/5Q2/1P2PBK1/R2R4 w - -

Engine: Blueberry Beta 4 Build 231 DM70 (64 MB)
by Fabien Letouzey, Thomas Gaksch, Eelco de Groot

8/34 0:03 -2.12 34.Rd3 Re4 35.Bg3 Qe6 36.Kh1 Rxe2
37.Nd6 Rxb2 38.Nc4 Rc2 39.Re1 (1.722.072) 533

8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

15/70 43:16 -1.27 34.Nc3 Nc7 35.Rd2 Qe6 36.Nd1 Nd5
37.e3 dxe3 38.Rxd5 exf2 39.Rd2 Rad8
40.Rxd8 Rxd8 41.Qxf2 Qe4+ 42.Kh2 Bd4
43.Qg3 Kg7 44.Qh4 Qe2+ 45.Kh3 Qd3+
46.Kg2 Qc2+ 47.Kh1 (1.520.237.671) 585

16/70 75:12 -1.60 34.Nc3 Nc7 35.e3 d3 36.Be1 Re6
37.Bd2 Qc6 38.b3 Qxf3+ 39.Kxf3 Rd8
40.Ra2 Kf7 41.Rh1 Red6 42.Rh2 Ne6
43.Nb5 (2.568.124.017) 569
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Testposition. Escape into drawish endgame.

Post by Dann Corbit »

Rybka finds it but does not see a draw.

Code: Select all

    Searching move: Nb5-c3
    Best move (Rybka 3): Nb5-c3
    identical moves! Found in: 00:00
      2	00:00	       1.300	1.331.200	-0.98	Nb5c3
      3	00:00	       2.792	2.859.008	-1.36	e2e3
      4	00:00	       4.207	253.409	-1.38	e2e3
      5+	00:00	       6.076	188.540	-1.18	e2e3
      5+	00:00	       8.300	257.551	-0.98	e2e3
      5	00:00	       8.957	191.082	-1.42	e2e3 Re8e4
      6	00:00	      18.675	201.296	-1.42	e2e3 Re8e4 e3xd4 Nd5xf4+ Kg2h2
      7+	00:00	      63.742	198.394	-1.22	Nb5c3
      7+	00:00	      69.585	197.930	-1.02	Nb5c3
      7	00:00	      91.712	193.635	-1.02	Nb5c3 Nd5b4 Nc3b5 Ra8d8 Rd1d2
      8	00:00	      99.309	191.151	-1.04	Nb5c3 Nd5b4 Nc3b5 Ra8d8 Rd1d2 Nb4d5
      9	00:00	     108.969	187.852	-1.04	Nb5c3 Nd5b4 Nc3b5 Ra8d8 Rd1d2 Nb4d5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Ra3b3 Re8e4 Kg3h3 Ra7d7 Qf3e2 Rd7d4 Qe2a6 Rd4c4 Qa6b5
     18	03:08	  39.391.463	213.938	-1.18	Nb5c3 Nd5b4 Kg2g3 Qd7d8 Ra1a3 Ra8a7 e2e3 d4d3 Nc3a2 d3d2 Na2xb4 c5xb4 Ra3b3 Re8e4 Kg3h3 Ra7d7 Qf3e2 Rd7d4 Qe2a6 Rd4c4 Qa6b5
   1/19/2009 6:45:03 PM, Time for this analysis: 00:10:00, Rated time: 11:15
User avatar
Eelco de Groot
Posts: 4673
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Testposition. Escape into drawish endgame.

Post by Eelco de Groot »

Dann Corbit wrote:Rybka finds it but does not see a draw.

Code: Select all

    Searching move: Nb5-c3
    Best move (Rybka 3): Nb5-c3
    identical moves! Found in: 00:00
      2	00:00	       1.300	1.331.200	-0.98	Nb5c3
      3	00:00	       2.792	2.859.008	-1.36	e2e3
      4	00:00	       4.207	253.409	-1.38	e2e3
      5+	00:00	       6.076	188.540	-1.18	e2e3
      5+	00:00	       8.300	257.551	-0.98	e2e3
      5	00:00	       8.957	191.082	-1.42	e2e3 Re8e4
      6	00:00	      18.675	201.296	-1.42	e2e3 Re8e4 e3xd4 Nd5xf4+ Kg2h2
      7+	00:00	      63.742	198.394	-1.22	Nb5c3
      7+	00:00	      69.585	197.930	-1.02	Nb5c3
      7	00:00	      91.712	193.635	-1.02	Nb5c3 Nd5b4 Nc3b5 Ra8d8 Rd1d2
      8	00:00	      99.309	191.151	-1.04	Nb5c3 Nd5b4 Nc3b5 Ra8d8 Rd1d2 Nb4d5
      9	00:00	     108.969	187.852	-1.04	Nb5c3 Nd5b4 Nc3b5 Ra8d8 Rd1d2 Nb4d5
     10	00:00	     129.664	192.988	-1.14	Nb5c3 Nd5b4 Nc3b5 Ra8d8 Rd1d2 Nb4d5 Ra1h1 Re8e4
     11	00:01	     169.526	191.605	-1.14	Nb5c3 Nd5b4 Nc3b5 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Ra8a7 e2e3 d4d3 Nc3a2 d3d2 Na2xb4 c5xb4 Ra3b3 Re8e4 Kg3h3 Ra7d7 Qf3e2 Rd7d4 Qe2a6 Rd4c4 Qa6b5
   1/19/2009 6:45:03 PM, Time for this analysis: 00:10:00, Rated time: 11:15
Thanks Dann!

I was just about to post if there were any takers, Hydra IV a.k.a "Sharky", or Cluster Rybka on 72 cores, or from Deep Blue, Kobolt Blue, Williamson & Uniacke Ocean Fisheries Inc. :)

And there you were!

Even more coincidentially just five minutes ago I made a new Blueberry version with an increased 'Swindle'- or 'Trade'-factor:

Build 270 has changed in material.cpp:

Code: Select all


	if (Tactics){

		//trade penalty when down on material

		if (opening <= -0xBD){opening += (towf / 0xBD);
		}
		else if (opening >= 0xBD){opening -= (tobf / 0xBD);
		} 
		if (endgame <= -0x100){endgame += (tewf / 0x100);
		}
		else if (endgame >= 0x100){endgame -= (tebf / 0x100);
		} // [EdG: In Ancalagon this is called the Swindle factor]

changed to

Code: Select all


	if (Tactics){

		//trade penalty when down on material

		if (opening <= -0xBD){opening += (towf + towm)/ 0xBD;
		}
		else if (opening >= 0xBD){opening -= (tobf +tobm) / 0xBD;
		} 
		if (endgame <= -0x100){endgame += (tewf + tewm) / 0x100;
		}
		else if (endgame >= 0x100){endgame -= (tebf + tebm)/ 0x100;
		} // [EdG: In Ancalagon this is called the Swindle factor]
Almost as good as Rybka 3 :lol:


r3r1k1/3q2b1/1p4p1/1Npn1pP1/P2p1P2/5Q2/1P2PBK1/R2R4 w - -

Engine: Blueberry Beta 4 DM70 Build 270 (64 MB)
by F. Letouzey, T. Gaksch, E. de Groot

6/28 0:01 -0.51 34.e3 Qc6 35.exd4 Nxf4+ 36.Kg3 Qxf3+
37.Kxf3 Ne6 38.Be3 (654.198) 517

7/31 0:03 -1.48 34.e3 Re4 35.exd4 Nxf4+ 36.Kh1 Bxd4
37.Bxd4 cxd4 38.Nxd4 Qh7+ 39.Kg1 Nh3+
40.Kg2 Rg4+ 41.Kf1 Rg1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24 -0.94 34.Nc3 Nxf4+ 35.Qxf4 Qb7+ 36.Qf3 Qxf3+
37.exf3 dxc3 38.bxc3 Bxc3 39.Ra2 Rad8
40.Rh1 Bd4 41.a5 Bxf2 42.Kxf2 bxa5
43.Rxa5 Rd2+ 44.Kg3 (46.571.378) 551

11/55 5:21 -0.97 34.Nc3 Nc7 35.Nb5 Nxb5 36.axb5 Rad8
37.Qb3+ Kf8 38.Rd2 Qe7 39.Qf3 c4
40.Rad1 Qe4 41.b3 Qxf3+ 42.Kxf3 (180.091.975) 560

12/55 8:19 -1.08 34.Nc3 Nc7 35.Nb5 Nxb5 36.axb5 Rad8
37.Qb3+ Kf8 38.Rd2 Qe7 39.Kh3 Rd7
40.Qg3 Qf7 41.Kh2 (274.725.282) 550

13/55 17:53 -1.25 34.Nc3 Nc7 35.e3 d3 36.Be1 Rad8
37.Bd2 Qf7 38.Qb7 c4 39.Kf2 Re6
40.Rh1 Qe7 41.Kg2 (586.800.425) 546



Nc3 may still lose but it is by far the tougher defence of White's choices. Part of the score is that Black has a plus pawn, besides any further positional advantages, so I do not expect to see any 0.00 scores apart from the fact that Rybka will probably show even a negative draw-value = contempt-factor of 0.15 in the case of 0.00 material scores (Don't know)?

Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
User avatar
Eelco de Groot
Posts: 4673
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Testposition. Escape into drawish endgame.

Post by Eelco de Groot »

Eelco de Groot wrote:
I was just about to post if there were any takers, Hydra IV a.k.a "Sharky", or Cluster Rybka on 72 cores, or from Deep Blue, Kobolt Blue, Williamson & Uniacke Ocean Fisheries Inc. :)
Sorry, Kobold should be read instead of Kobolt, Sharkey instead of Sharky.
Another name, Sharkey, is used by Saruman's henchmen in the Shire towards the end of The Return of the King. Its meaning is explained in a footnote as a corruption of the Orkish sharkû, which is said to mean "old man".[32] These other names do not appear in the film adaptations.
14 plies deep with extensions:

14/55 41:01 -1.31 34.Nc3 Nc7 35.e3 d3 36.Be1 Re6
37.Bd2 Qc6 38.b3 Rd8 39.Ra2 Qa8
40.Qxa8 Rxa8 41.Kf3 Rd6 42.Rh1 (1.325.823.635) 538


Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Testposition. Escape into drawish endgame.

Post by bob »

Eelco de Groot wrote:In endgames with lots of Rooks it is sometimes not possible to win even with two extra passed pawns if they are far apart and can't work together. I was trying to see if this is even true if both sides have Rooks, pawns and one minor piece. I keep it simple, don't count the number of pawns and don't specify the minor piece, two Bishops of the same colour would probably preserve the drawish character. But it is probably not easy to tune all of this and it might not work in practice.

In the below testgame White is already in big trouble again but might escape into such an endgame if minor pieces are traded, if not the move is still probably the best defense. It involves putting the Knight en prise but Black can't take it with d-pawn or Knight because of X-ray attacks along the d-file. Rybka 2.2n2 finds it fast even on one thread, this is the best I can do with Blueberry (P.S. at ply ten you can see some iterative deepening; a second PV, but in case of a False Fail High there is no update of the PV, a bug of my implementation). I got the time down from almost twelve minutes in build 262 :) :


[d]r3r1k1/3q2b1/1p4p1/1Npn1pP1/P2p1P2/5Q2/1P2PBK1/R2R4 w - -

Engine: Blueberry Beta 4 DM70 Build 269 (Athlon 2009 MHz, 64 MB)
by F. Letouzey, T. Gaksch, E. de Groot

8/31 0:06 -1.05 34.Kg1 Re4 35.Bg3 Re3 36.Qg2 Rb3
37.Rdb1 Rc8 38.Kh1 (3.353.034) 514

9/33 0:21 -1.07 34.Kg1 Re4 35.Bg3 Rc8 36.Qf2 c4
37.Re1 d3 38.exd3 cxd3 39.Qd2 Bd4+
40.Nxd4 Rxd4 41.Kg2 (11.424.092) 521

10/42 1:11 -1.55 34.Kg1 Re4 35.Bg3 c4 36.Re1 c3 37.b3 Re3
38.Qf2 c2 39.Kh1 Rc8 (37.687.913) 527

10/52 4:30 -0.87 34.Nc3 Nxf4+ 35.Qxf4 Qc6+ 36.Qf3 Qxf3+
37.exf3 dxc3 38.bxc3 Bxc3 39.Ra3 Be5
40.Ra2 Red8 41.Rxd8+ Rxd8 42.a5 bxa5
43.Bxc5 Ra8 44.Ra4 (145.524.646) 537

10/58 7:43 -0.94 34.Nc3 Nxf4+ 35.Qxf4 Qc6+ 36.Kh3 dxc3
37.a5 bxa5 38.Qc4+ Re6 39.bxc3 Be5
40.Bxc5 Kg7 41.Qb3 Qxc5 42.Qxe6 Qxc3+
43.e3 Qxe3+ 44.Kg2 Qxg5+ 45.Kh3 Bxa1
46.Qd7+ Kf6 47.Qc6+ (248.947.984) 536

11/58 8:54 -1.00 34.Nc3 Nxf4+ 35.Qxf4 Qc6+ 36.Qf3 Qxf3+
37.exf3 dxc3 38.bxc3 Bxc3 39.Rac1 Be5
40.Rc4 Kf7 41.Rb1 Rab8 42.a5 bxa5
43.Rxb8 Rxb8 44.Bxc5 (289.141.016) 541

12/63 17:15 -1.09 34.Nc3 Nc7 35.Nb5 Nxb5 36.axb5 Rad8
37.Qb3+ Kf8 38.Rd2 Re4 39.Bg3 Re6
40.Bf2 Qf7 41.Qf3 (562.393.759) 542


best move: Nb5-c3 time: 20:16.313 min n/s: 544.016 CPU 100.0% n/s(1CPU): 544.016 nodes: 661.660.000

Crafty on my laptop finds this pretty quickly. The 8-core box would turn this into a few seconds:

Code: Select all

               15    14.93  -1.95   1. e3 Re4 2. exd4 Nxf4+ 3. Kf1 Qd5
                                    4. Be3 Qc4+ 5. Kf2 Nd3+ 6. Kg1 cxd4
                                    7. Nd6 Qd5 8. Rxd3 Qxd6 9. Kg2 Rc8
               15    35.45     +1   1. Nc3!!   (3.9Mnps)             
               15    39.36  -1.31   1. Nc3 Nxf4+ 2. Qxf4 Qb7+ 3. Qf3 Qxf3+
                                    4. exf3 dxc3 5. bxc3 Bxc3 6. Ra3 Bb4
                                    7. Ra2 Red8 8. Rxd8+ Rxd8 9. Re2 Kf7
                                    10. Bg3 <HT>
I did not try the second position you posted as I did not see the best move (it appeared maybe the side to move is wrong?)

[quote\


[Event "12 Minutes/Game + 6 Seconds/Move"]
[Site "Engine Match"]
[Date "2009.01.17"]
[Round "2"]
[White "Blueberry Beta 4 DM70 Build 262"]
[Black "Rybka 2.2n2 mp 32-bit PVtips5menbases"]
[ECO "E01"]
[Result "0-1"]

1. Nf3 {book 0s} d5 {book 0s} 2. d4 {book 0s} Nf6 {book 0s}
3. c4 {book 0s} e6 {book 0s} 4. g3 {book 0s} Bd6 {book 0s}
5. c5 {-0.10/9 53s} Be7 {-0.02/15 40s} 6. Bg2 {-0.19/9 24s}
b6 {+0.04/15 1:29m} 7. cxb6 {-0.25/8 31s} axb6 {0.00/15
23s} 8. Nc3 {-0.16/9 30s} O-O {+0.02/14 52s} 9. O-O
{-0.23/9 29s} c5 {+0.05/14 37s} 10. Ne5 {-0.30/9 44s} Bb7
{+0.17/14 1:07m} 11. a4 {-0.27/9 25s} Nc6 {+0.20/13 31s}
12. Nxc6 {-0.36/9 17s} Bxc6 {+0.21/14 16s} 13. Bf4 {-0.32/9
15s} Qd7 {+0.20/13 33s} 14. Bf3 {-0.38/9 21s} Rfd8
{+0.20/12 18s} 15. Be3 {-0.56/9 16s} h6 {+0.30/12 18s}
16. Qc2 {-0.40/9 27s} Bd6 {+0.32/13 18s} 17. Qb3 {-0.45/9
22s} e5 {+0.57/13 30s} 18. dxe5 {-1.37/9 23s} Bxe5
{+0.64/13 5s} 19. Nb5 {-1.16/8 22s} d4 {+0.70/14 32s}
20. Bxc6 {-1.18/11 16s} Qxc6 {+0.67/14 11s} 21. f4
{-1.11/10 11s} Bd6 {+0.65/13 27s} 22. Bf2 {-1.18/10 18s}
Be7 {+0.66/12 32s} 23. Rfd1 {-1.20/8 21s} Nd5 {+0.68/13
54s} 24. Rdc1 {-0.94/9 20s} Bf6 {+0.79/12 8s} 25. Rd1
{-0.96/8 12s} Qe6 {+0.73/12 30s} 26. Qf3 {-0.72/10 30s} g6
{+0.75/11 11s} 27. Kg2 {-0.84/8 34s} h5 {+0.79/10 11s}
28. h3 {-0.96/8 15s} Qf5 {+0.81/10 15s} 29. Qd3 {-1.17/9
32s} Qd7 {+0.78/12 17s} 30. Qf3 {-0.99/8 14s} Bg7 {+0.78/12
36s} 31. g4 {-0.69/8 9s} hxg4 {+1.01/11 6s} 32. hxg4
{-0.85/9 11s} f5 {+1.25/12 6s} 33. g5 {-0.81/8 13s} Re8
{+1.15/11 3s} 34. Rd2 {-1.32/8 24s} (34. Nc3{!} Nxf4+ {Rybka plays Nb4}35. Qxf4 Qc6+ 36. Qf3 Qxf3+ 37. exf3 dxc3 38. bxc3 Bxc3
{[d]r3r1k1/8/1p4p1/2p2pP1/P7/2b2P2/5BK1/R2R4 w - -
With drawing chances})
34... Re4 {+1.47/12 6s} 35. Bg3 {-1.32/8 9s} Re3 {+1.86/12
6s} 36. Qf2 {-2.16/10 11s} Qe6 {+1.87/13 8s} 37. Kh2
{-2.17/9 34s} Be5 {+2.47/12 14s} 38. Rf1 {-3.23/10 52s} Bb8
{+2.66/13 15s} 39. Kh1 {-3.55/8 12s} Rxa4 {+3.12/13 13s}
40. Kg1 {-4.18/9 16s} Re4 {+3.85/11 8s} 41. Qh2 {-4.80/8
6s} Rxf4 {+5.36/12 9s} 42. Bxf4 {-6.17/10 8s} Bxf4
{+7.23/14 6s} 43. Rxf4 {-6.77/11 12s} Qe3+ {+8.57/15 6s}
44. Qf2 {-6.77/12 9s} Qxd2 {+8.01/16 24s} 45. Rh4 {-7.28/8
12s} Ra1+ {+14.98/15 5s} 46. Kh2 {-13.78/9 1:48m} d3
{+15.18/16 6s} 47. Nc7 {-10.83/6 6s} dxe2 {+M11/8 0s}
48. Kh3 {-17.23/4 4s} e1=Q {+M6/5 0s} 49. Qxe1 {-M5/43 3s}
Rxe1 {+M5/3 0s} 50. Nxd5 {-M4/14 4s} Qd3+ {+M4/3 0s}
51. Ne3 {-M3/63 1s} Qxe3+ {+M3/3 0s} 52. Kg2 {-M2/63 0s}
Rg1+ {+M2/3 0s} 53. Kh2 {-M1/4 0s} Qg3# {+M1/3 0s} 0-1[/quote]
User avatar
Eelco de Groot
Posts: 4673
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Testposition. Escape into drawish endgame.

Post by Eelco de Groot »

That is pretty good Bob! Thanks!

A Cluster Crafty would do even better but still if Rybka can do this in two seconds.. I mean there is so much potential still for single core programs, just look at the latest SSDF list with an Athlon 1200 MHz in third place. But of course there are also always positions where you just can't look deep enough.

The second diagram in the game you meant I presume? You are right it is not a testposition but end of variation after 34... Nxf4+, as an example of what I meant in the header a drawish endgame, four rooks, an indeterminate number of pawns and a minor piece added on both sides in this case Bishops of same colour.

At the moment that is just the first category of drawish endgames beyond what was already programmed by Fabien in Fruit but as this is at least eight pieces in case of four rooks + number of pawns and this type of endgame is pretty frequent, it would be a very powerful rule if it holds.

I played a few shallow shoot-outs nothing definite but I think that in spite of the extra pawn White has good drawing chances. That probably means that 34... Nxf4+ is an inferior move, see below, but at least helps White find Nc3. Also for Black to recognize that Nxf4+ will lead to a drawish position (+ forced sequence helping Rybka determine trade-offs) will help him to find a better move quickly. Rybka 3 does that as shown in Dann's post better than other programs including the free Rybka 2.2n2)

Regards, Eelco

The best moves after 34. Nc3 are according Blueberry Build 270:

Best five after 34. Nc3:

[d]r3r1k1/3q2b1/1p4p1/2pn1pP1/P2p1P2/2N2Q2/1P2PBK1/R2R4 b - -

Engine: Blueberry Beta 4 DM70 Build 270 (64 MB)
by F. Letouzey, T. Gaksch, E. de Groot

14 209:34 +1.48 34...Nc7 35.Nb5 Nxb5 36.axb5 Rad8
37.Qb3+ Kf8 38.Rd2 Qb7+ 39.Kg1 Qc8
40.Kh2 d3 41.exd3 Qb7 42.Kg3 Bd4
43.Bxd4 (6.946.449.275) 550

14 220:58 +1.33 34...Nb4 35.Nb5 Rad8 36.Rd2 Nd5
37.Kh1 Qe6 38.Ra3 Qe4 39.Qxe4 Rxe4
40.e3 dxe3 41.Bxe3 Bxb2 42.Rxb2 Nxe3
43.Kg1 Rd1+ 44.Kf2 Ng4+ 45.Kg3 Rg1+
46.Kh4 Rxf4 (7.330.327.445) 550

14 254:15 +1.21 34...Ne7 35.Rd2 Qe6 36.Nb5 Nd5 37.e3 Nxe3+
38.Bxe3 Qxe3 39.Qd5+ Kf8 40.Qd6+ Kf7
41.Qd5+ Re6 42.Qb7+ Re7 43.Qd5+ Kf8
44.Qxa8+ Re8 45.Qf3 Qxd2+ 46.Qf2 (8.409.588.719) 550

14 269:38 +0.78 34...Nxf4+ 35.Qxf4 Rad8 36.Qf3 Qe6
37.Nb5 Qxe2 38.b4 Qe7 39.bxc5 bxc5
40.Qb3+ Kf8 41.Rd3 Qe4+ 42.Kg1 Be5
43.Re1 Qg4+ 44.Kh1 Kg7 45.Rh3 Qxg5 (8.919.576.849)550

14 274:37 +0.54 34...Rad8 35.Nxd5 Qxd5 36.Qxd5+ Rxd5
37.Rd2 Kf7 38.a5 bxa5 39.Rxa5 Red8
40.Kf3 c4 41.Ra4 Rc8 42.Ra7+ Kg8
43.Ra6 Kh7 44.Rd1 Rb8 45.Rh1+ Kg8 (9.092.497.059) 550

14 351:04 +0.03 34...Nxc3 35.bxc3 Rad8 36.cxd4 cxd4
37.Kf1 Re7 38.Kg2 Kf7 39.Re1 Re4
40.a5 bxa5 41.Kg1 Qe7 42.Qg2 Rxe2
43.Rxe2 Qxe2 44.Qb7+ Ke6 45.Qxg7 (11.592.531.272) 550

best move: Nd5-c7 time: 357:12.157 min n/s: 549.880 CPU 100.0% n/s(1CPU): 549.880 nodes: 11.785.100.000


At the moment this is placed in material.cpp under

Code: Select all

   // draw leaf (likely draw)

Code: Select all

   if (recog == MAT_KRPawnsKRPawns || recog == MAT_KRRPawnsKRRPawns || recog == MAT_KRmPawnsKRmPawns || recog == MAT_KRRmPawnsKRRmPawns) {
       mul[White] = 12;
       mul[Black] = 12;
   }
The recognizers are further used in eval_passer() for tuning.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan