Arasan test suite update

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

Moderator: Ras

Dann Corbit
Posts: 12777
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Arasan test suite update

Post by Dann Corbit »

jwes wrote:
jdart wrote:This problem (10.1) has a "shortest mate" solution but there are other moves that are forced mates, too, just longer. So I agree in this case (aind for similar mate problems) that you shouldn't just count the shortest mate as correct. Some engines will hit on a longer mate first.

But I disagree in general that all "winning" moves should be equivalent solutions, if you mean by "win" less than a mate score. I think if a move gives a superior eval (you can pick your number but I generally like to see +1 pawn at least over alternatives) then it can be considered best.

--Jon
I think a good problem should have only move that is a clear win (or draw). I don't think that an absolute eval difference is the right way, e.g. if one move gives +11 and another is +10, I would count them both as solutions, but if one move gives 1.5 and another move is 0.5, I would count only the first solution, even if the second actually can be nursed to a win too deep to see.
In a case like that, 1.5 is three times larger than 0.5, but it is still not impossible that the 1.5 will fizzle out and the 0.5 will become the dominant move given a bit more time.

If one score is +4 pawns and another is +6 pawns it is not certain to me that the +6 pawns score is the best move, even though it is more probable than the +4 pawns score.
jdart
Posts: 4397
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: 10.155 (Palac-Kovacevic)

Post by jdart »

The weird thing is, I am running Deep Rybka 3 on a dual using "epd2wb" and polyglot, and I'm getting a different result for this test (your number 47 in the "hard" list - at first I thought this was a different EPD but I think I have it right now).

Fen: r2q2k1/pp1b1rpp/2n1pp1B/3pPP1Q/3P4/P1P2N2/2pK1P1P/R5R1 w - - 0 1
Bm: Bxg7

no 2 0 +34 396 Qxf7+
no 3 0 +41 776 Qxf7+
no 4 20 +41 1154 Qxf7+
no 5 50 +48 3023 Qxf7+ Kxf7 Rxg7+ Ke8
no 6 270 +68 13326 Qxf7+
no 6 470 +88 23755 Qxf7+
no 6 550 +128 27058 Qxf7+
no 6 610 +192 30511 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7
no 7 770 +212 38127 Qxf7+
no 7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 +495 5878307 Bxg7
yes 14 190800 +535 11074503 Bxg7
Dann Corbit
Posts: 12777
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: 10.155 (Palac-Kovacevic)

Post by Dann Corbit »

jdart wrote:The weird thing is, I am running Deep Rybka 3 on a dual using "epd2wb" and polyglot, and I'm getting a different result for this test (your number 47 in the "hard" list - at first I thought this was a different EPD but I think I have it right now).

Fen: r2q2k1/pp1b1rpp/2n1pp1B/3pPP1Q/3P4/P1P2N2/2pK1P1P/R5R1 w - - 0 1
Bm: Bxg7

no 2 0 +34 396 Qxf7+
no 3 0 +41 776 Qxf7+
no 4 20 +41 1154 Qxf7+
no 5 50 +48 3023 Qxf7+ Kxf7 Rxg7+ Ke8
no 6 270 +68 13326 Qxf7+
no 6 470 +88 23755 Qxf7+
no 6 550 +128 27058 Qxf7+
no 6 610 +192 30511 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7
no 7 770 +212 38127 Qxf7+
no 7 840 +232 41799 Qxf7+
no 7 960 +272 47166 Qxf7+
no 7 1100 +301 54512 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Kd7 Rg7+ Kc8
no 8 1410 +310 72003 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Kd7 Rg7+ Kc8 Rxd8+ Kxd8 exf6 c1=Q+
Kxc1 Rc8
no 9 2130 +330 109038 Qxf7+
no 9 2640 +350 134460 Qxf7+
no 9 3440 +368 183741 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Ke7 exf6+
no 10 4140 +368 225230 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Ke7 exf6+
no 11 6240 +388 330023 Qxf7+
no 11 7520 +390 399022 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Kd7 Rg7+
no 12 12240 +410 640304 Qxf7+
no 12 18360 +430 950100 Qxf7+
no 12 22660 +436 1171762 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Kd7 Rg7+ Kc8 Rxd8+ Nxd8 exf6 b5 Ne5
a5 Kxc2 b4 f7 Nxf7 Nxf7 Bxf7 Rxf7 Ra6 Bf8
no 13 38170 +455 2139330 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Ke7 exf6+ Kxf6 Bg5+ Kg7 Rxd8 Nxd8
Bxd8+ Kf8 Bg5 Rc8 Kxc2 Rc6 Bf4 Ra6 Rg6
no 14 72960 +472 4368152 Qxf7+ Kxf7 Rxg7+ Ke8 Rag1 exf5 Rxh7 Be6
Rh8+ Ke7 exf6+ Kxf6 Bg5+ Kg7 Rxd8 Nxd8
Bxd8+ Kf8 Bg5 c1=Q+ Kxc1 Rc8 Kc2
yes 14 96670 +475 5451065 Bxg7
yes 14 106960 +495 5878307 Bxg7
yes 14 190800 +535 11074503 Bxg7
Possible differences:
I used 4 threads for Deep Rybka 3.
I had 512 MB hash
Deep Rybka 3 is non-deterministic to some degree (IOW, I may get different results on different runs).

It seems likely that Bxg7 is not a lot better than Qxf7+ since your Rybka eval is +535 and my Rybka eval was +514
jdart
Posts: 4397
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: 10.155 (Palac-Kovacevic)

Post by jdart »

It seems likely that Bxg7 is not a lot better than Qxf7+ since your Rybka eval is +535 and my Rybka eval was +514
I agree - will look to replace this test.
User avatar
Eelco de Groot
Posts: 4655
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: 10.155 (Palac-Kovacevic)

Post by Eelco de Groot »

jdart wrote:
It seems likely that Bxg7 is not a lot better than Qxf7+ since your Rybka eval is +535 and my Rybka eval was +514
I agree - will look to replace this test.
I did a short run with Marco Costalba's Glaurung clone, both Bxg7 and Qxf7 seem to have scores going up. With Rybka 3, the eval when approaching a full Rook up it is maybe not so easy to compare these two moves because Rybka's search is possibly slowed down; search-results of more than a Rook are not stored in hash as reported by Vas.


8 
7 
6 
5 
4 
3 
2 
1 
abcdefgh

r2q2k1/pp1b1rpp/2n1pp1B/3pPP1Q/3P4/P1P2N2/2pK1P1P/R5R1 w - -

Engine: Glaurung clone 210918 JA (Athlon 2009 MHz, 256 MB)
by Tord Romstad, Marco Costalba

14 3:08 +2.98 1.Qxf7+ Kxf7 2.Rxg7+ Ke8 3.Rag1 exf5
4.Rxh7 Be6 5.Rh8+ Ke7 6.exf6+ Kf7
7.Ng5+ Kxf6 8.Nh7+ Ke7 9.Bg5+ Kd6
10.Bxd8 Rxd8 11.Rxd8+ Nxd8 12.h4 Nc6 (92.441.746) 491

14 3:08 +2.43 1.Rg2 Qe7 2.exf6 Qxf6 3.Rag1 exf5
4.Bxg7 Rxg7 5.Rxg7+ Qxg7 6.Rxg7+ Kxg7
7.Ng5 Be8 8.Qxh7+ Kf6 9.Qh4 c1B+
10.Kxc1 (92.441.746) 491

14 3:08 +2.31 1.Rg3 Qe7 2.exf6 Qxf6 3.Rag1 exf5
4.Bxg7 Rxg7 5.Rxg7+ Qxg7 6.Rxg7+ Kxg7
7.Ng5 Be8 8.Qxh7+ Kf6 9.h4 Bg6 (92.441.746) 491

____________________________________________________________

15 5:21 +3.11 1.Qxf7+ Kxf7 2.Rxg7+ Ke8 3.Rag1 exf5
4.Rxh7 Be6 5.Rh8+ Ke7 6.exf6+ Kf7
7.Ng5+ Kxf6 8.Nh7+ Ke7 9.Bg5+ Kd6
10.Bxd8 Rxd8 11.Rxd8+ Nxd8 12.Ng5 c1N
13.Rxc1 Nc6 (159.112.599) 494

15 5:21 +2.35 1.Rg3 Qe7 2.exf6 Qxf6 3.Rag1 exf5
4.Bxg7 Rxg7 5.Rxg7+ Qxg7 6.Rxg7+ Kxg7
7.Ng5 Be8 8.Qxh7+ Kf6 9.Qg8 c1R
10.Kxc1 Rd8 (159.112.599) 494

15 5:21 +2.35 1.Rg2 Qe7 2.exf6 Qxf6 3.Rag1 exf5
4.Bxg7 Rxg7 5.Rxg7+ Qxg7 6.Rxg7+ Kxg7
7.Ng5 Be8 8.Qxh7+ Kf6 9.Qg8 c1R
10.Kxc1 Rd8 (159.112.599) 494

____________________________________________________________

15 6:29 +4.45 1.Bxg7 Rxg7 2.Qh6 Qf8 3.Rxg7+ Qxg7
4.Rg1 Qxg1 5.Nxg1 Rf8 6.exf6 Rf7
7.Nf3 Na5 8.Ng5 Nb3+ 9.Kxc2 Na1+
10.Kb1 Nc2 (193.476.526) 497


15 6:29 +3.11 1.Qxf7+ Kxf7 2.Rxg7+ Ke8 3.Rag1 exf5
4.Rxh7 Be6 5.Rh8+ Ke7 6.exf6+ Kf7
7.Ng5+ Kxf6 8.Nh7+ Ke7 9.Bg5+ Kd6
10.Bxd8 Rxd8 11.Rxd8+ Nxd8 12.Ng5 c1N
13.Rxc1 Nc6 (193.476.526) 497

15 6:29 +2.35 1.Rg3 Qe7 2.exf6 Qxf6 3.Rag1 exf5
4.Bxg7 Rxg7 5.Rxg7+ Qxg7 6.Rxg7+ Kxg7
7.Ng5 Be8 8.Qxh7+ Kf6 9.Qg8 c1R
10.Kxc1 Rd8 (193.476.526) 497

____________________________________________________________

16 10:23 +4.25 1.Bxg7 Rxg7 2.Qh6 Qf8 3.Rxg7+ Qxg7
4.Rg1 Qxg1 5.Nxg1 Rf8 6.exf6 Rf7
7.Nf3 Na5 8.Qg5+ Kh8 9.fxe6 Nc4+
10.Kxc2 Bxe6 11.Ne5 (313.033.422) 502


16 10:23 +3.82 1.Qxf7+ Kxf7 2.Rxg7+ Ke8 3.Rag1 exf5
4.Rxh7 Be6 5.Rh8+ Kd7 6.Rg7+ Kc8
7.Rxd8+ Nxd8 8.exf6 Nf7 9.Bf4 a6
10.Kxc2 b6 11.Ne5 Ra7 (313.033.422) 502

16 10:23 +2.54 1.Rg3 Qe7 2.exf6 Qxf6 3.Rag1 Raf8
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ne7 2.fxe6 Bxe6 3.Bxg7 Ng6
4.exf6 Rxf6 5.Bxf6 Qxf6 6.Re1 Rc8
7.Kxc2 Bf5+ 8.Kd2 Be4 9.Rxe4 dxe4
10.Qd5+ Kf8 11.Qxb7 Rxc3 (1.732.968.860) 492

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: 4655
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Ancalagon in Arasan test suite 2nd update, 10-1 27-09-2008

Post by Eelco de Groot »

Eelco de Groot wrote:Build 24 again crashed on position 167! But I do not see what can be wrong with the position. Maybe somebody else can try this? I got a little bit better result but testpositions are not such a good indication for efficiency of Ancalagon's new search I think. Still, 55 positions out of only 166 tested is not that bad, with maximum 5 second long searches!

Ancalagon 1.1 Beta 1 Build 24 128Mb hash, Athlon 2009 MHz

Code: Select all

Right until now: 55 of 166  ;  10:28m
Illegal piece!
Illegal position!

         1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20
 -------------------------------------------------------------------------------------
   0 |   -   -   -   -   3   4   -   -   0   -   0   3   -   -   0   -   -   0   -   0
  20 |   -   -   -   -   -   2   -   -   0   0   -   -   1   -   1   0   0   -   -   0
  40 |   -   -   -   0   -   0   0   -   -   -   -   -   -   -   -   -   0   -   -   0
  60 |   -   -   -   -   -   -   -   -   0   4   -   -   0   0   -   -   -   0   0   -
  80 |   0   -   3   0   -   0   -   -   -   -   -   -   -   0   -   0   -   -   -   0
 100 |   -   2   -   -   -   0   0   3   -   3   0   -   -   -   4   -   -   -   0   -
 120 |   -   0   -   0   -   -   1   2   -   -   -   0   -   -   -   -   -   0   -   1
 140 |   -   -   -   -   -   3   -   -   0   -   -   -   -   -   -   -   -   -   -   0
 160 |   -   0   -   -   0   4

   1 sec ->  38/166
   2 sec ->  42/166
   3 sec ->  45/166
   4 sec ->  51/166
   5 sec ->  55/166
  n/s: 401.949  
  TotTime: 14:08m    SolTime: 10:28m
Eelco
With the revised 27-09-2008 update I get just over 60 positions solved in 5 seconds per position.

Ancalagon 1.1 Beta 1 Build 32 128Mb hash, Athlon 2009 MHz

Code: Select all


Right until now: 63 of 200  ;  12:40m
I/O Fault!

         1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20
 -------------------------------------------------------------------------------------
   0 |   0   -   -   -   4   1   -   -   0   0   -   -   -   -   -   -   -   0   -   0
  20 |   -   2   -   -   0   2   -   -   0   -   -   -   0   -   -   -   -   -   -   -
  40 |   -   1   -   0   -   2   1   -   -   -   -   -   -   -   0   -   0   -   -   0
  60 |   -   -   -   -   -   0   1   -   0   4   -   -   -   -   -   -   -   1   0   -
  80 |   1   -   0   -   2   -   -   -   -   -   0   -   -   0   -   -   -   -   -   0
 100 |   -   1   -   -   -   -   0   2   -   1   2   -   -   -   -   1   1   -   0   0
 120 |   -   0   0   0   -   -   1   1   -   -   -   0   -   -   -   0   -   0   -   -
 140 |   -   -   -   -   -   1   -   -   0   -   -   -   -   -   0   1   -   0   -   -
 160 |   -   0   0   -   -   3   -   0   -   -   -   -   -   -   -   -   -   1   -   -
 180 |   2   -   -   -   1   0   -   -   -   -   0   -   -   -   -   -   -   0   -   -

   1 sec ->  37/200
   2 sec ->  53/200
   3 sec ->  60/200
   4 sec ->  61/200
   5 sec ->  63/200
  n/s: 399.502  
  TotTime: 17:02m    SolTime: 12:40m
With the EOLs that are not Windows compatible it now crashed on position 168 but I just loaded the .epd in Windows Wordpad and saved it again, that takes care of the EOLs.

There are still numerous positions in the revised set where I get high to very high scores for nonsolution moves. Part of these may have to do with the faulty passed pawn evals in Ancalagon, that is not yet solved, and I only ran 5 second searches so longer searches would take care of of some of these. Maybe when the engine is improved a little I will run longer searches for validation. I prefer for this kind of test just to do shallow searches and then to do more positions, so the positions don't have to be very difficult and it does not matter much if there are multiple solutions especially for the really difficult ones, most are not found anyway.

Some notes about small changes in Ancalagon's search since Build 24:

For position 2 with the latest build 32 I do not get the high scores reported with build 24 but that probably is to do with some changes in passed pawn scoring, as said that is still not right.

Now with build 32 it does not seem certain Kb4 is winning:
8 
7 
6 
5 
4 
3 
2 
1 
abcdefgh

8/r4p2/4qp2/kp6/3b4/1P2pQ2/2R4P/1R5K b - -

Engine: Ancalagon 1.1 Beta 1b Build 32 (128 MB)
by Tord Romstad, Eelco de Groot

8.01 0:01 -1.94 1...b4 2.Rc4 Qd7 3.Rd1 e2 4.Qxe2 Qd5+
5.Qg2 Qxc4 6.bxc4 Kb6 (378.818) 323

9.01 0:04 -1.50 1...b4 2.Rc4 Qe5 3.Qc6 Qb5 4.Qxb5+ Kxb5
5.Rxd4 e2 6.Rc1 Re7 7.Rd5+ Kb6
8.Rd6+ Kb7 9.h4 e1Q+ 10.Rxe1 Rxe1+
11.Kg2 (1.358.228) 329

10.01 0:04 -1.50 1...b4 2.Rc4 Qe5 3.Qc6 Qb5 4.Qxb5+ Kxb5
5.Rxd4 e2 6.Rc1 Re7 7.Rd5+ Kb6
8.Rd6+ Kb7 9.h4 e1Q+ 10.Rxe1 Rxe1+
11.Kg2 (1.523.139) 328

11.01 0:18 -2.60 1...b4 2.Rc4 Bc3 3.Re4 Qb6 4.Rxe3 Qd6
5.Rd1 Qc5 6.h4 Bd4 7.Re2 (6.263.349) 334

11.05 0:35 -0.29 1...Kb4 2.Re2 Rd7 3.Rc1 Qd5 4.Qxd5 Rxd5
5.Kg1 Rg5+ 6.Kf1 Rf5+ 7.Ke1 Rg5
8.Kd1 Rg1+ 9.Re1 Rxe1+ 10.Kxe1 Kxb3 (11.645.148) 332

12.01 0:37 -0.29 1...Kb4 2.Re2 Rd7 3.Rc1 Qd5 4.Qxd5 Rxd5
5.Kg1 Rg5+ 6.Kf1 Rf5+ 7.Ke1 Rg5
8.Kd1 Rg1+ 9.Re1 Rxe1+ 10.Kxe1 Kxb3 (12.339.792) 332

13.01 3:41 +1.31 1...Kb4 2.h4 Qe5 3.Re2 Re7 4.h5 Re8
5.Rd1 Rg8 6.h6 Ka3 7.h7 Rh8 8.Rxd4 Rxh7+
9.Kg1 Qxd4 10.Qa8+ Kxb3 11.Qa2+ Kb4 (73.099.377) 330

14.01 4:33 +0.80 1...Kb4 2.h4 Qe5 3.h5 Re7 4.Rd1 Re8
5.Rh2 Qe4 6.Qxe4 Rxe4 7.Kg1 Be5
8.Ra2 Kxb3 9.Re2 (90.061.480) 328

15.01 12:13 +0.76 1...Kb4 2.h4 Rd7 3.h5 f5 4.Rd1 Rd8
5.Rg2 Qxb3 6.Qe2 Ka5 7.h6 Rd6 8.h7 Rh6+
9.Kg1 Rxh7 10.Qa2+ Qxa2 11.Rxa2+ Kb4
12.Rxd4+ Kc5 (240.317.094) 327

16.01 48:50 +0.58 1...Kb4 2.h4 Rd7 3.h5 f5 4.Rd1 f4
5.Kg1 Ba7 6.Kh1 Rd4 7.Rdc1 Qd5
8.Qxd5 Rxd5 9.Kg2 Rxh5 10.Kf3 f5
11.Ke2 f3+ 12.Kxf3 (964.956.501) 329

17.01 62:36 +0.07 1...Kb4 2.h4 f5 3.Rd1 Ra1 4.Rxa1 Bxa1
5.Kg2 Bd4 6.h5 Qf6 7.Re2 Qg5+ 8.Kf1 f6
9.Rg2 Qh4 10.Re2 Kxb3 11.h6 Kb4
12.Rxe3 Qxh6 (1.240.177.717) 330


best move: Ka5-b4 time: 64:44.281 min n/s: 330.361 nodes: 1.283.190.000

Only just above zero :o Not sure if the f5 and f6 pawns are good enough to win. But Arasan had a lot higher scores.

Build 24 had higher values probably due to passed pawn scoring:

Passed pawn Build 24 code:

Code: Select all

   Value ebonus = Value(tr * 25); // [EdG: was r * r * 25]
That is now scored much lower:

Code: Select all

   Value ebonus = Value(Min(150, tr * 10)); // [EdG: was r * r * 25]
King safety Build 24 code:

Code: Select all

      Value v = apply_weight((Value)(((0x300 - sign * ei.mgValue) * SafetyTable[attackUnits])/0x100), WeightKingSafety[us]);
      // Value v = apply_weight(SafetyTable[attackUnits], WeightKingSafety[us]);            ei.mgValue -= sign * v;
That is now, with a try to extend King safety scoring to the endgame:

Code: Select all

      Value v = apply_weight((Value)(((0x300 - sign * ei.mgValue) * SafetyTable[attackUnits])/0x100), WeightKingSafety[us]);
      // Value v = apply_weight(SafetyTable[attackUnits], WeightKingSafety[us]);               ei.mgValue -= sign * v;
      ei.egValue -= sign * 3 * v / 4;
Furthermore there was a glaring error in my root_search adaptation :oops:
Up till build 30:

Code: Select all

	if ((value - oldvalue) >= Value(0x14)||(oldvalue - value) >= Value(0x14))
	  value = -search_pv(pos, ss, -beta, -alpha, newDepth+1, 1, 0);
          oldvalue = value; //  :?: Not what I intended, oldvalue = value should go before value = search, but not sure this is worse because it limits the search extension to one ply maximum.
	  if ((value - oldvalue) >= Value(0x14)||(oldvalue - value) >= Value(0x14))

The older Build 24 again also with slightly different Beta b1 settings, Threat Depth increased from 5 to 6:

8/r4p2/4qp2/kp6/3b4/1P2pQ2/2R4P/1R5K b - -

Engine: Ancalagon 1.1 Beta 1b Build 24 (128 MB)
by Tord Romstad, Eelco de Groot

8.00 0:00 +1.50 1...Kb6 2.Kg2 f5 3.Rbc1 Qxb3 4.Rc6+ Ka5
5.Qe2 Ka4 6.R6c2 (220.421) 276

9.00 0:01 +1.88 1...Kb6 2.Kg2 f5 3.Rd1 f4 4.Rdc1 Qxb3
5.Re2 Ka5 6.Kf1 (501.492) 308

10.01 0:03 +0.78 1...Kb6 2.Kg2 f5 3.Rd1 Rc7 4.Rxc7 Kxc7
5.Qg3+ Kb7 6.Qf3+ Kb6 7.Kf1 Bc3 8.h4 (1.039.568) 322

11.01 0:08 +0.78 1...Kb6 2.Kg2 f5 3.Kf1 Qg6 4.Qd5 e2+
5.Kxe2 Re7+ 6.Kd3 f4+ 7.Kxd4 Qxc2
8.Qd6+ Qc6 9.Qxc6+ Kxc6 10.Rc1+ Kd6 (2.958.971) 331

12.01 0:28 0.00 1...Kb6 2.Rd1 Ra1 3.Rxa1 Bxa1 4.Kg1 Qxb3
5.Qc6+ Ka5 6.Qc7+ Kb4 7.Qc5+ Ka5
8.Qc7+ (9.559.133) 332

12.02 0:34 +0.68 1...Kb4 2.Kg2 Ra1 3.Rxa1 Bxa1 4.h4 Bd4
5.Re2 Kxb3 6.h5 f5 7.Kf1 b4 8.Qa8 Kc4 (11.518.180) 330

13.01 1:01 +1.33 1...Kb4 2.Re2 Re7 3.Rd1 Qe4 4.Qxe4 Rxe4
5.Rxd4+ Rxd4 6.Rxe3 f5 7.Kg2 Rd2+
8.Kg3 Rb2 9.h4 Rxb3 10.Rxb3+ Kxb3 (20.194.396) 330

14.01 1:46 +2.45 1...Kb4 2.Re2 f5 3.h4 f6 4.h5 Rh7
5.Rd1 Qe5 6.Rde1 Qe4 7.Qxe4 Rxh5+
8.Kg1 fxe4 9.Rxe3 Bxe3+ 10.Rxe3 f5
11.Kf2 (35.019.245) 329

15.01 9:15 +2.68 1...Kb4 2.Rbc1 Rd7 3.Rg2 Qxb3 4.h4 Ka5
5.h5 Rd8 6.h6 Rh8 7.Rh2 Be5 8.Rh3 Qa3
9.Rb1 Qa2 10.Qxe3 Qxb1+ 11.Qc1 (179.885.248) 323

16.01 19:24 +2.98 1...Kb4 2.Re2 f5 3.h4 f6 4.Rd1 Qe5
5.h5 Rg7 6.Rg1 Rh7 7.Kg2 Bc5 8.Kf1 Kxb3
9.Rd2 Qa1+ 10.Qd1+ Qxd1+ 11.Rxd1 Rxh5
12.Ke2 (379.928.474) 326

17.01 26:02 +2.92 1...Kb4 2.Re2 f5 3.h4 f6 4.Rd1 Qe5
5.h5 Rg7 6.Rg1 Rh7 7.Rge1 f4 8.Rh2 f5
9.Ra2 Qe4 10.Qxe4 Rxh5+ 11.Kg2 fxe4
12.Kf1 (510.588.612) 326


best move: Ka5-b4 time: 26:32.594 min n/s: 326.853 nodes: 520.530.000

Tord's root-search() is now changed in Ancalagon as follows:

Code: Select all


      // Pick the next root move, and print the move and the move number to
      // the standard output:
      move = ss[0].currentMove = rml.get_move(i);
      if(current_search_time() >= 1000)
        std::cout << "info currmove " << move
                  << " currmovenumber " << i + 1 << std::endl;
      
      // Decide search depth for this move:
      ext = extension(pos, move, true, pos.move_is_check(move), false, false, false);
      newDepth = (Iteration-2)*OnePly + ext + InitialDepth;

      // Make the move, and search it.
      pos.do_move(move, u, dcCandidates);

      if(i < MultiPV) {
		  alpha = Value(0x100);
		  value = -search(pos, ss, -alpha, newDepth-1, 1, true, 0);
		  if (value > alpha) {// Fail high, smaller window unless Fail low.
			alpha = Value(0);
			value = -search_pv(pos, ss, -beta, -alpha, newDepth-1, 1, 0);
			if (value < alpha) alpha = -VALUE_INFINITE;
		  }
		  else alpha = -VALUE_INFINITE;
		  oldvalue = value;
        value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
		  if((value - oldvalue) >= Value(0x20)||(oldvalue - value) >= Value(0x20)){
		    oldvalue = value;
		    value = -search_pv(pos, ss, -beta, -alpha, newDepth+1, 1, 0);
		    if((value - oldvalue) >= Value(0x10)||(oldvalue - value) >= Value(0x10)){
              oldvalue = value;
			  value = -search_pv(pos, ss, -beta, -alpha, newDepth+2, 1, 0);
			  if((value - oldvalue) >= Value(0x10)||(oldvalue - value) >= Value(0x10)){
			    oldvalue = value;
			    value = -search_pv(pos, ss, -beta, -alpha, newDepth+3, 1, 0);
		    }
		  }
		}
        // If the value has dropped a lot compared to the last iteration,
        // set the boolean variable Problem to true.  This variable is used
        // for time management:  When Problem is true, we try to complete the
        // current iteration before playing a move.
        Problem = (Iteration >= 2 &&
                   value <= ValueByIteration[Iteration-1] - ProblemMargin);
        if(Problem && StopOnPonderhit)
          StopOnPonderhit = false;
      }
      else {
		if(newDepth < 4*OnePly){newDepth = 4*OnePly;
		}//[Introduced in Build 29 EdG]
        value = -search(pos, ss, -(alpha - 0x200), newDepth - 3, 1, true, 0);
        if(value > alpha - 0x200) {
          // Fail high!  Set the boolean variable FailHigh to true, and 
          // re-search the move with a big window.  The variable FailHigh is
          // used for time management:  We try to avoid aborting the search
          // prematurely during a fail high research.
          FailHigh = true;
		    value = -search_pv(pos, ss, -beta, -alpha, newDepth - 3, 1, 0);
           value = -search_pv(pos, ss, -beta, -alpha, newDepth - 2, 1, 0);
		    value = -search_pv(pos, ss, -beta, -alpha, newDepth - 1, 1, 0);
		    oldvalue = value;
		    value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
		    if((value - oldvalue) >= Value(0x20)){
            oldvalue = value;
			    value = -search_pv(pos, ss, -beta, -alpha, newDepth+1, 1, 0);
			    if((value - oldvalue) >= Value(0x10)){
			      oldvalue = value;
			      value = -search_pv(pos, ss, -beta, -alpha, newDepth+2, 1, 0);
			      if((value - oldvalue) >= Value(0x10)){
			        oldvalue = value;
			        value = -search_pv(pos, ss, -beta, -alpha, newDepth+3, 1, 0);
			      }
			    }
		    }
        }
      }

      pos.undo_move(move, u);

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