Syzygy tablebases, work in Stockfish?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: White or Black ran out of time and has no material to ma

Post by phenri »

Hi there

I apologize, I completely forgot and mentions that the five-pieces was on the regular disc, what is more by USB2. That explains it. ;]

It works very well now that it's on an RamDisk

Greetings
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: White or Black ran out of time and has no material to ma

Post by phenri »

Jouni wrote:I gave 5 piece syzygy a test (Henri compile AFAIK). They work totally OK and endgame analysis is improved. But of course I found same problem positions too. Serious one
[D]2k5/3P4/8/8/8/8/1r5p/R3K3 b Q - 0 1

Stockfish definitely wants to lose :P when -Kd8 wins

Analysis by Stockfish 121013 64:
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 7/3 00:00:00 2kN, tb=36
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 8/3 00:00:00 2kN, tb=57
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 9/3 00:00:00 3kN, tb=86
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 10/3 00:00:00 5kN, tb=123
Hi jouni, voila, I complete the first diagram.
stockfish without TB finds 1... Kb7-#4

Code: Select all

2k5/3P4/8/8/8/8/1r5p/R3K3 b - - 0 1
({Stockfish 230913 64 SSE4.2_NO EGT: 1)} 1... Kb7 2. d8=N+ Kb6 3. Ra6+ Kxa6  4. Nc6 h1=Q# {[%eval-32759,34]})

Code: Select all

verified there http://chessok.com/?page_id=361 Endgame Nalimov Tablebases Online
FEN: 2k5/3P4/8/8/8/8/1r5p/R3K3 b - - 0 1
[#] Mate in 4 moves 1... Kb7 2. d8N+ Kb6 3. Ra6+ [*]
[pgn]
[Event "?"]
[Site "?"]
[Date "2013.10.15"]
[Round "?"]
[White "New game"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "2k5/3P4/8/8/8/8/1r5p/R3K3 b - - 0 1"]
[PlyCount "7"]

{Stockfish 230913 64 SSE4.2_NO EGT: 1)} 1... Kb7 (1... Kxd7) ({Stockfish
230913 64 SSE4.2:} 1... Kxd7 2. Ra7+ Kd6 3. Rh7 {[%eval -32665,36]}) ({
Stockfish 230913 64 SSE4.2: 1)} 1... Kxd7 {[%eval -32665,41]}) ({Stockfish
230913 64 SSE4.2: 2)} 1... Kd8 2. Ra8+ Kxd7 3. Ra7+ Kc6 4. Rh7 h1=R+ 5. Rxh1
Rb1+ 6. Kf2 {[%eval -32663,40]}) (1... Kd8 2. Ra8+ ({Stockfish 230913 64 SSE4.
2:} 2. Ra8+ Kxd7 3. Ra7+ Kd6 4. Rh7 {[%eval -32665,49]}) 2... Kxd7 {Stockfish
230913 64 SSE4.2:} 3. Rh8 ({Stockfish 230913 64 SSE4.2:} 3. Ra7+ Kc6 4. Rh7
h1=R+ 5. Rxh1 Rb1+ 6. Kf2 Rxh1 7. Kg2 Rh4 8. Kf3 Kd5 9. Ke3 Kc4 10. Kf2 Kd3 11.
Kg3 Rb4 12. Kf3 Re4 13. Kg2 Ke3 14. Kg3 {[%eval -32731,35]}) 3... h1=R+ 4. Rxh1
Rb1+ 5. Kd2 Rxh1 6. Kd3 Kd6 7. Kc4 Rh4+ 8. Kd3 Kd5 9. Ke3 Rh1 10. Kf4 {[%eval
-32729,32]}) ({Stockfish 230913 64 SSE4.2_NO EGT: 2)} 1... Kxd7 2. Ra7+ Kc6 3.
Rh7 h1=R+ 4. Rxh1 Rb1+ 5. Kf2 Rxh1 6. Kg2 Rh8 7. Kf3 Kd5 8. Kf4 Rf8+ 9. Ke3 Rf6
10. Kd3 Rf3+ 11. Ke2 Ke4 12. Kd2 Rh3 13. Kc2 Kd4 14. Kd2 Rh2+ 15. Ke1 Ke3 16.
Kd1 Rg2 17. Kc1 Kd3 18. Kb1 Kc3 19. Ka1 {[%eval -32727,33]}) 2. d8=N+ Kb6 3.
Ra6+ Kxa6 ({Stockfish 230913 64 SSE4.2:} 3... Kxa6 4. Ne6 h1=Q# {[%eval -32665,
38]}) 4. Nc6 h1=Q# {[%eval -32759,34]} *

[/pgn]
Stockfish 230913 64 SSE4.2 = sbase 5-men
Stockfish 230913 64 SSE4.2_NO EGT = w/o any TB
Jouni
Posts: 3286
Joined: Wed Mar 08, 2006 8:15 pm

Re: White or Black ran out of time and has no material to ma

Post by Jouni »

In this infamous position (castling!) -Kd8 is only winning move and it's mate in 18, Confirmed by Chest:

1. ...+ Kd8 {+M18/18} 2. Ra8+ {-M17/17} Kxd7 {+M17/17} 3. Ra7+ {-M16/16}
Kd6 {+M16/16} 4. Ra6+ {-M15/15} Kd5 {+M15/15} 5. Ra5+ {-M14/14} Ke4
{+M14/14} 6. Rh5 {-M13/13} h1=Q+ {+M13/13} 7. Rxh1 {-M12/12} Rb1+ {+M12/12}
8. Kd2 {-M11/11} Rxh1 {+M11/11} 9. Kc3 {-M10/10} Rc1+ {+M10/10} 10. Kb4
{-M9/9} Kd5 {+M9/9} 11. Kb3 {-M8/8} Rc4 {+M8/8} 12. Ka3 {-M7/7} Kc5 {+M7/7}
13. Kb3 {-M6/6} Kb5 {+M6/6} 14. Ka3 {-M5/5} Rb4 {+M5/5} 15. Ka2 {-M4/4} Ka4
{+M4/4} 16. Ka1 {-M3/3} Kb3 {+M3/3} 17. Kb1 {-M2/2} Rc4 {+M2/2} 18. Ka1
{-M1/1} Rc1# {+M1/1}
Jouni
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: White or Black ran out of time and has no material to ma

Post by michiguel »

phenri wrote:
Jouni wrote:I gave 5 piece syzygy a test (Henri compile AFAIK). They work totally OK and endgame analysis is improved. But of course I found same problem positions too. Serious one
[D]2k5/3P4/8/8/8/8/1r5p/R3K3 b Q - 0 1

Stockfish definitely wants to lose :P when -Kd8 wins

Analysis by Stockfish 121013 64:
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 7/3 00:00:00 2kN, tb=36
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 8/3 00:00:00 2kN, tb=57
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 9/3 00:00:00 3kN, tb=86
1...Kxd7 2.0-0-0+
-+ (-#51) Depth: 10/3 00:00:00 5kN, tb=123
Hi jouni, voila, I complete the first diagram.
stockfish without TB finds 1... Kb7-#4

Code: Select all

2k5/3P4/8/8/8/8/1r5p/R3K3 b - - 0 1
({Stockfish 230913 64 SSE4.2_NO EGT: 1)} 1... Kb7 2. d8=N+ Kb6 3. Ra6+ Kxa6  4. Nc6 h1=Q# {[%eval-32759,34]})

Code: Select all

verified there http://chessok.com/?page_id=361 Endgame Nalimov Tablebases Online
FEN: 2k5/3P4/8/8/8/8/1r5p/R3K3 b - - 0 1
[#] Mate in 4 moves 1... Kb7 2. d8N+ Kb6 3. Ra6+ [*]
[pgn]
[Event "?"]
[Site "?"]
[Date "2013.10.15"]
[Round "?"]
[White "New game"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "2k5/3P4/8/8/8/8/1r5p/R3K3 b - - 0 1"]
[PlyCount "7"]

{Stockfish 230913 64 SSE4.2_NO EGT: 1)} 1... Kb7 (1... Kxd7) ({Stockfish
230913 64 SSE4.2:} 1... Kxd7 2. Ra7+ Kd6 3. Rh7 {[%eval -32665,36]}) ({
Stockfish 230913 64 SSE4.2: 1)} 1... Kxd7 {[%eval -32665,41]}) ({Stockfish
230913 64 SSE4.2: 2)} 1... Kd8 2. Ra8+ Kxd7 3. Ra7+ Kc6 4. Rh7 h1=R+ 5. Rxh1
Rb1+ 6. Kf2 {[%eval -32663,40]}) (1... Kd8 2. Ra8+ ({Stockfish 230913 64 SSE4.
2:} 2. Ra8+ Kxd7 3. Ra7+ Kd6 4. Rh7 {[%eval -32665,49]}) 2... Kxd7 {Stockfish
230913 64 SSE4.2:} 3. Rh8 ({Stockfish 230913 64 SSE4.2:} 3. Ra7+ Kc6 4. Rh7
h1=R+ 5. Rxh1 Rb1+ 6. Kf2 Rxh1 7. Kg2 Rh4 8. Kf3 Kd5 9. Ke3 Kc4 10. Kf2 Kd3 11.
Kg3 Rb4 12. Kf3 Re4 13. Kg2 Ke3 14. Kg3 {[%eval -32731,35]}) 3... h1=R+ 4. Rxh1
Rb1+ 5. Kd2 Rxh1 6. Kd3 Kd6 7. Kc4 Rh4+ 8. Kd3 Kd5 9. Ke3 Rh1 10. Kf4 {[%eval
-32729,32]}) ({Stockfish 230913 64 SSE4.2_NO EGT: 2)} 1... Kxd7 2. Ra7+ Kc6 3.
Rh7 h1=R+ 4. Rxh1 Rb1+ 5. Kf2 Rxh1 6. Kg2 Rh8 7. Kf3 Kd5 8. Kf4 Rf8+ 9. Ke3 Rf6
10. Kd3 Rf3+ 11. Ke2 Ke4 12. Kd2 Rh3 13. Kc2 Kd4 14. Kd2 Rh2+ 15. Ke1 Ke3 16.
Kd1 Rg2 17. Kc1 Kd3 18. Kb1 Kc3 19. Ka1 {[%eval -32727,33]}) 2. d8=N+ Kb6 3.
Ra6+ Kxa6 ({Stockfish 230913 64 SSE4.2:} 3... Kxa6 4. Ne6 h1=Q# {[%eval -32665,
38]}) 4. Nc6 h1=Q# {[%eval -32759,34]} *

[/pgn]
Stockfish 230913 64 SSE4.2 = sbase 5-men
Stockfish 230913 64 SSE4.2_NO EGT = w/o any TB
You are setting up the position incorrectly, without castling rights.

You are setting this (from the pgn above)
2k5/3P4/8/8/8/8/1r5p/R3K3 b - - 0 1

But the position is this
2k5/3P4/8/8/8/8/1r5p/R3K3 b Q - 0 1

Miguel
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: White or Black ran out of time and has no material to ma

Post by phenri »

Indeed, with castling it changes things. That's interesting, thank you.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: White or Black ran out of time and has no material to ma

Post by syzygy »

Stockfish with my adaptations probes 5- and 6-men positions regardless of castling rights, which is of course incorrect (as the tables assume no castling rights). But these are very articificial positions.

Note that there is no problem with en passant rights, as this is handled by the probing code.