Test Position: Rd8!!!

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

Moderator: Ras

kgburcham
Posts: 2016
Joined: Sun Feb 17, 2008 4:19 pm

3 Deeps

Post by kgburcham »

[d] r1b1qr1k/1pp3pp/p3p3/n1b1PpN1/5N1P/6B1/PPP1QPP1/2KR3R w - - 16.Rd8

Deep Hiarcs Paderborn 2007:
Hash 2048

16.Rd8
+- (1.41) Depth: 12/31 00:00:02 2866kN
16.Rd8
+- (1.48) Depth: 12/33 00:00:02 3024kN
16.Rd8 Qxd8 17.Qh5 h6 18.Qg6 hxg5 19.hxg5+ Kg8 20.Rh7 Qd2+ 21.Kxd2 Rf7 22.Kc1 Nc4 23.Nxe6
+- (6.38) Depth: 12/33 00:00:02 3320kN
16.Rd8
+- (6.13) Depth: 13/33 00:00:02 3553kN
16.Rd8 Qxd8 17.Qh5 h6 18.Qg6 hxg5 19.hxg5+ Kg8 20.Rh7 Rf7 21.Qh5 Kf8 22.Rh8+ Ke7 23.Rxd8 Kxd8 24.Qxf7 Be7 25.Qg8+ Kd7 26.Qxe6+ Ke8 27.Qg6+
+- (5.84) Depth: 13/33 00:00:03 3704kN
16.Rd8
+- (6.09) Depth: 14/36 00:00:03 4429kN
16.Rd8 Qxd8 17.Qh5 h6 18.Qg6 hxg5 19.Nh5 Qd7 20.Nf6 Nb3+ 21.axb3 Be3+ 22.fxe3
+- (6.33) Depth: 14/36 00:00:03 4849kN
16.Rd8
+- (6.58) Depth: 15/36 00:00:04 5699kN
16.Rd8 Qxd8 17.Qh5 h6 18.Qg6 hxg5 19.Nh5 Qe7 20.Nf6 Rxf6 21.exf6 g4 22.fxe7 Bxe7 23.h5 Nb3+ 24.axb3
+- (9.00) Depth: 15/43 00:00:07 9776kN
16.Rd8
+- (9.25) Depth: 16/43 00:00:09 13203kN
16.Rd8 Bd7 17.Rxa8 Bb5 18.Qd1 Be7 19.Rxe8 Bxe8 20.Ngxe6 Rg8 21.Nxc7 Ba4 22.Qd2 Nc6 23.Qd7 B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21.Qh5 Kf8 22.Rh8+ Ke7 (90.555.270) 331


[Site "USSR"]
[Date "1955"]
[White "Neishtadt,Yakov"]
[Black "Gipslis,Aivars"]
[ECO "C24"]
[Result "1-0"]

1. e4 e5 2. Bc4 Nf6 3. d4 Nxe4 4. dxe5 Nc5 5. Nf3 Be7
6. Bf4 Nc6 7. Nc3 Ne6 8. Bg3 O-O 9. Qe2 f5 10. O-O-O Qe8
11. Nd5 Kh8 12. Nf4 a6 13. h4 Na5 14. Bxe6 dxe6 15. Ng5 Bc5
16. Rd8 Qxd8 17. Qh5 h6 18. Qg6 hxg5 19. hxg5+ Kg8 20. Qh5
Nc4 21. g6 Qd2+ 22. Kb1 Na3+ 23. bxa3 1-0
swami
Posts: 6664
Joined: Thu Mar 09, 2006 4:21 am

Re: 3 Deeps

Post by swami »

I'm glad that you liked this test position, Guys :D

Wow...Dann, Thanks for posting analysis and time taken by various engines 8-)
Ignacio
Posts: 178
Joined: Wed Mar 08, 2006 8:15 pm

Re: 3 Deeps

Post by Ignacio »

After 1.Rd8 Qxd8 there is Mate in 14:
2.Qh5 Qxg5 3.hg5 Kg8 4.Qxh7+ Kf7 5.g6+ Ke8 6.Rd1 (or Qxg7) etc.

Nice position.

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

Glaurung 2.1 (JA) Re: Test Position: Rd8!!!

Post by Eelco de Groot »

Interesting that if 1... Qxd8 there is a mate in 14 or is it 16 including the first moves?

Here is the result with Glaurung 2.1 JA default to compare with the output of unrefined Ancalagon Beta, on my single core Athlon, this shows the advantages of a correct PV because it took a loong time to resolve plydepth 24, seeing probably that 1...Qxd8 was not good. But we will never know if it actually saw something like a mate score, probably that was too deep at 28 plies or so. The solution time was better for Glaurung 2.1 and nodes per second at least 40 % better than my own compile, Ancalagon 2.0 it is a bit slow and calculates for instance "OutpostPawns" as a special case of 'almost passed pawns', but it does not yet use the information :roll:


[d]r1b1qr1k/1pp3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bxf4 a3 13.h6 Rf7
14.Ne7+ (33.551.500.712) 621

best move: Rd1-d8 time: 920:51.594 min n/s: 622.422 nodes: 34.389.780.000
Uri
Posts: 523
Joined: Thu Dec 27, 2007 9:34 pm

Re: Test Position: Rd8!!!

Post by Uri »

Ignacio wrote:Hi Swami,

Toga: 47 seconds
Deep Shredder: 73 seconds

Best,
Ignacio.
Which Toga? Toga II 1.4.2JD can't find it even after 16 minutes. Shredder 10 also doesn't find it.
User avatar
Eelco de Groot
Posts: 4698
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Glaurung 2.1 (JA) Re: Test Position: Rd8!!!

Post by Eelco de Groot »

Eelco de Groot wrote:Interesting that if 1... Qxd8 there is a mate in 14 or is it 16 including the first moves?

Here is the result with Glaurung 2.1 JA default to compare with the output of unrefined Ancalagon Beta, on my single core Athlon, this shows the advantages of a correct PV because it took a loong time to resolve plydepth 24, seeing probably that 1...Qxd8 was not good. But we will never know if it actually saw something like a mate score, probably that was too deep at 28 plies or so. The solution time was better for Glaurung 2.1 and nodes per second at least 40 % better than my own compile, Ancalagon 2.0 it is a bit slow and calculates for instance "OutpostPawns" as a special case of 'almost passed pawns', but it does not yet use the information :roll:
This one is looking a bit better, but as it is tuned to this position only it is not sure that it constitutes an improvement. OutpostPawns are still not used in the evaluation but I could introduce another novelty; because Tord has made his code so flexible it was easy to introduce another King Safety shaping function; where Glaurung has a Quadratic slope for King Safety, in Ancalagon's predecessor there was already a Cubic approach and now also a Quartic slope for extra fast rising "Roller Coaster" King Safety scores :D (Roller Coaster because of the possibility of large eval swings, the accuracy is not really guaranteed :? )

Sample for Tord of the new code in initsafety():

Code: Select all

    for(i = 0; i < 100; i++) {
      if(i < b) SafetyTable[i] = Value(0);
      else if(get_option_value_string("King Safety Curve") == "Cubic")
        SafetyTable[i] = Value((int)(a * (i - b) * (i - b) * (i - b) + 0.5));
      else if(get_option_value_string("King Safety Curve") == "Quartic")
        SafetyTable[i] = Value((int)(a * (i - b) * (i - b) * (i - b) * (i - b) + 0.5));
      else if(get_option_value_string("King Safety Curve") == "Linear")
        SafetyTable[i] = Value((int)(100 * a * (i - b) + 0.5));
    }

[d]r1b1qr1k/1pp3pp/p3p3/n1b1PpN1/5N1P/6B1/PPP1QPP1/2KR3R w - -

Engine: Ancalagon 2.0 Beta 001 Build 7 25-05-2008 3:59 hr (Athlon 2009 MHz, 256 MB)
by Tord Romstad, Eelco de Groot

6.00 0:00 +2.17 1.h5 h6 2.Ng6+ Kg8 3.Nxf8 hxg5 4.Ng6 Bd7 (18.816) 66

7.00 0:00 +2.50 1.h5 h6 2.Ng6+ Kg8 3.Nxf8 Bxf8 4.Nf3 Qa4
5.a3 (29.139) 93

8.00 0:00 +0.52 1.h5 h6 2.Ng6+ Kg8 3.Nxf8 Bxf8 4.Qd2 Qa4
5.Nh7 Nc4 (58.218) 155

8.00 0:00 +0.86 1.c3 Bb6 2.Kb1 h6 3.Nf3 Kg8 4.Nd4 Bd7 (187.109) 272

9.00 0:00 +2.52 1.c3 Bb6 2.h5 Qa4 3.Kb1 Nc4 4.h6 gxh6
5.Rxh6 (303.057) 312

10.01 0:01 +2.49 1.c3 Nc6 2.h5 h6 3.Ng6+ Kg8 4.Nf3 Ne7
5.Nxf8 Qxf8 6.Kb1 Nd5 (456.313) 343

11.01 0:01 +2.49 1.c3 Nc6 2.h5 h6 3.Ng6+ Kg8 4.Nf3 Ne7
5.Nxf8 Qxf8 6.Qc4 Nc6 7.Kb1 (680.890) 369

12.01 0:02 +2.49 1.c3 Nc6 2.h5 h6 3.Ng6+ Kg8 4.Nf3 Ne7
5.Nxf8 Qxf8 6.Qc4 Nd5 7.Rxd5 exd5
8.Qxd5+ Kh8 (1.093.895) 386

13.01 0:04 +2.29 1.c3 Nc6 2.h5 h6 3.Ng6+ Kg8 4.Nf3 Ne7
5.Nxf8 Qxf8 6.Qc4 Nc6 7.Kb1 b5 8.Qd3 (1.850.015) 398

14.01 0:10 +2.39 1.c3 Nc6 2.h5 h6 3.Ng6+ Kg8 4.Nf3 Ne7
5.Nxf8 Qxf8 6.Qc4 Nc6 7.b4 Be7 8.Kb1 Qe8 (4.112.959) 410

15.01 0:29 +2.39 1.c3 Nc6 2.h5 h6 3.Ng6+ Kg8 4.Nxf8 Qxf8
5.Nf3 Ne7 6.Qc4 Nc6 7.Kb1 b5 8.Qb3 Qf7
9.Nd4 (12.365.204) 419

16.01 1:00 +2.17 1.c3 Ba7 2.h5 h6 3.Ng6+ Kg8 4.Nf3 Bd7
5.Nxf8 Kxf8 6.c4 Ba4 7.b3 Bc6 8.b4 Bxf3
9.Qxf3 Nxc4 10.Qxb7 (26.110.752) 431

16.10 2:10 +15.31 1.Rd8 Qxd8 2.Qh5 h6 3.Qg6 hxg5
4.Qh5+ Kg8 5.hxg5 Qxg5 6.Qxg5 Nc4
7.Kb1 Nd2+ 8.Ka1 Ne4 9.Qh5 Nxg3
10.fxg3 Bd7 11.Kb1 (56.390.144) 431

17.01 5:12 +18.86 1.Rd8 Bd7 2.Rxa8 Nc6 3.Rxe8 Bxe8
4.Nfxe6 Nd4 5.Nxd4 Bxd4 6.Qc4 Bb6
7.Qb4 Rg8 8.Qb3 Rf8 9.Rd1 Bc5 10.Kb1 (139.157.708) 445

18.01 6:46 +18.54 1.Rd8 Bd7 2.Rxa8 Nc6 3.Rxe8 Bxe8
4.Nfxe6 Nd4 5.Nxd4 Bxd4 6.Qc4 f4
7.Qxd4 fxg3 8.fxg3 h6 9.Qc5 Kg8
10.Qd5+ Kh8 11.Qc4 Bd7 (180.534.314) 444

best move: Rd1-d8 time: 7:06.265 min n/s: 446.249 nodes: 190.200.000


Maybe Tord could also take a look at this line at the very end of evaluate(), I can't figure out the original one, I replaced it with:

Code: Select all

  // Interpolate between the middle game and the endgame score, and
  // return:
  Value value = scale_by_game_phase(ei.mgValue, ei.egValue, phase, factor);

  if(ei.mateThreat[stm] != MOVE_NONE)
    return Sign[stm] * (2 * QueenValueMidgame +  value);
  else
    return Sign[stm] * value;
}
but am not sure yet this is anywhere correct or better..

Eelco
Albert Silver
Posts: 3026
Joined: Wed Mar 08, 2006 9:57 pm
Location: Rio de Janeiro, Brazil

Re: Test Position: Rd8!!!

Post by Albert Silver »

Athlon64 3500+ with 256MB hash

Rybka Winfinder x64: 36s
Rybka Winfinder x32: 52s
Tiger Gambit III : 52s
"Tactics are the bricks and sticks that make up a game, but positional play is the architectural blueprint."
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Glaurung 2.1 (JA) Re: Test Position: Rd8!!!

Post by Tord Romstad »

Eelco de Groot wrote:Maybe Tord could also take a look at this line at the very end of evaluate(), I can't figure out the original one, I replaced it with:

Code: Select all

  // Interpolate between the middle game and the endgame score, and
  // return:
  Value value = scale_by_game_phase(ei.mgValue, ei.egValue, phase, factor);

  if(ei.mateThreat[stm] != MOVE_NONE)
    return Sign[stm] * (2 * QueenValueMidgame +  value);
  else
    return Sign[stm] * value;
}
but am not sure yet this is anywhere correct or better..
No, that's wrong. The evaluation function returns scores from the point of the side to move. In the code above, the variable "value" contains a score from white's point of view, and Sign[] is a two-element array holding the values +1 and -1 for white and black.

If ei.mateThreat[stm] is different from MOVE_NONE, it means that the side to move has a mating move. In this case we want to return a good score. When you multiply with Sign[stm], like you do, you'll return a good score if it's white to move and an immediate mate, but at bad score if it's black to move and an immediate mate. If the program plays black, it will try to avoid positions where it has a mate in one. If it plays white, it will try to get positions where the opponent has a mate in one. Needless to say, this is probably not what you want. :)

Here is the original code, which as far as I can see is entirely correct:

Code: Select all

  // Interpolate between the middle game and the endgame score, and
  // return:
  Value value = scale_by_game_phase(ei.mgValue, ei.egValue, phase, factor);

  if(ei.mateThreat[stm] != MOVE_NONE)
    return 8 * QueenValueMidgame - Sign[stm] * value;
  else
    return Sign[stm] * value;
Notice that when the side to move has a mating move, I return a huge positive score. It's perhaps confusing that I subtract Sign[stm] * value. I could just have removed this, and just returned 8 * QueenValueMidgame. The effect of subtracting Sign[stm] * value is that the program will prefer bad-looking positions where it has a mate in one over good-looking positions where it has a mate in one. As a consequence, when there is a choice of two lines which both leads to a forced mate, the program will prefer the one where the biggest amount of material is sacrificed. It has no effect on the strength, it just gives slightly more flashy play. :)

This is probably just confusing, so I'll simplify things and just return 8*QueenValueMidgame in the next version.

Tord
JVMerlino
Posts: 1407
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Test Position: Rd8!!!

Post by JVMerlino »

You're correct! I should have relied on The King instead of my own silly analysis.

It's actually a Mate in 13!

16.Rd8 Qxd8 17.Qh5 h6 18.Qg6 hxg5 19.Nh5 Qe7 {or Qd7} 20.Nf6 Rxf6 21.hxg5+ Kg8 22.exf6 {or gxf6} Nb3+ 23.axb3 Qf7 24.Rh8+ Kxh8 25.Qxf7 gxf6 26.gxf6 Be3+ 27.fxe3 f4 {any move, actually} 28.Qg7# 1-0

jm
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Test Position: Rd8!!!

Post by Dirt »

Uri wrote:Which Toga? Toga II 1.4.2JD can't find it even after 16 minutes. Shredder 10 also doesn't find it.
While I don't know what he used, Toga II 1.4 beta5c finds it in about that time frame.