Rook Ending !! for Hungry Engines with TB

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

neelbasant
Posts: 226
Joined: Sun Apr 01, 2012 7:57 pm

Rook Ending !! for Hungry Engines with TB

Post by neelbasant »

Here is a position for engines with TB whether white can win or not ..

5r2/2r2pk1/5R1p/8/8/7P/pPP5/K1R5 w - -
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Rook Ending !! for Hungry Engines with TB

Post by Vinvin »

With diagram ...
neelbasant wrote:Here is a position for engines with TB whether white can win or not ..

[d]5r2/2r2pk1/5R1p/8/8/7P/pPP5/K1R5 w - -
User avatar
Eelco de Groot
Posts: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Rook Ending !! for Hungry Engines with TB

Post by Eelco de Groot »

I think it looks positive to winning for White. Eval is slowly going up, and probably Black gets a bonus for the passed pawn on a2 but can't really do much with it, White's passed pawns are still on the second row where they don't even get a passed pawn bonus, f7 is isolated and at the moment blocked, is does not look like the eval would be inflated in White's favor right now, in the start position.

No tablebases installed.

[D]5r2/2r2pk1/5R1p/8/8/7P/pPP5/K1R5 w - -

Engine: Rainbow Serpent 20160903_001 MP (4 threads, i7 6700, 512 MB)
by T. Romstad, M. Costalba, J. Kiiski, G. Linscott

19/36 0:01 +0.99 1.Rf4 f5 2.c3 Rd7 3.Rg1+ Kf6 4.Rxf5+ Kxf5
5.Rf1+ Ke5 6.Rxf8 Rd3 7.h4 Rh3
8.Kxa2 Rxh4 9.b4 h5 10.b5 Kd6
11.Rf6+ Kc7 12.Rc6+ Kb7 13.Kb3 Rh1
14.Rh6 (10.896.650) 8586

20/36 0:03 +1.07-- 1.Rf4 Ra8 (27.596.499) 8452

20/36 0:03 +1.00 1.Rf4 Ra8 2.c4 Kf8 3.c5 Ke7 4.Rh4 Kd7
5.Rxh6 Rc6 6.Rh4 Rf6 7.Rb4 Raa6
8.Rb7+ Kc6 9.Rb8 Rf4 10.Rc8+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3.Kxa2 Ra8+ 4.Kb1 h5
5.b3 Re8 6.Kb2 Re4 7.Rcf1 Rc5 8.Kc3 Kg5
9.Kd3 Rh4 10.Rg1+ Kf6 11.Re1 Rc8
12.Kc3 Rd8 13.Ree3 Rf8 14.Rd3 (52.051.469.287) 8399

39/76 113:48 +1.67 1.Rf3 f5 2.c4 Kf6 3.Kxa2 Ra8+ 4.Kb1 h5
5.b3 Re7 6.Rcf1 Re5 7.Kc2 Rc8 8.Rf4 Rb8
9.R1f3 Rc5 10.Kb2 Re5 11.Kc3 Ra5
12.Rh4 Ra3 13.Kb2 Ra4 14.Rxh5 (57.323.577.915) 8395

40/76 150:34 +1.59-- 1.Rf3 Re8 (76.278.975.054) 8442

40/76 157:19 +1.67++ 1.Rf3 (79.566.979.527) 8429

40/76 163:42 +1.71 1.Rf3 f5 2.c4 Kf6 3.Kxa2 Ra8+ 4.Kb1 h5
5.b3 Re7 6.Rcf1 Re5 7.Kc2 Rc8 8.Rf4 Rb8
9.R1f3 Rc5 10.Kb2 Re5 11.Kc3 Ra5
12.Rf1 Rba8 13.Rh4 Rh8 14.Rf3 (82.853.343.716) 8434


best move: Rf6-f3 time: 166:55.687 min n/s: 8.434.792 nodes: 84.533.988.144
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: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Rook Ending !! for Hungry Engines with TB

Post by Eelco de Groot »

I made one longer run with my version B, which has a slightly diferent material imbalance table. It quickly plays Rf3 but for the rest I have not seen big differences yet.

Stockfish probably can reach a depth of 44 sooner, but that also is a function of hash space. Rainbow Serpent has to take more care in the length of the exclusion searches and this difference increases with depth Stockfish only searches to half the iteration depth, Rainbow Serpent to depth - 3 approximately. I'm not sure how much the SE reductions comsensate for this, that depends on the amount of material on the board (transpositions). I could make the SE search depth smaller but that makes the SE reductions less reliable.
The last Fail High took a long time because probably the tree had to be rebuilt for a large part. 512 Mb hash tables is not much.

38/81 152:18 +1.66 1.Rf3 f5 2.Kxa2 Kf6 3.b3 Re8 4.c4 Re4
5.Rcf1 Rc5 6.Kb2 h5 7.Kc3 Kg5 8.Kd3 Ra5
9.Re3 Rh4 10.Kc3 Kf6 11.Rd1 Rf4
12.Rd6+ Kg5 13.Red3 h4 14.R6d5 (82.334.915.302) 9009

39/81 199:37 +1.58-- 1.Rf3 Re8 (108.190.581.834) 9032

39/81 209:09 +1.66++ 1.Rf3 (113.227.846.363) 9022

39/81 278:53 +1.73 1.Rf3 f5 2.Kxa2 Kf6 3.b3 h5 4.Kb2 Rfc8
5.c4 h4 6.Rcf1 Rc5 7.Kc3 Ra5 8.Rf4 Kg5
9.Rd4 Re8 10.Rg1+ Kf6 11.Rxh4 Re3+
12.Kb4 Ra8 13.Rh6+ Ke5 14.c5 (150.096.905.099) 8969

40/81 287:58 +1.65-- 1.Rf3 f5 (154.937.664.726) 8967

40/81 297:38 +1.73++ 1.Rf3 (160.143.326.144) 8967

40/81 425:51 +1.71 1.Rf3 Rfc8 2.c3 Ra7 3.c4 Ra4 4.c5 Kf8
5.b3 Re4 6.Kxa2 Ke7 7.Ka3 Rb8 8.Kb2 h5
9.Rd3 h4 10.c6 Rc8 11.c7 Ke8 12.Rc2 Re7
13.Rdc3 Re4 14.Rg2 {A won position. [D]2r1k3/2P2p2/8/8/4r2p/1PR4P/1K4R1/8 b - - Computer evaluation below} (228.596.928.564) 8946

41/81 450:54 +1.79++ 1.Rf3 (240.650.408.675) 8895

41/83 624:19 +1.87++ 1.Rf3 (303.605.341.676) 8104

41/83 966:25 +1.79-- 1.Rf3 Rfc8 (396.758.528.221) 6842

41/83 993:16 +1.87 1.Rf3 Rfc8 2.c3 Ra7 3.c4 Ra4 4.c5 Kf8
5.b3 Re4 6.Kxa2 Ke7 7.Ka3 Rb8 8.Kb2 Ke6
9.Rd3 Ke7 10.c6 Rc8 11.c7 Ke8 12.Rc5 Re7
13.Rdc3 Re4 14.Rc2 (403.227.420.304) 6765

42/83 1075:28+1.92 1.Rf3 Rfc8 2.c3 Ra7 3.c4 Ra4 4.c5 Kf8
5.b3 Re4 6.Kxa2 Ke7 7.Ka3 Rb8 8.Kb2 Ke6
9.Rd3 Ke7 10.c6 Rc8 11.c7 Ke8 12.Rc5 Ke7
13.Rc2 Ke8 14.Rdc3 (422.963.953.858) 6554

43/83 1178:45+1.84-- 1.Rf3 Rfc8 (448.639.342.823) 6343

43/83 1200:08+1.92++ 1.Rf3 (456.390.881.758) 6338

43/83 1225:04+1.92 1.Rf3 Rfc8 2.c3 Ra7 3.c4 Ra4 4.c5 Kf8
5.b3 Re4 6.Kxa2 Ke7 7.Ka3 Rb8 8.Kb2 Rc8
9.Rf5 Rb8 10.Rd5 Rb5 11.Rc3 Re2+
12.Ka3 Re4 13.Rcd3 Ke6 14.Rd6+ (465.455.928.558) 6332

44/83 1293:33+1.84-- 1.Rf3 Rfc8 (490.437.385.711) 6318

44/83 1325:39+1.92++ 1.Rf3 (502.043.744.782) 6311

44/83 1438:13+1.84-- 1.Rf3 Rfc8 (542.755.771.875) 6289

44/83 1487:45+1.67-- 1.Rf3 Rfc8 (560.895.199.851) 6283

44/83 1589:46+1.44-- 1.Rf3 Rfc8 (598.562.629.583) 6275

44/88 1986:36+1.62++ 1.Rf3 (796.024.893.297) 6678

44/95 2184:08+1.94 1.Rf3 f5 2.Kxa2 Kf6 3.b3 h5 4.Kb2 Re8
5.c4 Re2+ 6.Kc3 Ke5 7.Rcf1 f4 8.Rxf4 Re3+
9.Kb4 Rb7+ 10.Kc5 Rexb3 11.Rf5+ Ke6
12.Rf6+ Ke5 13.R1f5+ Ke4 14.Rxh5 (901.710.362.468) 6880


best move: Rf6-f3 time: 2377:23.844 min n/s: 6.880.726 nodes: 1005.359.812.524


At the end of iteration 40 we have the following position in which I let run Rainbow Serpent B a bit longer. Still without tablebases, it seems a sure win though.

[pgn][Event "?"]
[Site "?"]
[Date "2016.09.12"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "5r2/2r2pk1/5R1p/8/8/7P/pPP5/K1R5 w - -"]

1. Rf3 Rfc8 2. c3 Ra7 3. c4 Ra4 4. c5 Kf8 5. b3 Re4 6. Kxa2
Ke7 7. Ka3 Rb8 8. Kb2 h5 9. Rd3 h4 10. c6 Rc8 11. c7 Ke8
12. Rc2 Re7 13. Rdc3 Re4 14. Rg2 *[/pgn]

[D]2r1k3/2P2p2/8/8/4r2p/1PR4P/1K4R1/8 b - -

Engine: Rainbow Serpent 20160903_002 MP (512 MB)
B version, different imbalance table
by T. Romstad, M. Costalba, J. Kiiski, G. Linscott

19/36 0:02 +1.38 14...Ke7 15.Rd2 f5 16.Rc6 Rb4 17.Rc5 Rb6
18.Rd4 Rb7 19.Rxf5 Ke6 20.Rf3 Rbxc7
21.Rxh4 Rc2+ 22.Ka3 R2c3 23.Rxc3 Rxc3
24.Kb4 Rf3 25.Kc4 Ke5 26.b4 (13.987.458) 6976
.
.
.
48/91 1185:33+4.85 14...Ke7 15.Rd2 f5 16.Rc6 Rb4 17.Rd5 Rb7
18.Rxf5 Rcxc7 19.Rxc7+ Rxc7 20.Rh5 Kd6
21.Rxh4 Rg7 22.Kc3 Rg5 23.Kb4 Rg8
24.Rh6+ Ke5 25.Kc3 Ra8 26.b4 Kd5
27.Kb3 Rg8 (400.359.251.432) 5628


best move: Ke8-e7 time: 1230:19.687 min n/s: 5.628.302 nodes: 417.754.459.154
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
tpoppins
Posts: 919
Joined: Tue Nov 24, 2015 9:11 pm
Location: upstate

Re: Rook Ending !! for Hungry Engines with TB

Post by tpoppins »

Eelco, SF master (110916, 11 cores/16 GB hash/6-men Syzygy) confirms your findings.

Rather than letting it run for hours at the root I stepped it through the first move of the PVs at the minimal depth of 40 - kind of like Chessbase's Deep Analysis, only manual.

5r2/2r2pk1/5R1p/8/8/7P/pPP5/K1R5 w - - 0 1

Code: Select all

Analysis by Stockfish 110916 64 POPCNT:

1.Rf3 f5 2.c4 Kf6 3.Kxa2 Ra7+ 4.Kb1 Ra4 5.b3 Rb8 6.Kb2 Ke6 7.Re1+ Kf6 8.Kc3 Rab4 9.Kc2 R8b7 10.Ref1 Ke6 11.Rd1 Rf7 12.Rd4 Ke5 13.Rdf4 Ke6 14.Rh4 Rb8 15.Rxh6+ Ke5 16.Re3+ Kf4 17.Rhe6 Rg7 18.Rd3 Rg2+ 19.Kc3 Rg1 20.Red6 Rf1 21.R6d4+ Ke5 22.Rd5+ Ke6 23.Rd6+ Ke5 24.Kd2 Rb1 25.R6d5+ Kf6 26.Kc2 Rf1 27.c5 f4 28.c6 Rc8 29.Rc5 
  +- (2.58)  Depth: 42/72   01:23:16  71648MN, tb=101170109
1...Rfc8 is briefly considered at d=28/45 (35 sec/409 mN into the search), fails low and is promptly discarded; yet once 1.Rf3 is played it comes to the fore (albeit it takes a while to settle there):

Code: Select all

1...Rfc8 2.c3 Ra7 3.c4 Rb8 4.c5 Rb4 5.Ra3 Rc7 6.Kxa2 Rb8 7.Rc4 Rcb7 8.Rg3+ Kf6 9.b3 Ke6 10.Rd3 Ke5 11.Ka3 Ra8+ 12.Kb2 Rab8 13.Rdc3 f6 14.Re3+ Kd5 15.Rf3 Ke6 16.Kc2 Rb5 17.c6 Rc8 18.c7 Rb7 19.Rc6+ Ke7 20.Re3+ Kd7 21.Rec3 Ke7 22.Kb2 Rb5 23.R3c5 Kd7 24.Kc3 f5 25.b4 f4 26.Rxb5 Kxc6 27.Rc5+ Kb6 28.Kd3 f3 
  +- (2.72)  Depth: 42/78   00:45:19  39947MN, tb=54041770

Code: Select all

2.c3 Ra7 3.c4 Ra4 4.c5 f6 5.b3 Re4 6.Kxa2 Kf7 7.Rfc3 Ke7 8.Rc4 f5 9.b4 Kd7 10.Kb3 Rf8 11.Rf1 Re3+ 12.R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f8 6.c6 Rd4 7.b3 Ke7 8.Ka3 Ra8+ 9.Kb2 Rc8 10.Rf5 Rd2+ 11.Ka3 Rd6 12.c7 Ke6 13.Rf3 Rd5 14.b4 h5 15.Rc4 Ke7 16.Kb3 f6 17.Ka3 Re5 18.Rc2 Ra8+ 19.Kb3 Rc8 20.Rd3 Ke8 21.Rd6 Ke7 22.Rd4 Ke8 23.Rc1 Ke7 24.Rd2 Rg5 25.Rc4 Re5 26.Rd3 Ke8 27.Rd6 Ke7 28.Rd1 
  +- (3.35)  Depth: 41/67   00:18:52  16742MN, tb=15537075

Code: Select all

4.c5 Kf8 5.b3 Ra3 6.Rfc3 Ra5 7.b4 Rb5 8.Rc4 Rcb8 9.c6 Rc8 10.Kxa2 Ke7 11.Rd4 Ke6 12.Kb3 Re5 13.Rd3 h5 14.c7 Ke7 15.Rd4 f6 16.Rdc4 Kd7 17.Rd1+ Ke7 18.Rc6 Re6 19.Rc2 Rd6 20.Rdc1 Rd5 21.Rc6 Re5 22.Ra6 Re3+ 23.Ka4 Kd7 24.Rac6 Rxh3 25.b5 Rh2 26.Kb3 Rh3+ 27.Kb4 Rh4+ 28.Ka5 Ra8+ 29.Kb6 
  +- (3.62)  Depth: 42/82   00:22:25  19968MN, tb=23145177

Code: Select all

4...Kf8 5.b3 Ra3 6.Rfc3 Ke7 7.b4 Raa8 8.Rd3 Ra4 9.Rb3 Kd7 10.b5 Re8 11.Rd3+ Kc8 12.b6 Ra6 13.Rd6 h5 14.Rf6 Rf8 15.Rcf1 Ra5 16.c6 Rb5 17.b7+ Kc7 18.Re1 Rb1+ 19.Rxb1 axb1R+ 20.Kxb1 Rg8 21.Kc2 Kb6 22.Kb2 Rd8 23.Kb3 Re8 24.Kc4 Rd8 25.Kc3 Rg8 26.Kd4 Rd8+ 27.Kc4 h4 28.Kb4 
  +- (4.10)  Depth: 40/81   01:37:55  87188MN, tb=95160311
total time: 5:49:42 - complete logs here

I stopped at this point as the steadily increasing eval reaching 400+ cp is a clear indication of a White win. Incidentally the first nine plies of your PGN are confirmed. It is curious that even at such high depths (like d=40) SF displays odd short-sightedness and won't stick with the third and the second plies of its own PV once forced to step through that PV. In contrast, your Rainbow Serpent found the best first nine plies in a single run, and under the handicap of a 512 MB hash and no TBs, although it undervalued White's advantage.
User avatar
Eelco de Groot
Posts: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Rook Ending !! FerrariFish III

Post by Eelco de Groot »

Thanks a lot for the analysis and comparison! It is impressive from Stockfish that it reaches such depths and thus can increase eval better than RS. It may be doing a little too much extensions in PV nodes, (In these very long 40 ply searches I mean) but for the user this means he gets very deep results. And maybe you can't really go deep enough in the PV, to check for pitfalls... But increases the risk of missing something in the sidelines then, either later in the PV or already from the rootposition. Hard to say where the balance lays.

Latest Stockfish does seem to get the larger depths here, also on my machine, just counting the number of iterations. I took the latest Stockfish master, with the incredibly low benchnumber of 5341477. Part of this is just a random number but it also points to a lot of pruning (at least in the bench positons). I love it. Nice patch from VoyagerOne here. Also the bench possibly means hitting a local minimum in tuning, when you measure that here in time to depth. So this master, and I added to that something, rudimentary, but attempt at Singular Extensions in ALL nodes. PV nodes are also ALL nodes but those are already extended by SE, I mean Non PV ones)

I don't know if Komodo has that. Mark Lefler said we should search for an improvement in "a pruning rule that we have", nicely vague and this is not pruning but an extension. So it's not what Mark Lefler was hinting at I think.

bench:
===========================
Total time (ms) : 4272
Nodes searched : 6472643 (not so low as master but still, pretty low ;)
Nodes/second : 1515131 {was running in parallel so not so high}

It goes very deep in the leaf position from above; 51 plies in just over an hour and 53 plies in just over two hours. I only have the run of Rainbow Serpent to compare and Rainbow Serpent at the time was running two instances in parallel, so difficult to compare it with that. But time to depth does not seem bad with the now added Singular Extensions. But I don't know if they get triggered a lot. Doing SE in ALL nodes now also means you have a candidate move in those nodes that you can store, but this Stockfish does not yet do that, only in the shallow IID search where this IID move is found, it wil store it then. And if this (extended or not) presumably best move in a losing node now fails high (in the Singular Extension or, less likely, when not extended), then it will also be stored of course. It also means that SE is no longer exclusively a "loss seeking" extension, in the words of Bruce Moreland. In NonPV-ALL nodes it is now seeking for a win for the side to move in those nodes.


Sorry I'm just thinking aloud a bit. I just made this version and I don't really know much more that that it seems stable so far. I think I may call it the new FerrariFish III and post it :) Here is its first run:


[D]2r1k3/2P2p2/8/8/4r2p/1PR4P/1K4R1/8 b - -

Engine: Sf20160914 FerrariFish III MOD MP (i7 6700, 4 threads, 512 MB)

Added to IID:

Code: Select all

if (!PvNode)
{  // Enables Singular Extensions in NonPV-ALL nodes
	Value rAlpha = alpha - 2 * d / ONE_PLY;
	Value rBeta  = rAlpha + 1;
	IIDValue = search<NonPV>&#40;pos, ss, rAlpha, rBeta, d, false&#41;;
	IIDMove = IIDValue > rAlpha ? ss->currentMove &#58; MOVE_NONE;
&#125;

No other changes to master SF from sept 14, yesterday apart from a few other rudimentary SE supporting changes of course.
by T. Romstad, M. Costalba, J. Kiiski, G. Linscott

23/45 0:02 +1.33 14...Ke7 15.Rd2 f5 16.Rc6 Rb4 17.Rh6 Rb7
18.Rh7+ Ke6 19.Rdd7 f4 20.Rdf7 f3
21.Rxf3 Rbxc7 22.Rxh4 Rc2+ 23.Ka3 Ra8+
24.Ra4 Rh8 25.h4 Rh2 26.Rff4 Rh3
27.Rae4+ Kd7 (17.873.925) 8936

24/45 0:02 +1.56 14...Ke7 15.Rd2 f5 16.Rc6 Rb4 17.Rd5 f4
18.Rh5 Kd7 19.Rc3 Rb7 20.Rh7+ Kd6
21.Rxh4 Rbxc7 22.Rxc7 Rxc7 23.Rxf4 Rh7
24.h4 Kc5 25.b4+ Kb6 26.Kc3 Rh6
27.Re4 Kc6 (26.173.950) 9034

25/45 0:03 +1.58 14...Ke7 15.Rd2 f5 16.Rc6 Rb4 17.Rd5 f4
18.Rh5 Kd7 19.Rc3 Rb7 20.Rh7+ Kd6
21.Rxh4 Rbxc7 22.Rxc7 Rxc7 23.Rxf4 Rh7
24.h4 Kc5 25.b4+ Kb6 26.Kc3 Rh6
27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.Rxc7+ Kxc7 23.Rh4 Kd6
24.Rh8 Ke5 25.b4 Kd5 26.Kb3 Kc6
27.h4 Kb5 (8.711.541.010) 9108

48/85 17:28 +3.51++ 14...Ke7 (9.572.139.567) 9126

48/85 17:33 +3.58-- 14...Ke7 15.Rd2 (9.616.591.702) 9125

48/85 19:41 +3.65 14...Ke7 15.Rd2 f6 16.Rc1 f5 17.Rc6 Re6
18.Rc4 Re4 19.Rxe4+ fxe4 20.Re2 Rxc7
21.Rxe4+ Kd6 22.Rxh4 Re7 23.Rh8 Ke5
24.b4 Kd5 25.Kb3 Kc6 26.h4 Kb5
27.Rb8+ Kc6 (10.802.796.738) 9142

49/85 22:14 +3.58++ 14...Ke7 (12.206.231.369) 9149

49/85 22:14 +3.65-- 14...Ke7 15.Rd2 (12.210.850.227) 9149

49/85 31:49 +3.76-- 14...Ke7 15.Rd2 (17.464.042.075) 9147

49/85 38:54 +3.83 14...Ke7 15.Rd2 Ke8 16.Rc5 f5
17.Rdc2 f4 18.Rh5 Ke7 19.Rxh4 Kd7
20.Rc3 Re2+ 21.Ka3 Re4 22.Rh7+ Kd6
23.Kb2 Re2+ 24.Kc1 Ree8 25.Rf7 Re4
26.Kd2 Ke6 27.Rh7 Kd6 (21.309.111.458) 9128

50/92 49:15 +3.91-- 14...Ke7 15.Rd2 (26.948.820.974) 9119

50/92 52:00 +3.94 14...Ke7 15.Rd2 f5 16.Rc6 Re5 17.Rc4 Re4
18.Rxe4+ fxe4 19.Re2 Rxc7 20.Rxe4+ Kd6
21.Rxh4 Re7 22.Rh8 Kc5 23.h4 Kb4
24.Kc2 Re2+ 25.Kd3 Re6 26.h5 Kxb3
27.Kd4 Kb4 (28.498.157.840) 9131

51/92 64:36 +4.02-- 14...Ke7 15.Rd2 (35.310.180.574) 9108

51/92 65:41 +4.09-- 14...Ke7 15.Rd2 (35.881.708.171) 9104

51/92 67:30 +4.10 14...Ke7 15.Rd2 f5 16.Rc6 Re5 17.Rc4 Rb5
18.Rxh4 Rb7 19.Rh7+ Kf6 20.Rd6+ Ke5
21.Rc6 Kd5 22.Rc2 f4 23.h4 f3 24.h5 Kd6
25.Rf7 Rbxc7 26.Rcxc7 Rxc7 27.Rxf3 Rh7 (36.872.691.029) 9103

52/92 69:21 +4.10 14...Ke7 15.Rd2 f5 16.Rc6 Re5 17.Rc4 Rb5
18.Rxh4 Rb7 19.Rh7+ Kf6 20.Rd6+ Ke5
21.Rc6 Kd5 22.Rc2 f4 23.h4 f3 24.h5 Kd6
25.Rf7 Rbxc7 26.Rcxc7 Rxc7 27.Rxf3 Rh7 (37.889.141.432) 9105

53/92 81:58 +4.17-- 14...Ke7 15.Rd2 (44.800.319.929) 9108

53/92 95:37 +4.24-- 14...Ke7 15.Rd2 (52.220.019.898) 9101

53/92 116:57 +4.35-- 14...Ke7 15.Rd2 (63.853.994.963) 9099

53/92 126:40 +4.35 14...Ke7 15.Rd2 Ke8 16.Rc5 f5
17.Rdc2 f4 18.Rh5 Kf7 19.Rxh4 Ke6
20.Rh6+ Kd5 21.Rh7 Kd6 22.Rc3 Re5
23.Kc2 Ra5 24.b4 Rb5 25.Rh6+ Kd7
26.Rc4 Rd5 27.Rh7+ Kd6 (69.062.723.412) 9086


best move: Ke8-e7 time: 126:50.281 min n/s: 9.086.779 nodes: 69.150.775.000

The chosen color is Ferrari Red, Rosso Corsa :)

Image
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