Problem with Syzygy bases

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

Moderators: hgm, chrisw, Rebel

Jouni
Posts: 3487
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: Problem with Syzygy bases

Post by Jouni »

Correct Jörg. Confirmed in SF discord.
Jouni
User avatar
Rebel
Posts: 7255
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Problem with Syzygy bases

Post by Rebel »

syzygy wrote: Thu Nov 21, 2024 1:42 am
Rebel wrote: Wed Nov 20, 2024 8:32 pmand the 10 most used 7-men
[d]2n5/2P5/8/1k6/p7/3K4/3N1p2/8 b
You need all the tables into which black can promote.
Indeed, good catch.

The other two, a 5-men and a 6-men are a loss in more than 50 moves following your script and SF has the following parameter -

Code: Select all

Syzygy50MoveRule type check default true
And so things start to make sense and my download data is ok.

I just now skip positions that don't return a TB score keeping the original position.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
Ajedrecista
Posts: 2025
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Problem with Syzygy bases.

Post by Ajedrecista »

Hello Alex:
Brunetti wrote: Wed Nov 20, 2024 11:33 pm If you explore the Stockfish line on the Syzygy tables site, you’ll encounter some peculiar positions. I’m not an expert in tablebases, but here’s an example:

[d]8/8/8/7p/2K1N2N/k7/8/8 b - - 0 1

The site shows:

Code: Select all

Black is losing DTM 122 DTZ 45
Ka4 DTM 107 Loss with DTZ 44
Kb2 DTM 121 Loss with DTZ 28
Ka2 DTM 103 Loss with DTZ 16
stating that ...Ka4 is the best move, while Lichess online tablebases indicate ...Kb2 as the best choice for Black.
There are several such instances along this line. I hope this information proves helpful.

Alex
Based on this data, I would say that the Syzygy EGTB site prefers DTZ for ordering, while Lichess prefers DTM:

https://lichess.org/analysis/8/8/8/7p/2 ... olor=white

Code: Select all

Losing
Kb2        DTZ 28     DTM 121
Ka4        DTZ 44     DTM 107
Ka2        DTZ 16     DTZ 103
Regards from Spain.

Ajedrecista.
User avatar
Brunetti
Posts: 368
Joined: Tue Dec 08, 2009 1:37 pm
Location: Milan, Italy
Full name: Alex Brunetti

Re: Problem with Syzygy bases.

Post by Brunetti »

Ajedrecista wrote: Thu Nov 21, 2024 7:30 pm Based on this data, I would say that the Syzygy EGTB site prefers DTZ for ordering, while Lichess prefers DTM:
Sure, but this way if Black plays the best defense accroding to DTZ, White mates earlier, or I'm not understanding?

In the line played by SF, 9...Kc3 is the best move for Black?

Alex
peter
Posts: 3276
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Problem with Syzygy bases.

Post by peter »

Brunetti wrote: Thu Nov 21, 2024 7:44 pm
Ajedrecista wrote: Thu Nov 21, 2024 7:30 pm Based on this data, I would say that the Syzygy EGTB site prefers DTZ for ordering, while Lichess prefers DTM:
Sure, but this way if Black plays the best defense accroding to DTZ, White mates earlier, or I'm not understanding?

In the line played by SF, 9...Kc3 is the best move for Black?
According to here

https://www.shredderchess.com/de/online ... nbank.html

not the very best as for DTM (9...Kb3 was #73, 9...Kc3 #68) but it doesn't matter as for the cursed win, both moves draw, in case we are talking about same line starting from same position
[pgn][Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "8/8/8/1k5p/3K3N/8/4N3/8 b - - 0 1"]
[PlyCount "17"]

1... Kc6 2. Ke4 Kc5 3. Nd4 Kd6 4. Nb3 Ke6 5. Nc5+ Kd6 6. Kd4 Kc6 7. Ne4 Kb5 8. Kd5 Kb4 9. Nf2 Kb3 {#73} (9... Kc3 $6 {#68}) *
[/pgn]
Peter.
petero2
Posts: 707
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Problem with Syzygy bases

Post by petero2 »

Rebel wrote: Wed Nov 20, 2024 8:32 pm Some failed positions.

Code: Select all

2n5/2P5/8/1k6/p7/3K4/3N1p2/8 b - - 0 1 68 c8d6 0
8/kp3KP1/8/2q5/5Q2/8/8/8 b - - 0 1 -19 c5d5 0
8/8/8/1k5p/3K3N/8/4N3/8 b - - 0 1 -28 b5c6 0
Rebel wrote: Thu Nov 21, 2024 4:55 pm The other two, a 5-men and a 6-men are a loss in more than 50 moves following your script and SF has the following parameter -

Code: Select all

Syzygy50MoveRule type check default true
And so things start to make sense and my download data is ok.
That does not actually make sense to me, since position 2 and 3 in your list are won even when the 50-move rule is used, i.e. they real wins, not cursed wins. This can be seen by observing that DTZ <= 100 (92 and 65):

https://syzygy-tables.info/?fen=8/kp3KP ... _b_-_-_0_1
https://syzygy-tables.info/?fen=8/8/8/1 ... _b_-_-_0_1

When I analyze these positions using Stockfish it correctly scores them as tablebase wins for white, so it is unexpected that you don't get usable results from tablebase probing for those positions.
peter
Posts: 3276
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Problem with Syzygy bases

Post by peter »

petero2 wrote: Fri Nov 22, 2024 6:46 am
Rebel wrote: Wed Nov 20, 2024 8:32 pm Some failed positions.

Code: Select all

2n5/2P5/8/1k6/p7/3K4/3N1p2/8 b - - 0 1 68 c8d6 0
8/kp3KP1/8/2q5/5Q2/8/8/8 b - - 0 1 -19 c5d5 0
8/8/8/1k5p/3K3N/8/4N3/8 b - - 0 1 -28 b5c6 0
Rebel wrote: Thu Nov 21, 2024 4:55 pm The other two, a 5-men and a 6-men are a loss in more than 50 moves following your script and SF has the following parameter -

Code: Select all

Syzygy50MoveRule type check default true
And so things start to make sense and my download data is ok.
That does not actually make sense to me, since position 2 and 3 in your list are won even when the 50-move rule is used, i.e. they real wins, not cursed wins. This can be seen by observing that DTZ <= 100 (92 and 65):

https://syzygy-tables.info/?fen=8/kp3KP ... _b_-_-_0_1
https://syzygy-tables.info/?fen=8/8/8/1 ... _b_-_-_0_1

When I analyze these positions using Stockfish it correctly scores them as tablebase wins for white, so it is unexpected that you don't get usable results from tablebase probing for those positions.
Here

viewtopic.php?p=972348#p972348

you have the line following Nalimov's tablebases from pos. nr. 3 according to

https://www.shredderchess.com/de/online ... nbank.html

, and here
[pgn]
[Event "?"]
[Site "?"]
[Date "2024.11.22"]
[Round "?"]
[White "pos"]
[Black "2"]
[Result "*"]
[SetUp "1"]
[FEN "8/kp3KP1/8/2q5/5Q2/8/8/8 b - -"]

1... Qd5+ {#63} 2. Kg6 Qd3+ 3. Kg5 Qd5+ 4. Kh6 Qh1+ 5. Kg6
Qg2+ 6. Qg5 Qc6+ 7. Kh7 Qe4+ 8. Kh8 Qh1+ 9. Kg8 Qe4 10. Qh5
Qc4+ 11. Kh8 Qd4 12. Qa5+ Kb8 13. Qg5 Ka8 14. Qe7 Qc3
15. Qf8+ Ka7 16. Qf2+ Ka8 17. Qf5 Qb2 18. Qa5+ Kb8 19. Qe1
Qh2+ 20. Kg8 Ka8 21. Qa1+ Kb8 22. Qc3 Ka8 23. Qa3+ Kb8
24. Kf8 Qf2+ 25. Ke8 Qe2+ 26. Qe7 Qh5+ 27. Kd7 Qg4+ 28. Kd6
Qd4+ 29. Ke6 Qg4+ 30. Ke5 Qg3+ 31. Kf5 Qd3+ 32. Kf6 Qf3+
33. Kg6 Qd3+ 34. Kf7 Qc4+ 35. Qe6 Qc7+ 36. Kf8 Qf4+ 37. Ke8
Qa4+ 38. Ke7 Qh4+ 39. Qf6 Qe4+ 40. Kd7 Qa4+ 41. Kd8 Qa5+
42. Ke7 Qc7+ 43. Ke8 Qc4 44. Qd6+ Ka7 45. Qa3+ Kb6 46. Qe3+
Ka6 47. Kf8 Qc8+ 48. Kf7 Qf5+ 49. Ke7 Qh7 50. Qe6+ Ka5
{#14} *
[/pgn]
you have the same for position nr.2, both showing 50 moves without pawn- moves nor material changing ones, each one move lowering DsTM (given in posting or .pgn too) one by one, so what?
Peter.
peter
Posts: 3276
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Problem with Syzygy bases

Post by peter »

Oops!
At move nr. 45 of .pgn above, White can deviate with 45.Kf8(!) from Qa3+(?), having a longer DTM for 5 moves thus, but with

45. Kf8 Qc8+ 46. Ke7 Qg4 47. Qc5+ Kb8 48. Qe5+ Ka7 49. Qa5+ Kb8 50. Qd8+ Ka7 51. g8=Q

50 moves from White's side aren't reached before promoting to Queen, starting the whole line with a black move
:)
And in line from pos. nr. 3 onwards, move count is reset by 28...h4, so that yet seems to work with mate one move before the 50th too:
[pgn]
[Event "?"]
[Site "?"]
[Date "2024.11.21"]
[Round "?"]
[White "pos"]
[Black "3"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/1k5p/3K3N/8/4N3/8 b - -"]

1... Kc6 2. Ke4 Kc5 3. Nd4 Kd6 4. Nb3 Ke6 5. Nc5+ Kd6
6. Kd4 Kc6 7. Ne4 Kb5 8. Kd5 Kb4 9. Nf2 Kc3 10. Kc5 Kc2
11. Kc4 Kd2 12. Kd4 Kc2 13. Ne4 Kb3 14. Kc5 Ka4 15. Nd2 Ka3
16. Kc4 Kb2 17. Ne4 Kc2 18. Nf3 Kb2 19. Nd4 Ka3 20. Nc5 Kb2
21. Kd3 Kc1 22. Nf3 Kb2 23. Nh4 Kc1 24. Na4 Kb1 25. Kd2 Ka2
26. Kc3 Kb1 27. Nb2 Kc1 28. Nf3 h4 29. Nd3+ Kd1 30. Nf4 h3
31. Nh2 Kc1 32. Nd5 Kb1 33. Ne3 Kc1 34. Kc4 Kb2 35. Kb4 Ka1
36. Nc4 Ka2 37. Kc3 Kb1 38. Kd2 Ka1 39. Kc1 Ka2 40. Kc2 Ka1
41. Kb3 Kb1 42. Nd2+ Kc1 43. Kc3 Kd1 44. Nb3 Ke1 45. Kd4
Ke2 46. Ke4 Ke1 47. Ke3 Kd1 48. Kd3 Ke1 49. Nd4 Kd1 50. Ne2
Ke1 51. Nc3 Kf2 52. Kd2 Kg2 53. Ke2 Kg3 54. Ke3 Kh4 55. Kf4
Kh5 56. Kf5 Kh6 57. Kf6 Kh5 58. Ne4 Kh4 59. Kf5 Kh5 60. Nd2
Kh4 61. Ndf1 Kh5 62. Ne3 Kh6 63. Kf6 Kh7 64. Nf5 Kg8
65. Ke7 Kh7 66. Kf7 Kh8 67. Kg6 Kg8 68. Ng7 Kf8 69. Kf6 Kg8
70. Ne6 Kh7 71. Kg5 Kg8 72. Kg6 Kh8 73. Kf7 Kh7 74. Ng4 Kh8
75. Ng5 h2 76. Ne5 h1=Q 77. Ng6# 1-0
[/pgn]
Peter.
syzygy
Posts: 5661
Joined: Tue Feb 28, 2012 11:56 pm

Re: Problem with Syzygy bases

Post by syzygy »

peter wrote: Thu Nov 21, 2024 9:20 am
Jouni wrote: Wed Nov 20, 2024 10:58 pm Nalimov tbs says mate in 79.

What's this??
It's a cursed win of course.
It is not a cursed win:
https://syzygy-tables.info/?fen=8/8/8/1 ... _b_-_-_0_1
peter
Posts: 3276
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Problem with Syzygy bases

Post by peter »

syzygy wrote: Sat Nov 23, 2024 2:28 pm
peter wrote: Thu Nov 21, 2024 9:20 am
Jouni wrote: Wed Nov 20, 2024 10:58 pm Nalimov tbs says mate in 79.

What's this??
It's a cursed win of course.
It is not a cursed win:
https://syzygy-tables.info/?fen=8/8/8/1 ... _b_-_-_0_1
Saw it already in meantime too,as shown in my posting just above yours, yet the mistakes were only about sinlge moves to the boundary of 50 in first suboptimal .pgn- lines of mine.
Here
viewtopic.php?p=972430#p972430
in 50th move of White's (starting with one from Black's side) from position nr. 2 and in 49th (77th from first move and 28...h4) after reset by pawn- move from position nr.3 (there I had a cut off of 2 moves with first pawn move of Black's in first wrong one .pgn too soon, costing then the decisive ones to >50 to mate).

Position nr. 2 and nr. 3 aren't any cursed wins, but it's really tight yet with both of them
:)
Last edited by peter on Sat Nov 23, 2024 2:57 pm, edited 11 times in total.
Peter.