Answers.Body: <p>An explanation can now be found on <a href="https://syzygy-tables.info/metrics#dtz" rel="noreferrer">https://syzygy-tables.info/metrics#dtz</a>.</p>
  <hr />
  <p>The goal is to provide values that can be min-maxed for perfect play. To make this possible, Syzygy adds a possible offset of 100 to DTZ<sub>50</sub> values. Why is that needed?</p>
  <p>Consider the following position if a DTZ<sub>50</sub> of 7:</p>
  <pre><code>[FEN &quot;8/8/2N5/8/3k4/7N/p2K4/8 b - - 0 1&quot;]
  
  1. Kc5 Na5 2. Kb4 Nc6+ 3. Ka4 Nd4 4. a1=Q
  </code></pre>
  <p>From here, white can still draw (DTZ<sub>50</sub> is now 102).</p>
  <p>Other positions with DTZ<sub>50</sub> 7 (including any mate in 7 ply) are winning. So if DTZ<sub>50</sub> gives both positions the same value, min-maxing is not guaranteed to work.</p>
  <p>The solve this, Syzygy invents a new metric, sometimes called DTZ<sub>50</sub>'', that adds an offset of 100 if one of the following endgame phases is solely or additionally responsible for a draw under the 50-move rule. The example position gets a DTZ<sub>50</sub>'' of 107, and a mate in 7 ply with DTZ<sub>50</sub>'' of 7 is clearly preferable.</p>
  <p>In short, it achieves that <strong>1 ≤ DTZ<sub>50</sub>'' ≤ 100 if and only if the position is unconditionally winning.</strong></p>
  <p>This is very useful. We just have to accept that (without following the tablebase line) we don't know if the original DTZ<sub>50</sub> was DTZ<sub>50</sub>'' - 100 or DTZ<sub>50</sub>''.</p>
  <hr />
  <p>Back to the position you've been asking about:</p>
  <ul>
  <li>It indeed takes 556 ply before White can safely move a pawn, i.e., DTZ<sub>50</sub> is 556.</li>
  <li>The value given by Syzygy, DTZ<sub>50</sub>'' is 656, because after the pawn move, the next endgame phase is (also) drawn under the 50-move and an offset of 100 was added accordingly.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-23T19:44:43.360Z
Answers.LastActivityDate: 2024-12-23T19:44:43.360Z
Answers.UserDisplayName: Niklas
Answers.Body: <p>Edit: I didn't know the 556/656 reason (now explained in another answer).</p>
  <p>I think the DTZ 101 jumping up after playing a pawn move is due to the fact that after the zeroing the move counter, the game can <em>still</em> be drawn due another application of the 50 move rule. If there wasn't this looming situation, then before the pawn move, it would say just DTZ 1.</p>
  <p>Does this approach give the right answer, of indicating whether the position is blessed/cursed? Does it give the quickest route to the first zero? What about optimizing for cloaked zeroes beyond? I doubt it's a bug, but it would be interesting to know more about the approach taken, which I'm sure has been considered very carefully.</p>
  <p>I've not explored this with Niklas, but I've always found him very responsive. His github link is on the Syzygy page.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-19T03:10:26.107Z
Answers.LastActivityDate: 2024-12-24T14:54:35.970Z
Answers.LastEditDate: 2024-12-24T14:54:35.970Z
Answers.UserDisplayName: Laska
Body: <p>The main page of Syzygy tablebases has links to some peculiar positions. One of them is <a href="https://syzygy-tables.info/?fen=6B1/3B4/5R2/6q1/P7/1k6/8/3K4_b_-_-_0_1" rel="nofollow noreferrer">556 half-moves before the winning side can safely move a pawn</a>. But when you open it, the status in the top right says &quot;Black is losing DTZ 656&quot; instead.</p>
  <p>I kept pressing &quot;space&quot; for the best moves, and eventually got <a href="https://syzygy-tables.info/?fen=8/7K/2Bkq3/6R1/P7/5B2/8/8_b_-_-_0_1" rel="nofollow noreferrer">this position</a>, with counters still looking normal, but the <a href="https://syzygy-tables.info/?fen=8/2k4K/2B1q3/6R1/P7/5B2/8/8_w_-_-_0_1" rel="nofollow noreferrer">next one</a> has status &quot;White is winning DTZ 101&quot; but offers the best move &quot;a5 Zeroing&quot;.</p>
  <p>If you select that move, the counter in the status jumps up to &quot;Black is losing DTZ 114&quot;, but 14 moves later you arrive to a <a href="https://syzygy-tables.info/?fen=3k4/6K1/2B3R1/P7/7q/5B2/8/8_w_-_-_0_1" rel="nofollow noreferrer">similar situation</a>: status &quot;White is winning DTZ 101&quot;, best move &quot;a6 Zeroing&quot;.</p>
  <p>Is it a bug or do I just misunderstand something?</p>
  
Tags: <tablebases>
Title: Bug in Syzygy tablebases?
ThreadText: # Bug in Syzygy tablebases?
  
  (Asked by: username_0 on 2024-12-18)
  
  The main page of Syzygy tablebases has links to some peculiar positions. One of them is [556 half-moves before the winning side can safely move a pawn](https://syzygy-tables.info/?fen=6B1/3B4/5R2/6q1/P7/1k6/8/3K4_b_-_-_0_1). But when you open it, the status in the top right says "Black is losing DTZ 656" instead.
  
  I kept pressing "space" for the best moves, and eventually got [this position](https://syzygy-tables.info/?fen=8/7K/2Bkq3/6R1/P7/5B2/8/8_b_-_-_0_1), with counters still looking normal, but the [next one](https://syzygy-tables.info/?fen=8/2k4K/2B1q3/6R1/P7/5B2/8/8_w_-_-_0_1) has status "White is winning DTZ 101" but offers the best move "a5 Zeroing".
  
  If you select that move, the counter in the status jumps up to "Black is losing DTZ 114", but 14 moves later you arrive to a [similar situation](https://syzygy-tables.info/?fen=3k4/6K1/2B3R1/P7/7q/5B2/8/8_w_-_-_0_1): status "White is winning DTZ 101", best move "a6 Zeroing".
  
  Is it a bug or do I just misunderstand something?
  
  **Tags:** tablebases
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2024-12-23. Score: 5 | Accepted answer
  
  An explanation can now be found on <https://syzygy-tables.info/metrics#dtz>.
  
  ---
  
  The goal is to provide values that can be min-maxed for perfect play. To make this possible, Syzygy adds a possible offset of 100 to DTZ50 values. Why is that needed?
  
  Consider the following position if a DTZ50 of 7:
  
  ```
  [FEN "8/8/2N5/8/3k4/7N/p2K4/8 b - - 0 1"]
  
  1. Kc5 Na5 2. Kb4 Nc6+ 3. Ka4 Nd4 4. a1=Q
  
  ```
  
  From here, white can still draw (DTZ50 is now 102).
  
  Other positions with DTZ50 7 (including any mate in 7 ply) are winning. So if DTZ50 gives both positions the same value, min-maxing is not guaranteed to work.
  
  The solve this, Syzygy invents a new metric, sometimes called DTZ50'', that adds an offset of 100 if one of the following endgame phases is solely or additionally responsible for a draw under the 50-move rule. The example position gets a DTZ50'' of 107, and a mate in 7 ply with DTZ50'' of 7 is clearly preferable.
  
  In short, it achieves that **1 ≤ DTZ50'' ≤ 100 if and only if the position is unconditionally winning.**
  
  This is very useful. We just have to accept that (without following the tablebase line) we don't know if the original DTZ50 was DTZ50'' - 100 or DTZ50''.
  
  ---
  
  Back to the position you've been asking about:
  
  * It indeed takes 556 ply before White can safely move a pawn, i.e., DTZ50 is 556.
  * The value given by Syzygy, DTZ50'' is 656, because after the pawn move, the next endgame phase is (also) drawn under the 50-move and an offset of 100 was added accordingly.
  
  
  ---
  
  ### Answer by username_2 on 2024-12-19. Score: 4
  
  Edit: I didn't know the 556/656 reason (now explained in another answer).
  
  I think the DTZ 101 jumping up after playing a pawn move is due to the fact that after the zeroing the move counter, the game can *still* be drawn due another application of the 50 move rule. If there wasn't this looming situation, then before the pawn move, it would say just DTZ 1.
  
  Does this approach give the right answer, of indicating whether the position is blessed/cursed? Does it give the quickest route to the first zero? What about optimizing for cloaked zeroes beyond? I doubt it's a bug, but it would be interesting to know more about the approach taken, which I'm sure has been considered very carefully.
  
  I've not explored this with username_1, but I've always found him very responsive. His github link is on the Syzygy page.
  
  
  ---
  
  